Monthly Archives: April 2005

Textual watermarks with Python Imaging Library

I’ve added a new snippet about doing watermarks with PIL.

Posted in Python, Snippet | 2 Comments

Article and discussions about Smart

FedoraNEWS has a nice article about Smart, posted by Xanax. FedoraForum also has a thread about it, as Ian MacGregor notified me.

Posted in Project | 6 Comments

Decorator for automatic inclusion of function definition in __doc__

Python 2.4 included support for function decorators. Decorators are callable objects that may modify a given function or class method arbitrarily when they’re prepended with specific syntax to the function/method definition. The following code implements a decorator that will automatically … Continue reading

Posted in Python, Snippet | Leave a comment

Problem of the Week at University of Massachusetts

University of Massachusetts has a very nice Problem of the Week service where they post a new math related problem every monday. At that time they report the percentage of people that correctly answered the question as well. To submit … Continue reading

Posted in Math, Puzzle, Python | Leave a comment

Petals Around the Rose

Petals Around the Rose is an interesting brain teaser. Here is a copy of the game description: The name of the game is Petals Around the Rose. The name of the game is important. The computer will roll five dice … Continue reading

Posted in Puzzle | Leave a comment

All combinations of N elements

Here’s a snippet to compute all combinations of N elements over K positions.

Posted in Math, Python, Snippet | 3 Comments

Permutations of all subsets

Another snippet to compute the permutations of all subsets.

Posted in Math, Python, Snippet | 3 Comments