Category Archives: Python

Difference between various Implementations of Python

When we speak of Python we often mean not just the language but also the implementation. Python is actually a specification for a language that can be implemented in many different ways. Background Before proceeding further let us understand the difference between bytecode and machine code(native code). Machine Code(aka native code) Machine code is set… Read More »

Simple Chat Room using Python

This article demonstrates – How to set up a simple Chat Room server and allow multiple clients to connect to it using a client-side script. The code uses the concept of sockets and threading. Socket programming Sockets can be thought of as endpoints in a communication channel that is bi-directional, and establishes communication between a… Read More »

Browser Automation Using Selenium

Selenium is a powerful tool for controlling web browser through program. It is functional for all browsers, works on all major OS and its scripts are written in various languages i.e Python, Java, C# etc, we will be working with Python. Mastering Selenium will help you automate your day to day tasks like controlling your… Read More »

OpenCV Python Program to analyze an image using Histogram

In this article, image analysis using Matplotlib and OpenCV is discussed. Let’s first understand how to experiment image data with various styles and how to represent with Histogram. Prerequisites: OpenCV matplotlib Importing image data import matplotlib.pyplot as plt #importing matplotlib The image should be used in a PNG file as matplotlib supports only PNG images.… Read More »

NetworkX : Python software package for study of complex networks

NetworkX is a Python language software package for the creation, manipulation, and study of the structure, dynamics, and function of complex networks. It is used to study large complex networks represented in form of graphs with nodes and edges. Using networkx we can load and store complex networks. We can generate many types of random… Read More »

Tracking bird migration using Python-3

One fascinating area of research uses GPS to track movements of animals. It is now possible to manufacture a small GPS device that is solar charged, so you don’t need to change batteries and use it to track flight patterns of birds. The data for this case study comes from the LifeWatch INBO project. Several… Read More »

Optimization Tips for Python Code

In this article, some interesting optimization tips for Faster Python Code are discussed. These techniques help to produce result faster in a python code. Use builtin functions and libraries: Builtin functions like map() are implemented in C code. So the interpreter doesn’t have to execute the loop, this gives a considerable speedup. The map() function… Read More »

Using else conditional statement with for loop in python

In most of the programming languages (C/C++, Java, etc), the use of else statement has been restricted with the if conditional statements. But Python also allows us to use the else condition with for loops. The else block just after for/while is executed only when the loop is NOT terminated by a break statement. Else… Read More »