Web apps have exploded in popularity in recent years. Here is how to create a Django project on Ubuntu as of December 2019….

# Category: Programming

## Bloom filters in Python

Every time you navigate to a new URL, your browser checks to see if it is in a list of millions of malicious sites. Normally, searching through such a list would take minutes. Anything more than a few milliseconds would make it unusable. So how do they pull it off? Bloom filters! A bloom filter…

## Base58Check encoding in Python

Non-Sequential Base Systems Bitcoin’s Base58 Base58 is a binary to text encoding developed for displaying the 20-byte integer representing a Bitcoin address. Base58 is the same as base 64, but without the +, /, 0, O, I, and l symbols. 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz The encoding prevents confusion between letters, especially when handwritten and across different fonts. The…

## Text generation in Python

Text is my personal favorite medium for machine learning. Here is why: In computing, a picture is worth a (few hundred) thousand words. As a result, modeling text is more space and compute efficient than visual models. Text arrived first to the internet. This lead time has resulted in better algorithms, and bottomless data. Interpretability…

## Modeling Hawkes Processes in Python

This article has been updated to reflect changes suggested by one of our readers. Thanks Andrew! New information, released in an instant, can synchronize the behavior of millions of people. This is magnified by the impact of the information, and the transience of its release. Wikipedia editors edit related pages during such events, reducing the…

## Modeling Glassdoor job descriptions as a Bag-of-Words

Since the launch of its public beta in 2008, Glassdoor has become the gold standard for company satisfaction ratings. They also have a classifieds section comparable to LinkedIn, Indeed, and others. Glassdoor provides examples of job descriptions with company ratings in context. This makes it easy to compare what good and bad companies have in…

## Creating animated 3D plots in Python

Matplotlib has become the standard plotting library in Python. This is thanks to its simple API and NumPy/SciPy integration, making it easy to add interactive plots to any code. In this post, I will walk through how to make animated 3D plots in Matplotlib, and how to export them as high quality GIFs. RGB Color…

## Applying A* path finding to latent word vectors

Path finding algorithms There are many algorithms for finding the shortest path between two points, but few are better known than Dijkstra’s algorithm and the A* algorithm. Dijkstra’s algorithm Dijkstra’s algorithm is often described as being “shortest-path first”. This is a greedy approach that isn’t suitable for large graphs. Source: wikimedia.org A* search algorithm A*,…

## Evolutionary algorithms in Python

What is context-free grammar? A grammar is a set of production rules for a language. Context-free grammar is any grammar that is of the form , where is a finite set of nonterminal characters, is a finite set of terminal characters, is the relation from to , and is the start symbol. This is what…

## Building a recommendation system in Python

For competitive, low-margin businesses, a store’s layout can be the difference between surviving and getting wiped out. To drive more sales, businesses are using recommendation systems in online stores, and data-driven nudging at brick-and-mortar locations. How can purchasing data be turned into sales? We can use an unaltered version of the word2vec algorithm used in…