November 16, 2019

Deploy Django with Postgres, Nginx, and Gunicorn on Ubuntu 18.04

This a copy of https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04 . Introduction Django is a powerful web framework that can help you get your Python […]
March 26, 2019

Logging in Python Tutorial

Adding logging to your Python program is as easy as this: import logging With the logging module imported, you can […]
March 25, 2019

Python Exceptions Best Practices

How do I manually throw/raise an exception in Python? Use the most specific Exception constructor that semantically fits your issue. […]
June 17, 2017

Basic Tutorial of Cython

The Basics of Cython The fundamental nature of Cython can be summed up as follows: Cython is Python with C […]
June 17, 2017

Compiling C extension modules on Windows (Cython)

Compiling C extension modules on Windows This page describes how to compile a Cython extension (works for CPython extensions also) […]
June 17, 2017

Cythonize setup.py for several .pyx files

Concept Distutils is the standard way to build Cython extension modules for large projects. Typically one invokes setup(…) which then […]
June 14, 2017

Kernel Density Estimation in Python

Kernel Density Estimation In statistics, kernel density estimation (KDE) is a non-parametric way to estimate the probability density function of […]
June 14, 2017

Implementations of Mutual Information (MI) and Entropy computation in Python

In probability theory and information theory, the mutual information (MI) of two random variables is a measure of the mutual […]