Functions in Python - How it works ?

This article covers Python functions which display values on the screen. In fact, The function is a block of related statements that performs a specific task when it is called. Functions helps in breaking our program into smaller and modular chunks which makes our program more organized and manageable. Also, it avoids repetition and makes the code reusable.

Identity Operators in Python - Explained with examples

This article covers identity operators in Python which are used to determine if a value belongs to a given class or type, and they are typically used to identify what sort of data a variable contains. In fact, Identity operators are used to find an object's memory unit, which is especially useful when two objects have the same name and can only be identified by their memory location.

Python Logical Operators - Explained with Examples

This article covers different logical operators which are logical and operator, logical or operator, and logical not operator. In fact, Logical operators are used to calculate the results based on logical operations. It compares the values of the two operands and will provide you with the result in the form of true or false. 

Use Assignment Operators in Python - Complete guide ?

This article covers some of the most useful assignment operators in Python. In fact, Operators are used to perform operations on values and variables. These are the special symbols that carry out arithmetic, logical, bitwise computations. The value the operator operates on is known as Operand.

Install Python on Linux Mint 20 - Step by step guide ?

This article covers how you can install Python 3.9 on your Linux Mint system. In fact, Python programming language can help in solving your programmatic problems.

Main features of Python includes:

  • It can be used on a server to create web applications.
  • It can be used alongside software to create workflows.
  • It can connect to database systems. It can also read and modify files.
  • It can be used to handle big data and perform complex mathematics.
  • It can be used for rapid prototyping or production-ready software development.

Install Anaconda on Ubuntu 20.04 - Step by step guide ?

This article covers how to install and use Anaconda on your Ubuntu system. Anaconda is a free and open-source Python and R programming language distribution. The Python interpreter is included, as are several data science and machine learning packages.

Python String isdigit() Function

This article covers how to use the isdigit() function in Python. In fact, the isdigit() method returns True if all characters in a string are digits or Unicode char of a digit. If not, it returns False.

Return Value from isdigit()

The isdigit() returns:

  • True if all characters in the string are digits.
  • False if at least one character is not a digit.

Python rstrip() Function - Explained with Examples

This article covers how to use the Python String rstrip() Method. In fact, the rstrip() method returns a copy of the string by removing the trailing characters specified as argument. If the characters argument is not provided, all trailing whitespaces are removed from the string.

Python String rstrip() Method Syntax:


rstrip() Method Parameters:

characters: (optional) A char or string to be removed from the end of the string.

Python String partition() Method - Explained with examples

This article covers the usage of the partition() method in Python. In fact, Python partition() function is used to partition a string at the first occurrence of the given string and return a tuple that includes 3 parts – the part before the separator, the argument string (separator itself), and the part after the separator.

Python partition() function partition() Parameters

The partition() function accepts a single parameter:

  • separator – a string parameter that separates the string at the first occurrence of it.
  • Note – If the separator argument is kept empty, then the Python interpreter will throw a TypeError exception.

Python List pop() Method - Explained with Examples

This article covers how to use the pop() method in Python. In fact, the pop() method removes the item at the given index from the list and returns the removed item.

pop() function parameters:

  • The pop() method takes a single argument (index).
  • The argument passed to the method is optional. If not passed, the default index -1 is passed as an argument (index of the last item).
  • If the index passed to the method is not in range, it throws IndexError: pop index out of range exception.

Return Value from pop()

The pop() method returns the item present at the given index. This item is also removed from the list.

Python split() Function

This article covers how to use the split() function in Python. In fact, The split() method breaks up a string at the specified separator and returns a list of strings.

split() Parameters

The split() method takes a maximum of 2 parameters:

  • separator (optional) - Delimiter at which splits occur. If not provided, the string is splitted at whitespaces.
  • maxsplit (optional) - Maximum number of splits. If not provided, there is no limit on the number of splits.

split() Return Value

The split() method returns a list of strings.

Dig DNS Records in a Sample Python Program

This article covers how to dig DNS records by using a simple python program with the use of the python module dnspython. In fact, A Python program is useful to find either a single record type at a time or all record types of a domain name. 

The dig lookup runs queries against DNS servers to retrieve DNS records for a specific name (FQDN - fully qualified domain name). It is possible to lookup any DNS record in this manner.

Install SQLite on Debian 11 - Step by step guide ?

This article covers how to install the latest version of SQLite on Debian 11 Bullseye. In fact, SQLite is a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine. 

Python isnumeric() Method - Explained with Examples

This article covers how to use the isnumeric() method in Python. In fact, the isnumeric() method returns True if all characters in a string are numeric characters. If not, it returns False.

A numeric character has following properties:

  • Numeric_Type=Decimal
  • Numeric_Type=Digit
  • Numeric_Type=Numeric

Python isinstance() Function - Explained with examples

This article covers how to use the isinstance() function in Python. In fact, the isinstance() function checks if the object (first argument) is an instance or subclass of classinfo class (second argument).

isinstance Return Value

isinstance() returns:

  • True if the object is an instance or subclass of a class or any element of the tuple.
  • False otherwise.

If classinfo is not a type or tuple of types, a TypeError exception is raised.

Strip() Function in Python

This article covers how to use the strip() function in Python. In fact, the Python strip() method removes any spaces or specified characters at the start and end of a string. strip() returns a new string without the characters you have specified to remove.

The syntax for the strip() method is:

" TEST ".strip()

Python String Lower() and Upper()

This article covers how to use the lower() and upper() functions in Python. In fact, the upper() method converts all lowercase characters in a string into uppercase characters and returns it while the lower() method converts all uppercase characters in a string into lowercase characters and returns it.

Install Python 3.11 on Ubuntu 20.04 - Step by step guide ?

This article covers how to install Python 3.11 on Ubuntu 20.04 LTS Focal Fossa using the PPA by Snakeyes or compiling from source and learning how to create a quick virtual environment.

Install the Erlang Programming Language on Ubuntu 20.04 - Step by step guide ?

This article covers how to install the Erlang programming language on your Ubuntu 20.04 LTS Focal Fossa system. In fact, Erlang is a programming language used to build massively scalable soft real-time systems with requirements on high availability. Some of its uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang's runtime system has built-in support for concurrency, distribution and fault tolerance.

