Category Archives: Python
Pretty colors: Syntax Highlighting in Mercurial
I recently switched my personal revision control system from subversion to mercurial. One of the great things about mercurial is the built-in web interface, but I missed the syntax highlighting that’s available in interfaces such as ViewVC. I’ve written a … Continue reading
Python λ Shorthand
In Python a lambda expression (anonymous function) is created with the lambda keyword: map(lambda x: x+1, [1,2,3]) Some Scheme interpreters such as Dr. Scheme allow the λ symbol (U+03BB) as a shorthand for lambda. I started wondering what this would … Continue reading
Burkhard-Keller (BK) Trees In Python
I recently came across a description of an interesting data structure called a Burkhard-Keller tree (BK tree). BK trees provide efficient lookup of the set of words that lie within a certain distance of a query word. For example, this … Continue reading
etframes: Applying the ideas of Edward Tufte to matplotlib
Edward Tufte is a professor and author known for his excellent (and beautiful!) books on the visual display of statistical information. Last year I had the opportunity to attend one of his courses and was inspired to apply his ideas … Continue reading
A Few Things About Python and Emacs 22
This week I upgraded to the not-quite-released emacs 22. One of the big changes (for me at least) is the new default implementation of the python major mode, python.el. Some observations: python.el does not seem to have the same kinds … Continue reading