Sorting and Merging Single Linked List

In the last article, we started our discussion about the linked list. We saw what the linked list is along with its advantages and disadvantages. We also studied some of the most commonly used linked list method such as traversal, insertion, deletion, searching, and counting an element. Finally, we saw how to reverse a linked list. In this article, we will continue from where we left in the last article and will see how to sort a linked list using […]

Read more

Understanding ROC Curves with Python

In the current age where Data Science / AI is booming, it is important to understand how Machine Learning is used in the industry to solve complex business problems. In order to select which Machine Learning model should be used in production, a selection metric is chosen upon which different machine learning models are scored. One of the most commonly used metrics nowadays is AUC-ROC (Area Under Curve – Receiver Operating Characteristics) curve. ROC curves are pretty easy to understand […]

Read more

Introduction to the Python Pathlib Module

The Pathlib module in Python simplifies the way in working with files and folders. The Pathlib module is available from Python 3.4 and higher versions. It combines the best of Python’s file system modules namely os, os.path, glob, etc. In Python, most of the scripts involve interacting with file systems. Hence, it is important to deal with file names and paths. To achieve this, Python includes the Pathlib module which contains useful functions to perform file-related tasks. Pathlib provides a […]

Read more

Doubly Linked List with Python Examples

This is the third article in the series of articles on implementing linked list with Python. In Part 1 and Part 2 of the series we studied single linked list in detail. In this article, we will start our discussion about doubly linked list, which is actually an extension of single linked list. In single linked list each node of the list has two components, the actual value of the node and the reference to the next node in the […]

Read more

Affine Image Transformations in Python with Numpy, Pillow and OpenCV

In this article I will be describing what it means to apply an affine transformation to an image and how to do it in Python. First I will demonstrate the low level operations in Numpy to give a detailed geometric implementation. Then I will segue those into a more practical usage of the Python Pillow and OpenCV libraries. This article was written using a Jupyter notebook and the source can be found at my GitHub repo so, please feel free […]

Read more

Introduction to Python Decorators

Introduction In Python, a decorator is a design pattern that we can use to add new functionality to an already existing object without the need to modify its structure. A decorator should be called directly before the function that is to be extended. With decorators, you can modify the functionality of a method, a function, or a class dynamically without directly using subclasses. This is a good idea when you want to extend the functionality of a function that you […]

Read more

Introduction to Python OS Module

In this tutorial, you will learn how to work along with Python’s os module. Table of Contents Introduction Basic Functions List Files / Folders in Current Working Directory Change working Directory Create Single and Nested Directory Structure Remove Single and Nested Directory Structure Recursively Example with Data Processing Conclusion Introduction Python is one of the most frequently used languages in recent times for various tasks such as data processing, data analysis, and website building. In this process, there are various […]

Read more

Python for NLP: Working with Text and PDF Files

This is the first article in my series of articles on Python for Natural Language Processing (NLP). In this article, we will start with the basics of Python for NLP. We will see how we can work with simple text files and PDF files using Python. Working with Text Files Text files are probably the most basic types of files that you are going to encounter in your NLP endeavors. In this section, we will see how to read from […]

Read more

Python for NLP: Tokenization, Stemming, and Lemmatization with SpaCy Library

In the previous article, we started our discussion about how to do natural language processing with Python. We saw how to read and write text and PDF files. In this article, we will start working with the spaCy library to perform a few more basic NLP tasks such as tokenization, stemming and lemmatization. Introduction to SpaCy The spaCy library is one of the most popular NLP libraries along with NLTK. The basic difference between the two libraries is the fact […]

Read more

Introduction to Python FTP

Introduction In this tutorial, we will explore how to use FTP with Python to send and receive files from a server over TCP/IP connections. To make things easier and more abstract, we will be using Python’s ftplib library which provides a range of functionalities that make it easier to work with FTP. We’ll see the implementation for uploading and downloading files from the server, as well as some other cool things that “ftplib” allows us to do. What is FTP? […]

Read more
1 810 811 812 813 814 858