Methods to List All Available Commands and Aliases in Linux

This article covers how to list all the available commands and aliases that we can run on Linux. In fact, The compgen is bash built-in command and it will show all available commands, aliases, and functions for you. This command works under Linux, macOS, *BSD and Unix-like system when Bash shell is installed. 

Python If Else Statement - Explained with Examples

This article covers how to use the if else statement in Python. In fact, An if else Python statement evaluates whether an expression is true or false. If a condition is true, the "if" statement executes. Otherwise, the "else" statement executes. Python if else statements help coders control the flow of their programs.

Python Conditions and If statements

Python supports the usual logical conditions from mathematics:

  • Equals: a == b
  • Not Equals: a != b
  • Less than: a < b
  • Less than or equal to: a <= b
  • Greater than: a > b
  • Greater than or equal to: a >= b

Python Nested if statements

We can have a if...elif...else statement inside another if...elif...else statement. This is called nesting in computer programming.

Any number of these statements can be nested inside one another. Indentation is the only way to figure out the level of nesting. They can get confusing, so they must be avoided unless necessary.

Python Nested if Example

'''In this program, we input a number

check if the number is positive or

negative or zero and display

an appropriate message

This time we use nested if statement'''

num = float(input("Enter a number: "))
if num >= 0:
    if num == 0:
        print("Positive number")
    print("Negative number")

Output 1 will give:

Enter a number: 5
Positive number

Output 2 will give:

Enter a number: -1
Negative number

Output 3 will give:

Enter a number: 0

Python Arrays in Linux - Explained with examples

This article covers how to use Array in Python. In fact, An array is a special variable, which can hold more than one value at a time.

Python Lists Vs Arrays

In Python, we can treat lists as arrays. However, we cannot constrain the type of elements stored in a list. 

For example:

# elements of different types
a = [1, 3.5, "Hello"] 
If you create arrays using the array module, all elements of the array must be of the same numeric type.
import array as arr
# Error
a = arr.array('d', [1, 3.5, "Hello"])

Output will give:

Traceback (most recent call last):
  File "<string>", line 3, in <module>
    a = arr.array('d', [1, 3.5, "Hello"])
TypeError: must be real number, not str

Install VLC Media Player on Fedora 35 - Step by step guide ?

This article covers how to install the VLC Media Player on your Fedora 35 system. In fact, The VLC media player is an open-source, free portable, cross-platform media player software and streaming media server developed by the VideoLAN project.

How to Install VLC on Fedora via Snaps ?

1. Enable snapd

Snap can be installed on Fedora from the command line:

$ sudo dnf install snapd

2. Enable snap support

To enable classic snap support, enter the following to create a symbolic link between /var/lib/snapd/snap and /snap:

$ sudo ln -s /var/lib/snapd/snap /snap

3. Install VLC

To install VLC, simply use the following command:

$ sudo snap install vlc

Python float() Function in Linux - Step by step guide ?

This article covers how to use the float() function in Python. In fact, the float() method returns a floating point number from a number or a string. There are two number types in Python: floating-point numbers (floats) and integers. While floats can contain decimals, integers cannot.

float() Return Value

The float() method returns:

  • Equivalent floating point number if an argument is passed.
  • 0.0 if no arguments passed.
  • OverflowError exception if the argument is outside the range of Python float.

Python pow() Function in Linux - Step by step Guide ?

This article covers how to use the Python pow() function. In fact, the pow() function returns the value of x to the power of y (xy). If a third parameter is present, it returns x to the power of y, modulus z.

Python filter() Function - Explained with Examples

This article covers how to use the filter() function in Python. In tact, the filter() function extracts elements from an iterable (list, tuple etc.) for which a function returns True.

filter() Arguments

The filter() function takes two arguments:

  • function - a function.
  • iterable - an iterable like sets, lists, tuples etc.

Python round() Function in Linux

This article covers how to use the round() function in Python. In fact, the round() function returns a floating-point number rounded to the specified number of decimals.

round() Return Value

The round() function returns the:

  • nearest integer to the given number if ndigits is not provided.
  • number rounded off to the ndigits digits if ndigits is provided.

Install Komodo Edit on Ubuntu 20.04 LTS - Step by step guide ?

This article covers the process of installing the Komodo Edit on your Ubuntu 20.04 LTS Focal Fossa system. In fact, Komodo Edit is a free multi-language code editor that supports Python, Perl, Ruby, HTML/CSS, JavaScript and so on.

Main features of the Komodo editing free text editor:

  • Komodo Edit is an excellent code editor similar (not the same) to Notepad ++ found in Windows and other operating systems.
  • We will find this program available for Mac, Windows and Gnu / Linux.
  • We can use this application to program using multiple programming languages, like PHP, CSS, Ruby, HTML, SQL, XML, and many more.
  • Supports the fautomatic code completion and syntax highlighting.
  • We will have the possibility to obtain a preview of the web page that we are designing.
  • It is available for operating systems of 32 bit and 64 bit.
  • The free text editor Komodo supports macros.
  • We can download the source code of this application from your github page.

Python sum() Function in Linux - Step by step guide ?

This article covers how to use the sum() function in Python. In fact, the sum() function adds the items of an iterable and returns the sum. Also it calculates the total of all numerical values in an iterable. sum() works with both integers and floating-point numbers. The sum() function has an optional parameter to add a number to the total.

Python len() Function - With examples ?

This article covers how to use the len() function in Python. In fact, the Python len() method is a built-in function that can be used to calculate the length of any iterable object. So, if you want to get the length of a string, list, dictionary, or another iterable object in Python, the len() method can be useful.

Python slice() Function in Linux

This article covers how to use the slice() function in Python. In fact, the slice() function returns a slice object that is used to slice any sequence (string, tuple, list, range, or bytes).

Example of slice() function in Python:

text = 'Python Programing'
# get slice object to slice Python
sliced_text = slice(6)

The will be Output: 


Install NumPy on Ubuntu 20.04 LTS - Step by step guide ?

