Android: Your CPU does not support VT-x

Android: Your CPU does not support VT-x: If you have installed Andriod Studio and if you are trying to create  virtual device(s) on an AMD processor-based laptop, most probably the following issue would arise: Unfortunately, your computer does not support hardware accelerated virtualization. Here are some of your options: 1) Use a physical device for …

Android: Your CPU does not support VT-x Read More »

How to Install Docker in Ubuntu 18.04 Cheat-sheet

How to install Docker in Ubuntu 18.04: Docker is containerization application. Containers are platforms that let you run your applications in resource-isolated processes. Unlike virtual machines that you create in Virtual Box, containerization applications like Docker provide more portability, user-friendliness, and closeness to the host operating system and its resources. Here in this post, I …

How to Install Docker in Ubuntu 18.04 Cheat-sheet Read More »

4 Ways to Swap 2 Variables in Python

4 Ways to Swap 2 Variables in Python

Ways to Swap 2 Variables in Python: In computer programming, the act of swapping two variables refers to mutually exchanging the values of the variables. For example, if a = 5 and b = 6, then after swapping these two variables, a = 6 and b = 5. To perform this, there are many ways that one can follow. Here …

4 Ways to Swap 2 Variables in Python Read More »

What does if __name__ == “__main__”: do?

What does if __name__ == “__main__”: do? The best answer I found after searching for it in Google was in StackOverFlow. According to it, whenever the Python interpreter reads a source file, it does two things: it sets a few special variables like __name__, and then it executes all of the code found in the file. …

What does if __name__ == “__main__”: do? Read More »

Python Program to Send Emails Using Yagmail

Sending mail using yagmail

With Yagmail, sending e-mail using a Python program is easier than ever before. Yagmail – Yet Another Gmail/SMTP Client is a user-friendly API that simplifies the process of sending emails. In this post, I am going to share how to use yagmail, the API described above. If you want to read the full documentation of this …

Python Program to Send Emails Using Yagmail Read More »

What the F*** is F-string in Python

F-strings in Python

Python provides several ways to format strings. These different ways have their own advantages and disadvantages. Python 3.6 and above come with another method of string formatting (formally termed as string interpolation) known as f-strings” or Formatted string literals PEP 498. I knew about it recently while working on a Kattis problem with a friend.  …

What the F*** is F-string in Python Read More »

Differences between sort() and sorted() in Python

Sorting is a very common problem that many programmers may come across. Like any other programming languages, Python has its own built-in sorting methods. These sorting methods are sort() and sorted(). In this post, I will share the differences between these two methods and how these can be used in programs. I found these methods …

Differences between sort() and sorted() in Python Read More »