Python tutorials

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

Phonetic Similarity of Words: A Vectorized Approach in Python

In an earlier article I gave you an introduction into phonetic algorithms, and shows their variety. In more detail we had a look at the edit distance, which is also known as the Levenshtein Distance. This algorithm was developed in order to calculate the number of letter substitutions to get from one word to the next. As you may have already noted in the previous article, there are different methods to calculate the sound of a word like Soundex, Metaphone, […]

Read more

K-Nearest Neighbors Algorithm in Python and Scikit-Learn

The K-nearest neighbors (KNN) algorithm is a type of supervised machine learning algorithms. KNN is extremely easy to implement in its most basic form, and yet performs quite complex classification tasks. It is a lazy learning algorithm since it doesn’t have a specialized training phase. Rather, it uses all of the data for training while classifying a new data point or instance. KNN is a non-parametric learning algorithm, which means that it doesn’t assume anything about the underlying data. This […]

Read more

Python Metaclasses and Metaprogramming

Imagine if you could have computer programs that wrote your code for you. It is possible, but the machines will not write all your code for you! This technique, called metaprogramming, is popular with code framework developers. This is how you get code generation and smart features in many popular frameworks and libraries like Ruby On Rails or TensorFlow. Functional programming languages like Elixir, Clojure, and Ruby are noted for their metaprogramming capabilities. In this guide, we show you how […]

Read more

Reading Files with Python

To work with stored data, file handling belongs to the core knowledge of every professional Python programmer. Right from its earliest release, both reading and writing data to files are built-in Python features. In comparison to other programming languages like C or Java it is pretty simple and only requires a few lines of code. Furthermore, no extra module has to be loaded to do that properly. Basics of Files in Python The common methods to operate with files are […]

Read more

Decision Trees in Python with Scikit-Learn

Introduction A decision tree is one of most frequently and widely used supervised machine learning algorithms that can perform both regression and classification tasks. The intuition behind the decision tree algorithm is simple, yet also very powerful. For each attribute in the dataset, the decision tree algorithm forms a node, where the most important attribute is placed at the root node. For evaluation we start at the root node and work our way down the tree by following the corresponding […]

Read more

Writing Files using Python

As pointed out in a previous article that deals with reading data from files, file handling belongs to the essential knowledge of every professional Python programmer. This feature is a core part of the Python language, and no extra module needs to be loaded to do it properly. Basics of Writing Files in Python The common methods to operate with files are open() to open a file, seek() to set the file’s current position at the given offset, and close() […]

Read more

Single Page Apps with Vue.js and Flask: RESTful API with Flask

RESTful API with Flask Welcome to the fourth post on using Vue.js and Flask for full-stack web development. The focus of this post will be on building a backend REST API using the Python based Flask web framework. The code for this post is in a repo on my GitHub account under the branch FourthPost. Series Content Seup and Getting to Know VueJS Navigating Vue Router State Management with Vuex RESTful API with Flask (you are here) AJAX Integration with […]

Read more

Creating and Deleting Directories with Python

This article continues with our series on interacting with the file system in Python. The previous articles dealt with reading and writing files. Interestingly, the file system is much more than a way to store/retrieve data to disk. There are also various other types of entries such as files, directories, sockets (for inter-process communication), named pipes, both soft and hard links, as well as special files (block devices). Reading and writing from and to them is done in a similar […]

Read more
1 172 173 174 175 176 180