Reversing a list in python

In this article, we shall see how to reverse a list in python. There are multiple ways to do this. Let us look at one by one with an example for each. It is up to you to decide the best and efficient one. The multiple ways to reverse a list are, reverse() method Slicing […]

Read More

Whatsapp date-message visualization using python

In this article we shall see how to visualize the date and the number of messages that we sent on those dates using python and matplotlib. Requirements and installation Download the dataset from here. Matplotlib for plotting the graph. Installation We can install the matplotlib from pypi.org by running the following command on the terminal. […]

Read More

PostgreSQL dump and restore from RDS Amazon

In this article, we shall see how to take the dump of our database from our RDS server and restore it. RDS takes backup of our database almost every day and sort them by dates. Choose the date that we want and create a snapshot. This will literally create a clone of our RDS server, […]

Read More

String constants in python

The string module has some of the builtin constant variables. We can use this instead of declaring the constants again in our code. Some of the string constants that will be discussed here are, ascii_letters ascii_lowercase ascii_uppercase octdigits punctuation whitespace Let us look at these constants one by one with a code snippet printing each […]

Read More

Generate image CAPTCHA using python

In this article we shall see how to generate image CAPTCHA using python. This can be achieved with a few lines of code with a help of a python library called captcha. Let us get started with the installation of this package. This will be extremely helpful if you are using python as backend for […]

Read More

string partition in python

String partition in python can be done easily by using a built-in method called partition(). This method is a string method. There are two string partition methods. partition() rpartition() 1. partition() The partition() method takes a separator as input and split the string at the first occurrence of the separator, and return a 3-tuple containing […]

Read More

Youtube search with python

In this article, we shall see how to search youtube with python and get a JSON response with a link to the videos, thumbnails, etc. All these are possible with the help of a python library called youtube-search-python. Let us get started by installing the library. Installation This package can be installed easily using pip […]

Read More

Basic authentication in Django

In this article we shall see how to work with basic authentication in django. But before that first let us see what Basic authentication is. What is “Basic authentication“? Basic authentication adds a header like below to the HTTP requests. Basic authentication creates the token by taking a username and a password joins them with […]

Read More