Category Archives: GBlog

XML parsing in Python

This article focuses on how one can parse a given XML file and extract some useful data out of it in a structured way. XML: XML stands for eXtensible Markup Language. It was designed to store and transport data. It was designed to be both human- and machine-readable.That’s why, the design goals of XML emphasize… Read More »

Working with PDF files in Python

All of you must be familiar with what PDFs are. In-fact, they are one of the most important and widely used digital media.  PDF stands for Portable Document Format. It uses .pdf extension. It is used to present and exchange documents reliably, independent of software, hardware, or operating system. Invented by Adobe, PDF is now… Read More »

Packaging and Publishing Python code

If you have been coding in python, even for a while, you must be familiar with the concept of ‘pip’ by now. It is a package management system used to install and manage software packages/libraries written in Python. Then one may ask that where are all these packages/libraries stored? It is obvious that there must… Read More »

Software Framework vs Library

Many of us will be unaware of this difference which is really important to understand during development. The possible answer to this question, if asked, will be “Framework is a collection of various libraries”. However, this definition is not entirely true. “Who calls whom” i.e. the caller/callee relationship defines the difference between the two terms.… Read More »

Asymptotic Analysis and comparison of sorting algorithms

It is a well established fact that merge sort runs faster than insertion sort. Using asymptotic analysis we can prove that merge sort runs in O(nlogn) time and insertion sort takes O(n^2). It is obvious because merge sort uses a divide-and-conquer approach by recursively solving the problems where as insertion sort follows an incremental approach.… Read More »

A Group chat application in Java

In this post, a group chat application using MulticastSocket (Java Platform SE 7) class is discussed. A MulticastSocket is a (UDP) DatagramSocket, with additional capabilities for joining “groups” of other multicast hosts on the internet. Implementation Save the file as GroupChat.java and compile it using javac and then run the program using two command line… Read More »

Jar files in Java

A JAR (Java Archive) is a package file format typically used to aggregate many Java class files and associated metadata and resources (text, images, etc.) into one file to distribute application software or libraries on the Java platform. In simple words, a JAR file is a file that contains compressed version of .class files, audio… Read More »

Working with zip files in Python

This article explains how one can perform various operations on a zip file using a simple python program. What is a zip file? ZIP is an archive file format that supports lossless data compression. By lossless compression, we mean that the compression algorithm allows the original data to be perfectly reconstructed from the compressed data.… Read More »

Real-Time Edge Detection using OpenCV in Python

The objective of the program given is to perform edge detection of images in real-time. In this article, the popular canny edge detection algorithm is used to detect a wide range of edges in images. OpenCV has in-built function cv2.Canny() which takes our input image as first argument and its aperture size(min value and max… Read More »

Working with csv files in Python

This article explains how to load and parse a CSV file in Python. First of all, what is a CSV ? CSV (Comma Separated Values) is a simple file format used to store tabular data, such as a spreadsheet or database. A CSV file stores tabular data (numbers and text) in plain text. Each line… Read More »