This article covers how to install Numpy on Ubuntu 20.04. In fact, NumPy(Numerical Python) is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-levelmathematicalfunctions to operate on these arrays.

Python next() Function in Linux

This article covers how to use the next() function in Python. In fact, The next() function returns the next item in an iterator. You can add a default return value, to return if the iterable has reached to its end.

Install Tesseract on Linux Mint 20 - Step by step guide ?

This article covers the installation procedure of Tesseract OCR on a Linux Mint 20 system. In fact, Tesseract is an optical text recognition (OCR) engine developed by Google used for recognizing a text in image. 

How to Install Tesseract OCR on Ubuntu ?

1. Add the Tesseract OCR repository:

$ sudo add-apt-repository -y ppa:alex-p/tesseract-ocr-devel

2. Install Tesseract OCR 5:

$ sudo apt install -y tesseract-ocr

3. When installation is finished, we can check Tesseract OCR version:

$ tesseract --version

How to Uninstall Tesseract OCR from Ubuntu Linux system ?

If you decided to completely remove Tesseract OCR and related dependencies, run the following command:

$ sudo apt purge --autoremove -y tesseract-ocr

2. Remove GPG key and repository:

$ sudo rm -rf /etc/apt/trusted.gpg.d/alex-p_ubuntu_tesseract-ocr-devel.gpg
$ sudo rm -rf /etc/apt/sources.list.d/alex-p-ubuntu-tesseract-ocr-devel-focal.list

Best 8 Open-Source E-commerce Software

This article covers the market-leading and most competitive eCommerce platforms. In fact, Startups and small budget business can think of having their online presence by taking complete advantage of the free and open source eCommerce software solutions. These includes WooCommerce, OpenCart, PrestaShop Zen Cart, Magento, Drupal Commerce, Spree, and Virtue Mart.

Install EasyOCR on Linux Mint 20 - Step by step guide ?

This article covers the process of installing EasyOCR on Linux Mint 20. In fact, EasyOCR command line tool is an open source application which can be used to identify and extract text from images. It uses Optical Character Recognition (OCR) technology and a variety of different algorithms and language models to detect the text.

Python For Loops in Linux - Step by step guide ?

This article covers how to use the for loop in Python. In fact, Python loops help to iterate over a list, tuple, string, dictionary, and a set.

There are two types of loop supported in Python "for" and "while". The block of code is executed multiple times inside the loop until the condition fails.

Python range() function in Linux

This article covers how to use the range() function in Python via examples. In fact, The range() function is used to generate a sequence of numbers over time. At its simplest, it accepts an integer and returns a range object (a type of iterable). In Python 2, the range() returns a list which is not very efficient to handle large data.

Python ord() function in Linux

This article covers how to use the ord() function in Python. In fact, The ord() function (short of ordinal) returns an integer representing the character passed to it. For ASCII characters, the returned value is 7-bit ASCII code, and for Unicode characters, it refers to the Unicode code point.

Python divmod() function in Linux

This article covers how to use the divmod() function in Python. In fact, Python divmod() function is employed to return a tuple that contains the value of the quotient and therefore the remainder when dividend is divided by the divisor. It takes two parameters where the first one is the dividend and the second one is the divisor.

Python divmod() function Parameter Values:

  • divident - This parameter contains the number you want to divide.
  • divisor - This parameter contains the number you want to divide with.

Install Pip on Linux Mint 20 - step by step guide ?

This article covers the process of installing the latest version of Pip Python on the Linux Mint system. In fact, Pip (recursive acronym for "Pip Installs Packages" or "Pip Installs Python") is a cross-platform package manager for installing and managing Python packages (which can be found in the Python Package Index (PyPI)) that comes with Python 2 >=2.7.9 or Python 3 >=3.4 binaries that are downloaded from python.org.

How to Install PIP in Linux Systems ?

To install pip in Linux, run the appropriate command for your distribution as follows:

1. Install PIP On Debian/Ubuntu

# apt install python-pip	#python 2
# apt install python3-pip #python 3

2. Install PIP On CentOS and RHEL

Unluckily, pip is not packaged in official software repositories of CentOS/RHEL. So you need to enable the EPEL repository and then install it like this:

# yum install epel-release 
# yum install python-pip

3. Install PIP on Fedora:

# dnf install python-pip	#Python 2
# dnf install python3 #Python 3

4. Install PIP on Arch Linux:

# pacman -S python2-pip	        #Python 2
# pacman -S python-pip         #Python 3

5. Install PIP on openSUSE:

# zypper install python-pip	#Python 2
# zypper install python3-pip #Python 3

How to Use PIP in Linux Systems ?

To install, uninstall or search new packages, use these commands:

# pip install packageName
# pip uninstall packageName
# pip search packageName

To see a list of all commands type:

# pip help

Install SQLite on Ubuntu 20.04 LTS - Step by step guide ?

This article covers the process of installing SQLite on Ubuntu 20.04 LTS Focal Fossa system. In fact, Sqlite is a lightweight but feature-rich database management system that is widely used in embedded systems like mobile devices.

Python abs() function in Linux

This article covers how to use Python abs() function. In fact, The Python abs() method calculates the absolute value of a number. The abs() method takes in one parameter: the number whose absolute value you want to calculate.

Python input() Function in Linux

This article covers how to use the input() function in Python. In fact, The input() function in Python makes it very easy to get input from users of your application. The input function is built in just like the print function and its use is quite common. When you call the input function(), you can think of it as an expression that evaluates to whatever the user typed in at the prompt. This always gets returned as a string so if you want to use numbers as input, you will need to handle that by using the int() function.

Python bool() Function in Linux

This article covers how to use the bool() function in Python. In fact, The bool() method is a built-in Python method that applies the standard truth testing procedure to the passed object/value and returns a boolean value. Moreover, the bool class cannot be sub-classed. Its only instances are False and True.

Install Python 3.10 on Rocky 8 - A step by step process ?

This article covers the process of installing Python 3.10 on Rocky Linux 8. In fact, Python is one of the most popular high-level languages, focusing on high-level and object-oriented applications from simple scrips to complex machine learning algorithms.

Python any() Function in Linux

