Software

One Code to Run Them All (Python 2 and Python 3)

Quite a while ago, I decided to do all my Python programming in Python 3 as much as possible. This is essentially always for the typically small stand-alone programs that I put on this blog. I did this to encourage people to use Python 3 for their own work, and to be future proof. Additionally… read more

Tags:

Submitted on 26 January 2019

Old Style Linear Regression with TensorFlow

Figure 1. Line fitted through linear regression.

This article shows how “old style” linear regression looks when implemented with TensorFlow. When you start diving into TensorFlow, an example like this is typically missing from the tutorials. Linear regression is often the first example, but… read more

Tags:

Submitted on 3 December 2018

Symbolic Math in Python

Yes, you can do symbolic math in Python! The library to take a look at is SymPy. This article is not a SymPy tutorial, as I only want to walk you through some examples to show you the kinds of things that it can do. A good place to start… read more

Submitted on 22 May 2018

Turtle Graphics in Python

Figure 1. First four stages of the Koch snowflake.

Turtle graphics are a way of drawing where you control a cursor, known as the “turtle”, by instructing it how to move. For example, you tell the turtle to move forward over a certain distance, drawing a line on your screen in the process, then… read more

Tags:

Submitted on 7 May 2018

Exponentiation by Squaring

In this article, I present the simple idea of exponentiation by squaring. This idea saves computation time in determining the value of large integer powers by “splitting” the exponentiation in a clever way into a series of squaring operations. The technique is based on the fact that… read more

Submitted on 12 February 2017

Mandelbrot Set

Detail of the Mandelbrot set

The Mandelbrot set is named after Benoît Mandelbrot, a French American mathematician. The set is a part of the complex plane. It is created by iterating the complex quadratic polynomial \(f_c(z)=z^2+c\). For each point \(c\) of the complex plane… read more

Submitted on 17 May 2012

Pages