Category

python

Unicode block names in regular expressions

Frequently, I find myself wanting to do some simple language detection. For Chinese, Japanese, and Korean, this can easily be done by looking at the types of characters in some te…

Monkey patching in python

I was just reading an article about Martijn Pieters, who is a python expert, and he mentioned monkey patching I did not know what monkey patching is, so I googled it, and found a…

Pretty printing json

Here is a really simple way to pretty print some unformatted json $ echo '{"foo": "lorem", "bar": "ipsum"}' | python -mjson.tool { "bar": "ipsum", "foo": "lorem" }

Small fix for article class in plasTeX

I recently found a small error in plasTeX, the program I like to use to convert latex to html. Unfortunately, it looks like it is not being actively developed anymore, but since i…