Python tutorials

Python zlib Library Tutorial

What is Python zlib The Python zlib library provides a Python interface to the zlib C library, which is a higher-level abstraction for the DEFLATE lossless compression algorithm. The data format used by the library is specified in the RFC 1950 to 1952, which is available at http://www.ietf.org/rfc/rfc1950.txt. The zlib compression format is free to use, and is not covered by any patent, so you can safely use it in commercial products as well. It is a lossless compression format […]

Read more

A SQLite Tutorial with Python

Introduction This tutorial will cover using SQLite in combination with Python’s sqlite3 interface. SQLite is a single file relational database bundled with most standard Python installs. SQLite is often the technology of choice for small applications, particularly those of embedded systems and devices like phones and tablets, smart appliances, and instruments. However, it is not uncommon to hear it being used for small to medium web and desktop applications. Creating a Database and Making a Connection Creating a new SQLite […]

Read more

Scheduling Jobs with python-crontab

What is Crontab Cron is a software utility that allows us to schedule tasks on Unix-like systems. The name is derived from the Greek word “Chronos”, which means “time”. The tasks in Cron are defined in a crontab, which is a text file containing the commands to be executed. The syntax used in a crontab is described below in this article. Python presents us with the crontab module to manage scheduled jobs via Cron. The functions available in it allow […]

Read more

K-Means Clustering with Scikit-Learn

Introduction K-means clustering is one of the most widely used unsupervised machine learning algorithms that forms clusters of data based on the similarity between data instances. For this particular algorithm to work, the number of clusters has to be defined beforehand. The K in the K-means refers to the number of clusters. The K-means algorithm starts by randomly choosing a centroid value for each cluster. After that the algorithm iteratively performs three steps: (i) Find the Euclidean distance between each […]

Read more

Levenshtein Distance and Text Similarity in Python

Introduction Writing text is a creative process that is based on thoughts and ideas which come to our mind. The way that the text is written reflects our personality and is also very much influenced by the mood we are in, the way we organize our thoughts, the topic itself and by the people we are addressing it to – our readers. In the past it happened that two or more authors had the same idea, wrote it down separately, […]

Read more

Accessing the Twitter API with Python

Introduction One thing that Python developers enjoy is surely the huge number of resources developed by its big community. Python-built application programming interfaces (APIs) are a common thing for web sites. It’s hard to imagine that any popular web service will not have created a Python API library to facilitate the access to its services. A few ideas of such APIs for some of the most popular web services could be found here. In fact, “Python wrapper” is a more […]

Read more

Enhancing Python with Custom C Extensions

Introduction This article is going to highlight the features of CPython’s C API which is used to build C extensions for Python. I will be going over the the general workflow for taking a small library of fairly banal, toy example, C functions and exposing in to a Python wrapper. You might be wondering… Python is a fantastic high level language capable of just about anything, why would I want to deal with messy C code? And I would have […]

Read more

Introduction to Neural Networks with Scikit-Learn

What is a Neural Network? Humans have an ability to identify patterns within the accessible information with an astonishingly high degree of accuracy. Whenever you see a car or a bicycle you can immediately recognize what they are. This is because we have learned over a period of time how a car and bicycle looks like and what their distinguishing features are. Artificial neural networks are computation systems that intend to imitate human learning capabilities via a complex architecture that […]

Read more

The Best Python Books for All Skill Levels

Just about every year is a good year to be investing in Python learning, whether you are a beginner or an expert. Employment opportunities are opening for Python developers in fields beyond traditional web development. An IBM blog post reports that Python is now the dominant language in many data science and machine learning careers. We charted data from DataScienceCentral to see how well Python is doing in this new field. Here is the result. As you can see, it […]

Read more

Linear Regression in Python with Scikit-Learn

There are two types of supervised machine learning algorithms: Regression and classification. The former predicts continuous value outputs while the latter predicts discrete outputs. For instance, predicting the price of a house in dollars is a regression problem whereas predicting whether a tumor is malignant or benign is a classification problem. In this article we will briefly study what linear regression is and how it can be implemented using the Python Scikit-Learn library, which is one of the most popular […]

Read more
1 167 168 169 170 171 176