Default paramater values with python
2 Comments
Default argument values for functions are a nice shortcut in python. They save you from writing many wrapper functions and make the code more readable and also easier to use. They can be used wrong though: >>> def foo(a=[]): … a.append(‘bar’) … return a … >>> foo() ['bar'] >>> foo() ['bar', 'bar'] Like described in [...]
Removing the link boxes from Latex’ Hyperref (and color)
Aah Latex… A love hate relation ship. Working on my thesis I use the hyperref package for some nice linking support in my document. unfortunately this also causes them to get link boxes around them. Here’s the code to remove them: \usepackage[pdftex]{hyperref} \hypersetup{ colorlinks,% citecolor=black,% filecolor=black,% linkcolor=black,% urlcolor=black } EDIT: Hyperref seems to offer this [...]
HAR inspired Python Pygame fun
I have always wanted to do some stuff with Pygame. When i saw the logo on the HAR2009 wiki I whipped up a little python program that draws squares and fades between colors. It looks pretty cool! Needed: Python, Pygame Downloads: har_squares [edit]Seems i have uploaded the wrong file… My apologies to the original writer. [...]