Functional Programming in Python

Introduction Functional Programming is a popular programming paradigm closely linked to computer science’s mathematical foundations. While there is no strict definition of what constitutes a functional language, we consider them to be languages that use functions to transform data. Python is not a functional programming language but it does incorporate some of its concepts alongside other programming paradigms. With Python, it’s easy to write code in a functional style, which may provide the best solution for the task at hand. […]

Read more

Relative vs Absolute Imports in Python

While you can put simple projects in a single file, most Python development projects will require multiple files to keep them manageable. That means you need a way to import one file into another. However, many Pythonistas find importing files confusing. Fortunately, it is easy if you know the difference between the various Python import statements. What is Importing? Importing refers to allowing a Python file or a Python module to access the script from another Python file or module. […]

Read more

PyTesseract: Simple Python Optical Character Recognition

Introduction Humans can understand the contents of an image simply by looking. We perceive the text on the image as text and can read it. Computers don’t work the same way. They need something more concrete, organized in a way they can understand. This is where Optical Character Recognition (OCR) kicks in. Whether it’s recognition of car plates from a camera, or hand-written documents that should be converted into a digital copy, this technique is very useful. While it’s not […]

Read more

Python Programming in Interactive vs Script Mode

In Python, there are two options/methods for running code: Interactive mode Script mode In this article, we will see the difference between the modes and will also discuss the pros and cons of running scripts in both of these modes. Interactive Mode Interactive mode, also known as the REPL provides us with a quick way of running blocks or a single line of Python code. The code executes via the Python shell, which comes with Python installation. Interactive mode is […]

Read more

Python Performance Optimization

Introduction Resources are never sufficient to meet growing needs in most industries, and now especially in technology as it carves its way deeper into our lives. Technology makes life easier and more convenient and it is able to evolve and become better over time. This increased reliance on technology has come at the expense of the computing resources available. As a result, more powerful computers are being developed and the optimization of code has never been more crucial. Application performance […]

Read more

Converting Python Scripts to Executable Files

Introduction In this tutorial, we will explore the conversion of Python scripts to Windows executable files in four simple steps. Although there are many ways to do it, we’ll be covering, according to popular opinion, the simplest one so far. This tutorial has been designed after reviewing many common errors that people face while performing this task, and hence contains detailed information to install and set up all the dependencies as well. Feel free to skip any step, if you […]

Read more

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
1 862 863 864 865 866 910