This article covers how to use any() function in Python. In fact, The any() function returns True if any item in an iterable are true, otherwise it returns False. If the iterable object is empty, the any() function will return False.

Python sorted() Function

This article covers how to use the sorted() function in Python through examples. In fact, The sorted() function returns a sorted list of the specified iterable object. You can specify ascending or descending order. Strings are sorted alphabetically, and numbers are sorted numerically.

Parameters for python sorted function Syntax is given below:

Sorted(iterable, key, reverse)

Is a Python dictionary sorted?

Yes, a dictionary(collection of items in which the items are stored as key-value pairs) in Python can be sorted based on the order of item insertion. But, it was not possible in the earlier versions. 

Python super() Function

This article covers how to use the super() function in Python. The super() builtin returns a proxy object (temporary object of the superclass) that allows us to access methods of the base class.

Set / Unset Environment Variables in Linux

This article covers how to set and unset both local and persistent environment variables in Linux. In fact, every time you start a shell session in Linux, the system goes through configuration files and sets up the environment accordingly. Environment variables play a significant role in this process.

Environment variables are a set of key value pairs stored on your Linux and used by processes in order to be able to perform specific operations. with the export command but also by modifying some system files to make them persistent.

How to Set Environment Variables on Linux using export ?

The easiest way to set environment variables is to use the export command:

$ export VAR="value"

How to Unset Environment Variables on Linux Using unset command ?

To unset an environment variable, use the unset command with the following syntax:

$ unset <variable>

Common Set of Environment Variables on Linux:

  • USER : the current username of the user using the system;
  • EDITOR : the program run to perform file edits on your host;
  • HOME : the home directory of the current user;
  • PATH : a colon separated list of directories where the system looks for commands;
  • PS1 : the primary prompt string (to define the display of the shell prompt);
  • PWD : the current working directory;
  • _ : the most recent command executed on the system (by the user)
  • MAIL : the path to the current user’s mailbox;
  • SHELL : the shell used in order to interpret commands on the system, it can be many different ones (like bash, sh, zsh or others);
  • LANG : the language encoding used on the system;
  • DESKTOP_SESSION : the current desktop used on your host (GNOME, KDE)
  • HISTFILESIZE : number of lines of command history stored in the history file;
  • HISTSIZE : number of lines of history allowed in memory;
  • UID : the current UID for the user.

Install Pelican on Ubuntu 20.04 - Best Method ?

This article covers how to install Pelican using pip on Ubuntu 20.04 LTS. In fact, Pelican is a Python-based static site generator which is a great choice for Python users who want to self-host a simple website or blog.

To Install pelican package on Ubuntu, simply execute the following command on terminal:

$ sudo apt-get update
$ sudo apt-get install pelican

How to install pelican-foli on Ubuntu via Snaps ? 

1. Enable snapd

snapd can be installed from the command line:

$ sudo apt update
$ sudo apt install snapd

2. Install pelican-foli, simply use the following command:

$ sudo snap install pelican-foli

Install Pip on Ubuntu 18.04 System - Step by Step Procedure ?

This article covers how to install PIP on Ubuntu 18.04 for Python 3 and Python 2. In fact, PIP is the default package manager for Python packages which allows you to install, and manage Python packages in an easy and convenient manner. 

How to Install pip for Python3 ?

Pip3 can be installed on Ubuntu using the APT package manager. 

1. To start off, update the package lists as shown:

$ sudo apt update

2. To install pip3 run the command:

$ sudo apt install python3-pip

3. Verify that pip3 is installed by running the command:

$ pip3 --version

For assistance on more command options and usage of pip3, run the below command:

$ pip3 --help

Install Python on Ubuntu 18.04 - Step by Step Process ?

This article covers the different ways to install Python on Ubuntu Linux system. In fact, Python is an object-oriented, high-level programming language. It is open-source with a large community. Python is used as a key language among the top tech companies like Google. Now you can start developing your Python 3 project.

Python List reverse() - An overview ?

This article covers a detailed instructions on how to use the reverse() method and a few ways to reverse a list in Python. In fact, Python List reverse() function allows the programmer to reverse the sorting order of the elements stored in the lists.

Python's map() Function - An Overview ?

This article covers how to use the map() function in Python. In fact, map() function returns a map object(which is an iterator) of the results after applying the given function to each item of a given iterable (list, tuple etc.). Sometimes you might face situations in which you need to perform the same operation on all the items of an input iterable to build a new iterable. The quickest and most common approach to this problem is to use a Python for loop. However, you can also tackle this problem without an explicit loop by using map().

Install Jupyter Notebook on Ubuntu 20.04 - A step by Step guide ?

This article covers how to install the Jupyter Notebook web application on Ubuntu 20.04. In fact, Jupyter Notebook is easy to install and can be used to streamline numerical simulation, data transformation & cleaning, machine learning, and statistical modeling.

To install Pip, Python, and Python development, simply run the below command:

$ sudo apt-get -y install python3python-pip python-dev

The command above will install the most recent version of Python and Python Pip; a reliable Python package manager that makes it easy to manage the Python packages. In addition, Python Development will be installed.

Bash Shebang in Linux - An Overview ?

This article covers how to use bash shebang in Linux. In fact, the first line in the scripts starts with the #! characters and the path to the Bash interpreter is called shebang and is used to tell the operating system which interpreter to use to parse the rest of the file.

The #! syntax used in scripts to indicate an interpreter for execution under UNIX / Linux operating systems. Most Linux shell and perl / python script starts with the following line:









#!/usr/bin/env bash

sh is the standard command interpreter for the system. The current version of sh is in the process of being changed to conform with the POSIX 1003.2 and 1003.2a specifications for the shell.

Reverse a String in Python - How to do it ?

This article covers the procedure on how to reverse a string in Python. Strings can be reversed using slicing. To reverse a string, we simply create a slice that starts with the length of the string, and ends at index 0.

To reverse a string using slicing, write:

$ stringname[stringlength::-1] # method 1 

Or write without specifying the length of the string:

$ stringname[::-1] # method2

The slice statement means start at string length, end at position 0, move with the step -1 (or one step backward).

11 Strace Command with Examples in Linux

