Software

Though computer programming has rather little to do with computer science on the whole, most computer scientists (including me) do a lot of programming. Here's a few things that may be of use to somebody else out there. All code is released under the 3-clause (a.k.a. "revised") a BSD License unless otherwise specified.

Research

  • hinton.py uses matplotlib to draw Hinton diagrams, which are a method of visualizing weight matrices (the magnitude of the weight is proportional to the area of the corresponding inner square, white is positive, black is negative). Here's a picture.
  • fourregions.py implements a classic benchmark for nonlinear classifiers, the “four regions” task. Given x and y coordinates in the [-1,1] interval, the task is to learn to correctly predict the class, given this layout (where the colour of the point denotes its class).

Web / RSS

  • tfd.py screen scrapes the markup on a triumvirate of popular web comics and spits out a valid RSS feed (to stdout). The author is somewhat against third-party feeds and so I do not provide a public one; this utility might be used, however, to run a private feed, accessible only to its creator, or to create a local feed.

Utility

  • A lexer/scanner to read in Portable Graymap (PGM) files, the most brain-dead simple image format in the world (compile with lex or flex to generate C source code).
  • A simple Python script to dump MSN logs to readable plain text from their wacky XML format.

Educational

  • A bunch of Scheme procedures I wrote while learning the language for a class. Starts extremely simple and builds up to matrix multiplication.
  • A k-nearest neighbours implementation in MATLAB with ridiculously detailed comments, that I wrote as a TA for CSC384. It could probably be more efficient/vectorized, but the comments might prove instructive to a MATLAB beginner.