Archives

  • Evil Instance Method Alternatives in Python

    An evil way to exploit and abuse Python for fun and profit. I have no idea if this belongs in any real code, but if nothing else, call it an introduction to such neat Python features as metaclasses and decorators. The idea is to create a class which allows specification of an instance-specific bound method […]

    Comments Off on Evil Instance Method Alternatives in Python
    Feb 20th, 2013 | Filed under Uncategorized
    Tags: ,
  • Axes of Evil

    A quick and dirty set of 3D axes for Visual: from visual import arrow, cylinder   def visual_axes( scale ): """\ Display a set of 3D axes.   @param scale: The scale of the axis set. @type scale: C{float} """ for axis in [ tuple( [ i == j and scale * 5 or 0 […]

    Comments Off on Axes of Evil
    Mar 22nd, 2010 | Filed under Uncategorized
    Tags: ,
  • LaTeX Preview with Vim and Evince

    During a conversation (and a game of Scrabble) at the Google Summer of Code mentor summit, it came up that a few of us were LaTeX users, and we talked briefly about how it would be nice if there were some way to get a real-time preview the final document while editing in Vim. Here’s […]

    Comments Off on LaTeX Preview with Vim and Evince
    Nov 15th, 2009 | Filed under Uncategorized
    Tags: , ,
  • Loggerhead Init Script for Gentoo

    I just set up a Bazaar repository server at work. Gentoo has no official ebuild for Loggerhead, so I installed it from Mark Lee‘s Bazaar overlay. Unfortunately, this does not ship with an init script for serve-branches, so I wrote one. The script is /etc/init.d/loggerhead (mode 755): #!/sbin/runscript # Copyright 1999-2009 Gentoo Foundation # Distributed […]

    Nov 12th, 2009 | Filed under Uncategorized
  • Penguicon The Seventh

    Like Xavier, I came back from Penguicon 7.0 this weekend to a mountain of work. Now I’m going to walk and talk like him (minus the epic growl) — guess that means I look like someone else here — and give my review. The highlight was certainly the party. Friday night was phenomenal, Saturday night […]

    May 7th, 2009 | Filed under Uncategorized
    Tags:
  • How Random

    A Python function that returns a random subset of size n from set s. from random import randint   def random_subset( s, n ): if len( s ) < n: raise ValueError, ( "Subset larger than input set" ) l = list( s ) r = set() for i in range( n ): r.add( l.pop( […]

    Comments Off on How Random
    May 5th, 2009 | Filed under Uncategorized
    Tags: ,
  • Das Komputermaschine Ist Fur Der Gefingerpoken

    A good friend of mine recently tossed me some computer parts, including an HP illuminated multimedia USB keyboard (model SK-2565, part no. 5185-2027). Since I had been looking to replace my old keyboard (a $10 PS/2 job that I turned into a k-rad all-black cowboy deck with blank keys), and had been suffering from an […]

    Comments Off on Das Komputermaschine Ist Fur Der Gefingerpoken
    Apr 4th, 2009 | Filed under Uncategorized
    Tags: ,
  • Free Software in Vision

    My research area at school is distributed smart cameras, a field which is primarily rooted in computer vision. Despite having access to a range of expensive proprietary software libraries by virtue of having purchased the equipment, most of my computer vision work uses a stack of free software running on Gentoo Linux. For interfacing to […]

    Comments Off on Free Software in Vision
    Mar 12th, 2009 | Filed under Uncategorized
  • March to a Different Beat

    Crystal bought me this USB Drum Kit for my birthday back in November. If you followed the link, you may have noticed this: Includes custom software (Windows only). Naturally, I want this thing to be sitting on my desk, ready to crank out a beat at all times. And naturally, the computer that’s sitting on […]

    Comments Off on March to a Different Beat
    Mar 7th, 2009 | Filed under Uncategorized
    Tags: , ,
  • Linux Zealots

    I play a lot of StarCraft. Here’s how I do it on my Linux box. Installing Wine First, I install and configure Wine. In particular, I leave the virtual desktop option off, and ensure that a sound driver (in my case, ALSA) is configured. ISO Images Both CDs are required for installation and play (assuming […]

    Comments Off on Linux Zealots
    Mar 3rd, 2009 | Filed under Uncategorized
Posts Tagged ‘wuug’