This article covers strace utility tool and when It can be used. In fact, you will see how to use strace commands to troubleshoot and debug system calls and processes.

Also, Strace monitors the system calls and signals of a specific program. It is helpful when you do not have the source code and would like to debug the execution of a program. strace provides you the execution sequence of a binary from start to end.

Top 10 Open-Source Application Performance Monitoring (APM) Software for Better Visibility

This article covers what APM software is all about, its benefits, and the top open-source APM software to help you monitor, troubleshoot, and optimize your apps. In fact, OpenAPM shows you which open source Application Performance Management tools are suitable for your stack. We discussed the best open-source APM tools such as Apache Skywalking, Signoz, Pinpoint, Stagemonitor, Metrics, Scouter, Hypertrace, and AppPerf. 

APM software plays a significant role in making sure the app performance is solid and meets user expectations. It can identify issues and notify you so you can make quick fixes and improve its performance.

Importance of Application Performance Monitoring tools:

  • Speed up your development lifecycle.
  • Perform code audits.
  • Gain an understanding of which features are really being used by your customers.
  • Understand application dependencies.
  • Uncover performance problems.
  • Increase your confidence in the software you release.
  • Monitor the impact of your code changes.
  • User experience monitoring. Sometimes this is known as Real User Monitoring (RUM).
  • Network Monitoring and Network Performance.

DockerSlim to Minify, Optimize, and Secure Docker Container in Linux

This article covers how to install DockerSlim in the Linux system and how it can be used to optimize and secure Docker containers. DockerSlim has an interactive shell that you can use to slim and secure your containers.

You can open DockerSlim shell by typing docker-slim on you terminal.

The basic commands for dockerslim include:

  • Build – Analyzes, profiles and optimizes your container image then generates the supported security profiles.
  • xray – Used to perform a static analysis of a container image, you can use this command if you want to see what makes the container fat.
  • lint – Used to analyse container instructions in a DockerFile.
  • profile – Used to perform an analysis of the container image without generating an optimized image.

Install Duplicity on Ubuntu 20.04 - Best Method ?

This article covers the process to install duplicity on Ubuntu 20.04 and how to use it. Duplicity is an open-source tool that helps people create backups of their data. It basically just encrypts the user's data and stores it into a remote server. It's a very convenient and smart way to back up data, as it does not only store the data but also any changes made to it in the long run. This attribute makes Duplicity very space-efficient.

To Install Duplicity on Ubuntu 20.04 LTS,

1. Update the Package Repository:

$ sudo apt-get update -y

2. After updating the repository, consider running the following command to install duplicity:

$ sudo apt-get install -y duplicity

3. Verify the Installation:

$ apt-cache policy duplicity

Install KDevelop in Ubuntu 20.04 - Best Method ?

This article covers How to Install kdevelop in Ubuntu Linux System. KDevelop is a robust IDE that includes useful extensions, and also several high-quality features. KDevelop is a great option of IDE for Linux distributions due because of its stability and security.

To Install kdevelop software package in Ubuntu, run the following command:

$ sudo apt-get update
$ sudo apt-get install kdevelop

Install Django on Ubuntu 20.04 - Best Method ?

This article covers the different methods of Installing Django on Ubuntu 20.04. With it, you can easily perform creation of Django applications, superuser creation, and removal of Django. 

Django is a full-featured Python web framework for developing dynamic websites and applications. Using Django, you can quickly create Python web applications and rely on the framework to do a good deal of the heavy lifting.

How to install Django from Ubuntu repositories ?

1. First, update your local package index with apt:

$ sudo apt update

2. Next, check which version of Python you have installed. 18.04 ships with Python 3.6 by default, which you can verify by typing:

$ python3 -V

Top 5 Languages for Automation in Linux

This article covers software programming languages which are the top-rated languages being used by the quality assurance engineers for designing and developing the most efficient and reliable test automation software. Python, Java, C#, JavaScript and Ruby, all are well-acclaimed programming languages to deliver and support test automation for software applications developed in any of the platforms.

Automation testing is one of the booming demands of all organizations across the globe. Many quality assurance engineers face a key challenge in setting up an environment capable of most seamlessly testing the developed software against the documented test cases and requirements. Verifying and validating all the test case scenarios is a tedious task to perform thereby giving rise to the need for automation testing. Automation testing significantly enhances and improves the software testing processes.

Python Get Current Directory

This article covers how to use the 'os. getcwd()' method to easily get the python current working directory. When you run a Python script, the current working directory is set to the directory from which the script is executed.

The os python module provides a portable way to interact with the operating system. The module is part of the standard Python library and includes methods for finding and changing the current working directory.

Basically, In Python, you can get and change (set) the current working directory with os.getcwd() and os.chdir().

os module is included in the standard library, so no additional installation is required.

To Get the current working directory: os.getcwd()

To Change the current working directory: os.chdir()

How to Get the current working directory: os.getcwd() ?

1. os.getcwd() returns the absolute path of the working directory where Python is currently running as a string str.

2. getcwd stands for "get current working directory", and the Unix command pwd stands for "print working directory".

Secure Nginx with Let's Encrypt on Ubuntu 18.04 - How to do it ?

This article covers how to install certbot client, obtain Let's Encrypt SSL certificate and configured to Nginx to use the certificates. Also, you will learn how to set up a cronjob for automatic certificate renewal.

Let's Encrypt is a Certificate Authority (CA) that provides an easy way to obtain and install free TLS/SSL certificates, thereby enabling encrypted HTTPS on web servers. 

To Install Certbot on Ubuntu:

1. First, add the repository.

$ sudo add-apt-repository ppa:certbot/certbot

You'll need to press ENTER to accept.

2. Install Certbot's Nginx package with apt:

$ sudo apt install python-certbot-nginx

Secure Apache with Let's Encrypt on CentOS 7 - Step by Step Process ?

This article covers how to secure Apache with Let's Encrypt SSL on CentOS 7 using Certbot client. Also, you will learn how to set up a cronjob for automatic certificate renewal. Basically, A security certificate is critical for securing traffic sent from web browsers to web servers. Let's Encrypt certificate is a free, open and automated certificate authority that you can use to encrypt your site. The certificate expires after every 90 days and auto-renews at absolutely no cost.

