Exporting Richly Formatted Text In Python

Today, I wondered whether I could automatically save an image of colored text from the Python console.  I was looking for a way to display very long strings that automatically wrapped to its container, so I avoided the dreaded run-on string that never ends. Also, could I save the image elegantly with high resolution? In […]

Fun Hacks for your Python Console

Hack #1: Color Text in Your Terminal  You can change the colors of text shown in your Python terminal console using ANSI escape character sequences! Or you can use the colorama library to make the process a bit easier and more streamlined. Colorama works across all the platforms i.e. Windows, Mac OS and Unix.  First, […]

Building Recommendations Systems

Recommendations systems are good for matching users to their favorite products and are incredibly popular. In fact you have likely used a recommendation system at least once in your life. For example, Amazon uses recommendation systems to suggest new exciting products to purchase based on users’ previous purchase patterns and those similar users. Netflix also […]

Recurrent Neural Networks in PyTorch

Feed forward networks cannot learn from the past, but Recurrent Neural Networks (RNNs) can learn by accepting data in a sequence. Examples of applications for RNNs include the text autocomplete feature on your phone and performing language translations.  Recurrent Neurons (RNs) act as the building blocks of RNNs. The difference between RNs and feed forward […]

How Genetic Algorithms Work

Genetic algorithms (GAs) are inspired by biology where only the fittest genes survive. It is based on Charles Darwin’s Natural Selection theory. We start with 2 parent chromosomes that each contain an ordered set of genes. Each parent contributes some of their genes when they mate to create children chromosomes. There is a randomness to […]

Scroll to top