Python Code Snippets

Last update on Oct. 27, 2012.

Rather than keeping it to myself, I'm making public all the little python snippets I create on my GitHub pages. Especially all the things I tend to create over and over because I can't remember on what project I created them last.

Also, I think I'm "pretty good" at Python and coding in general – I have no concern putting "expert" next to Python on a resumé even if it risks Guido or someone of that stature giving an interview – but I'm by no means the last authority. If you see something in my code that could ...

Continue reading

Oops!

Last update on Oct. 27, 2012.

Broke the CSS for a bit, there. Didn't notice due to lack of care. Sorry!

Continue reading

Apple Maps - Not as Bad as it Could Have been

Last update on Sept. 27, 2012.

Apple's maps: its worst software product yet?

Not a chance. That honour has to go to Apple's Quicktime 4, with its skeuobarfic volume control.

 

Continue reading

Timestamping diagnostics information

Last update on Sept. 26, 2012.

Here's a little python utility to add a timestamp to a text stream. Useful if you have a tool (eg: mtr --raw) that emits information over time, but does not add timing information of its own:

#! /usr/bin/env python

import datetime, sys, optparse

cli_description = "Add a timestamp before each line"

def get_options ():
	parser = optparse.OptionParser ( description=cli_description )
	opts, args = parser.parse_args ()
	if len(args) != 0:
		raise parser.error ( "not expecting arguments" )
	return opts

def timestamp ( infile=sys.stdin, outfile=sys.stdout ):
	while True:
		l = infile.readline()
		if not l: break
		outfile.write ( "[%s] %s" % ( datetime.datetime.utcnow().isoformat ...

Continue reading

JavaScript animation

Last update on Sept. 23, 2012.

I've been helping a newly-found friend, Kazerad, supply some pretty decent Javascript-based animation for his site Prequel, a comic set in the Elder Scrolls: Oblibion usinverse.

Start reading from the first episode, or from my first contribution.

 

 

Continue reading

First Post!

Last update on Sept. 23, 2012.

First Post!

Playing around with some Django-based Blog software called "zinnia".. give me a few days and I'll theme this to the rest of the site.

With any luck, I'll post something to this blog on a far more regular basis than my LiveJournal.

Continue reading

Yearly archives