To Install Certbot in CentOS 8.

Certbot is a client that automates the installation of the security certificate. It fetches the certificate from Let's encrypt authority and deploys it on your web server without much of a hassle.

1. Before downloading certbot, first, install packages that are necessary for the configuration of an encrypted connection:

$ sudo dnf install mod_ssl openssl

2. Download certbot using the curl command:

$ sudo curl -O https://dl.eff.org/certbot-auto

3. Next, move the certbot file to the /usr/local/bin directory and assign the execute file permissions:

$ sudo mv certbot-auto /usr/local/bin
$ sudo chmod 755 /usr/local/bin/certbot-auto

To Assign the permissions to the Document root of a domain:

$ sudo chown -R apache:apache /var/www/domain.com

For the changes to come into effect, restart the Apache service:

$ sudo systemctl restart httpd

Abstract Factory – Design Patterns in Python

This article covers Abstract Factory design pattern in Python.

Basically, The Abstract Factory design pattern can also be used to create cross-platform UIs without coupling the client code to concrete UI classes and keeping all created views consistent with different operating systems.

Abstract Factory is a creational design pattern, which solves the problem of creating entire product families without specifying their concrete classes.

Abstract Factory Method is a Creational Design pattern that allows you to produce the families of related objects without specifying their concrete classes.
Using the abstract factory method, we have the easiest ways to produce a similar type of many objects.
It provides a way to encapsulate a group of individual factories.

Advantages of using Abstract Factory method:
This pattern is particularly useful when the client doesn’t know exactly what type to create.
1. It is easy to introduce the new variants of the products without breaking the existing client code.
2. Products which we are getting from factory are surely compatible with each other.

Disadvantages of using Abstract Factory method:
1. Our simple code may become complicated due to the existence of lot of classes.
2. We end up with huge number of small fies i.e, cluttering of files.

Examples of Factory pattern in Python:
1. With the Factory pattern, you produce instances of implementations (Apple, Banana, Cherry, etc.) of a particular interface -- say, IFruit.
2. With the Abstract Factory pattern, you provide a way for anyone to provide their own factory. This allows your warehouse to be either an IFruitFactory or an IJuiceFactory, without requiring your warehouse to know anything about fruits or juices.

Install Atom editor on CentOS 8 - Step by Step Process ?

This article covers how to install atom editor on CentOS 8 using the command-line application.

Atom is a free and open-source text and source code editor for OS X, Linux, and Windows with support for plug-ins written in Node.js, and embedded Git Control, developed by GitHub

To install latest version of Atom using .rpm package on your CentOS 8 machine:
1. First, go to the Atom official website and download the Atom .rpm package:

# sudo curl -SLo atom.x86_64.rpm  https://atom.io/download/rpm

2. You can now install Atom using dnf command:

# sudo dnf localinstall atom.x86_64.rpm

3. Now that Atom is installed on your CentOS system you can launch it from the command line by typing atom or by clicking on the Atom icon (Applications -> Programming -> Atom).

Install Python 3.9 on Ubuntu 20.04 - Step by Step Process ?

This article covers how to install and compile Python3.9 using different methods, using PPA repo, compiling it from the source code, and installing it using the Linuxbrew tool.

We can now start using Python 3.9 for our projects.

Python is a high-level programming language, mostly used to write scripting and automation. It is a very popular language known for its simplicity and easy syntax. 

Python one of the best language for for artificial intelligence (AI).

To Install Python 3.9 on Ubuntu 20.04 using APT:

1. Update package list, type:

$ sudo apt update

2. Install software-properties-common package to easily manage distribution and independent software vendor software sources:

$ sudo apt install software-properties-common
$ sudo add-apt-repository ppa:deadsnakes/ppa

3. Now install python 3.9 using apt command:

$ sudo apt-get install python3.9

4. The following command can help to identify the proper install location of Python:

$ which python3

The execution of the above command produces the following output on console:


Unit Testing in Python - A Quick Overview ?

This article covers the concept of Unit Testing in Python. Testing in Python is a huge topic and can come with a lot of complexity, but it doesn't need to be hard. You can get started creating simple tests for your application in a few easy steps and then build on it from there.

Here, You'll learn about the tools available to write and execute tests, check your application's performance, and even look for security issues.

pytest supports execution of unittest test cases. The real advantage of pytest comes by writing pytest test cases. pytest test cases are a series of functions in a Python file starting with the name test_.

pytest has some other great features:

1. Support for the built-in assert statement instead of using special self.assert*() methods

2. Support for filtering for test cases

3. Ability to rerun from the last failing test

4. An ecosystem of hundreds of plugins to extend the functionality

Running Your Tests From Visual Studio Code

If you're using the Microsoft Visual Studio Code IDE, support for unittest, nose, and pytest execution is built into the Python plugin.

If you have the Python plugin installed, you can set up the configuration of your tests by opening the Command Palette with Ctrl+Shift+P and typing "Python test". 

How to Use unittest and Flask

Flask requires that the app be imported and then set in test mode. You can instantiate a test client and use the test client to make requests to any routes in your application.

All of the test client instantiation is done in the setUp method of your test case. In the following example, my_app is the name of the application. Don’t worry if you don’t know what setUp does. You’ll learn about that in the More Advanced Testing Scenarios section.

The code within your test file should look like this:

import my_app
import unittest

class MyTestCase(unittest.TestCase):
    def setUp(self):
        my_app.app.testing = True
        self.app = my_app.app.test_client()
    def test_home(self):
        result = self.app.get('/')
        # Make your assertions

You can then execute the test cases using the python -m unittest discover command.

An Introduction to Python Async IO

This article covers an Overview of Async IO in Python. Python 3's asyncio module provides fundamental tools for implementing asynchronous I/O in Python. It was introduced in Python 3.4, and with each subsequent minor release, the module has evolved significantly.

Asyncio is the standard library package with Python that aims to help you write asynchronous code by giving you an easy way to write, execute, and structure your coroutines. 

The Asyncio library is for concurrency, which is not to be confused with parallelism.

Concurrency does not mean Parallelism and vice-versa.

We can combine them both. 

We can have multiple threads, running Tasks parallely but each thread may not be running Tasks concurrently. 


1. Asynchronous IO (async IO): a language-agnostic paradigm (model) that has implementations across a host of programming languages.

2. async/await: two new Python keywords that are used to define coroutines.

3. asyncio: the Python package that provides a foundation and API for running and managing coroutines.

Install Atom Text Editor on Debian 10 - Step by Step Process ?

This article covers how to install Atom text editor on the Debian system. Atom is a very powerful text editor.

The Atom user interface is very clean and it has support for many important features such as split view, Git integration and so on. Atom is cross platform. It runs on Linux, Windows and macOS.

To Enable snaps on Debian and install Atom:

Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. They update automatically and roll back gracefully. 

1. Enable snapd

$ sudo apt update
$ sudo apt install snapd
$ sudo snap install core

2. To install Atom, simply use the following command:

$ sudo snap install atom --classic

To Update Atom Text Editor on Debian:

You can update the Atom when a new version is available. You can update it through your desktop standard Software Update tool. 

Alternatively, you can update by running the following commands in your terminal:

$ sudo apt update
$ sudo apt upgrade

Notch Up Producer-Consumer Paradigm with Python

This article covers how producer-Consumer pattern is a very useful design which can be leveraged to a varied extent in order to enable asynchronous processing of multiple time-consuming tasks. The concept has been widely incorporated in modern-day messaging queues viz. Kafka, RabbitMQ, Cloud MQs provided by AWS, GCP, and so on.

Python provide Queue class which implements queue data structure. We can put an item inside the queue and we can get an item from the queue. By default this works in FIFO (First In First Out) manner.

The function producer will put an item inside queue and function consumer will get an item from the queue. We will use following method of queue class by instantiating queue object q = Queue().

Queue Method Python:

q.put(): To put an item inside queue.

q.get(): To get an item which is present inside queue.

q.join(): This method stops python program from exiting till it gets signal from the below method task_done. Hence this method should always be used in conjunction with method task_done

q.task_done(): This method should be called when item got outside from the queue using q.get() has been completely processed by consumer. When all items make call to their respective task_done it sends signals to q.join() that all items have been processed and program can exit.

Threads class Python:

Python allows writing multi-threaded program using Thread class. We will instantiate object of thread class and make use of following methods to process (consume) multiple items concurrently:

t = Thread(target=consumer): Instantiate thread object which would make call to function consumer.

t.start(): Starts execution of thread by making call to function consumer.

Install Atom Editor on Ubuntu 20.04 - Step by step process ?

This article covers the different methods to install Atom editor on Ubuntu 20.04 system. Atom is an open-source text and source code editor for Windows, Linux, and macOS, developed by GitHub. 

It is called "A hackable text editor for the 21st century" due to being a highly customizable text editor.

To Install Atom Editor using Snap:

1. First, install the Snap package manager on your system if it is not already installed.

$ sudo apt update && sudo apt install -y snapd

2. Then, install Atom editor with the snap command.

$ sudo snap install atom --classic

Asynchronous Programming in Python - More about this ?

This article covers how to make applications performant and efficiently use CPU cycles and threads. However, it is not all rainbows and unicorns when talking about asynchronous code.

Asynchronous programming is a type of parallel programming in which a unit of work is allowed to run separately from the primary application thread. When the work is complete, it notifies the main thread about completion or failure of the worker thread. 

There are numerous benefits to using it, such as improved application performance and enhanced responsiveness.

On the other hand, A synchronous program is executed one step at a time. Even with conditional branching, loops and function calls, you can still think about the code in terms of taking one execution step at a time. When each step is complete, the program moves on to the next one.

Examples of synchronous program:

1. Batch processing programs are often created as synchronous programs. You get some input, process it, and create some output. Steps follow one after the other until the program reaches the desired output. The program only needs to pay attention to the steps and their order.

2. Command-line programs are small, quick processes that run in a terminal. These scripts are used to create something, transform one thing into something else, generate a report, or perhaps list out some data. This can be expressed as a series of program steps that are executed sequentially until the program is done.

Download YouTube Videos on Ubuntu Linux - How to do it ?

This article covers how you can download YouTube videos on Linux using the youtube-dl utility. The youtube-dl is a handy utility with a large feature set. However, there is a lot more you can do with this utility. To explore more features, visit its official documentation . To play the downloaded videos, you can use any media players like VLC , FFmpeg , and so on.

youtube-dl is a command-line program that lets you easily download videos and audio from more than a thousand websites. 

youtube-dl is a Python based small command-line tool that allows to download videos from YouTube.com, Dailymotion, Google Video, Photobucket, Facebook, Yahoo, Metacafe, Depositfiles and few more similar sites. 

It written in pygtk and requires Python interpreter to run this program, it's not platform restricted. It should run on any Unix, Windows or in Mac OS X based systems.

To Install YouTube-DL in RHEL/CentOS and Fedora:

The youtube-dl program can be installed by enabling epel repository under your systems. Once enabled, you can install using 'yum' package manager tool:

$ yum install youtube-dl

Also, if you wish to add any third party repository, you can still install it right away using curl or wget command:

$ curl https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl


$ wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl

Your system must have curl or wget packages installed to fetch the recent version youtube-dl file. If you don't have them, you may yum to get it.

After fetching the file, you need to set a executable permission on the script to execute properly:

$ chmod a+rx /usr/local/bin/youtube-dl

To Install YouTube-DL in Ubuntu/Linux Mint and Debian:

$ sudo add-apt-repository ppa:nilarimogard/webupd8
$ sudo apt-get update
$ sudo apt-get install youtube-dl

Also, instead using any third party PPA, you can use curl or wget command to install latest version of youtube-dl script:

$ sudo curl https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl


$ sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl

After downloading the script, set the executable permission:

$ sudo chmod a+rx /usr/local/bin/youtube-dl

To Update YouTube-DL,

Youtube-dl itself can be updated to the latest version using the following command:

$ youtube-dl -U

Use Speedtest CLI to Test Internet Speed on Ubuntu 20.04 - How to perform this task ?

This article covers how to install and use the Speedtest CLI utility to test your Internet speed while using Ubuntu 20.04.

To check my Internet speed in Ubuntu:

1. Open the Ubuntu Terminal by pressing Ctrl+alt+T or through the Dash. 

2. Then enter the command to install python:

$ sudo apt-get install python-pip

Once python is successfully installed, use the command to install the speedtest-cli tool:

$ sudo pip install speedtest-cli

The tool will be installed in your system.

To check Your Internet Speed:

Run the following command to test your internet speed:

$ speedtest-cli

To share Internet Speed Test Results:

The speedtest-cli also lets you share your internet speed by providing a link on the speedtest.net website through the following command:

$ speedtest-cli --share

Install Flask on Ubuntu 20.04 - Step by Step process to implement it ?

This article covers how to install Flask on Ubuntu 20.04. Flask is a powerful web framework for any developer. Unlike Django , by default Flask doesn’t include ORM, form validation, or any other functionalities provided by third-party libraries. Flask is built with extensions in mind, which are Python packages that add functionality to a Flask application.

Flask packages are included in the official Ubuntu repositories and can be installed using the apt package manager. 

This is the simplest way to install Flask on Ubuntu 20.04, but not as flexible as installing in a virtual environment. 

Also, the version included in the repositories may lag behind the latest version of Flask.

To install Flask on Ubuntu 20.04:

1. Ubuntu 20.04 ships with Python 3.8. You can verify that Python is installed on your system by typing:

$ python3 -V

2. The recommended way to create a virtual environment is by using the venv module, which is provided by the python3-venv package. Run the following command to install the package:

$ sudo apt install python3-venv

3. Create a new directory for the Flask application and switch into it:

$ mkdir flask_app && cd flask_app

4. Run the following command inside the directory to create the virtual environment:

$ python3 -m venv venv

The command will create a directory called venv, which contains a copy of the Python binary, the Pip package manager , the standard Python library, and other supporting files. You can use any name you want for the virtual environment.

5. To start using the virtual environment, you need to activate it with the activate script:

source venv/bin/activate

6. Now that the virtual environment is activated, use the Python package manager pip to install Flask:

$ pip install Flask

7. To verify the installation, run the following command, which prints the Flask version:

$ python -m flask --version

Install and Run Python on CentOS 8 - How to do it ?

This article covers how to install python2 and python3 on CentOS 8. By default, python2 and python3 are not installed on CentOS 8. To install both, you need to install all python packages separately according to python versions. Also, you can run python2 and python3 environments on your system. 

The 'alternatives --auto python' command is used to set any python version as the default. 

To run Python in Linux:

A widely used way to run Python code is through an interactive session. 

To start a Python interactive session, just open a command-line or terminal and then type in python, or python3 depending on your Python installation, and then hit Enter .

Python comes preinstalled on most Linux distributions, and is available as a package on all others. 

However there are certain features you might want to use that are not available on your distro's package. 

You can easily compile the latest version of Python from source.

Installing Python 3 on Linux:

1. To see which version of Python 3 you have installed, open a command prompt and run

$ python3 --version

2. If you are using Ubuntu 16.10 or newer, then you can easily install Python 3.6 with the following commands:

$ sudo apt-get update

$ sudo apt-get install python3.6

3. If you're using another version of Ubuntu (e.g. the latest LTS release) or you want to use a more current Python, we recommend using the deadsnakes PPA to install Python 3.8:

$ sudo apt-get install software-properties-common

$ sudo add-apt-repository ppa:deadsnakes/ppa

$ sudo apt-get update

$ sudo apt-get install python3.8

4. If you are using other Linux distribution, chances are you already have Python 3 pre-installed as well. If not, use your distribution's package manager. For example on Fedora, you would use dnf:

$ sudo dnf install python3

To see if pip is installed, open a command prompt and run:

$ command -v pip

Install and Use TermRecord on CentOS 8 - Do it now

This article Covers how to install the TermRecord application on CentOS 8. The TermRecord application allows you to better enjoy the recorded #Terminal content. 

TermRecord is a simple, open source, terminal session recorder with easy-to-share self-contained HTML output.

#TermRecord Stores these files as your own notes, email them to collaborators, use them as instructional examples, or whatever you wish.

TermRecord consumes output from the script command with timing information and can create a self-contained HTML file which replays the recorded session without needing to load anything from the web. 

These term sessions can be emailed and viewed on practically any device (including iPads etc.). 

The end user only needs a modern browser.

Features of TermRecord includes:

1. User friendly.

2. Detects the terminal size.

3. Nest sessions.

4. Cross-platform HTML-based output.

5. Stores the output as either JSON, embeddable JavaScript, or a static HTML file.

6. Written in Python.

To install on TermRecord #CentOS:

1. First of all, connect to your server via SSH and make sure that all of your system software is up to date. 

Run the following command to update the package list and upgrade all of your system software to the latest version available:

$ sudo yum update -y

2. Install Pip. 

Add the EPEL Repository:

$sudo yum install epel-release

Install pip:

$ sudo yum install python-pip

Once the installation has completed, you can verify that it was successful by using the following command:

$pip -V

3. Install TermRecord

Install TermRecord using the Python package manager (pip):

$sudo pip install TermRecord

How to use TermRecord on CentOS system ?

Taking a video of the terminal with TermRecord is rather simple, just run the following command (be attentive to capital letters):

TermRecord -o record.html

Note: We specify the output file in which the video will be recorded using the -o option. the .html format is the default format.

For more complex operations check out TermRecord --help

Steps to install and use Python PIP tools on Ubuntu 20.04 LTS ?

This article will guide you on how to install Python PIP #tools on Ubuntu 20.04. Also, you learnt different commands which will help you in using the PIP tool. You can search, install and remove #packages by using the pip utility. Steps to Install Python #PIP Tool on #Ubuntu 20.04: 1. Update Your #APT. As always, first, update and upgrade your APT. 2. Add Universe #Repository. 3. Install PIP for Python 3. 4. Verify Installation. 5. Replace Keyword. 6. Install #Python Package. 7. Uninstall Excess Tools. 8. Additional #Commands.