Tag Archives: Algorithm

Rhyme and Reason with Python

After reading xkcd’s blog, I went to LimerickDB.com. It looks and works just like bash.org, but for limericks. Quite amused with some of the limericks available, I wanted to try and compose my own. The first one came out fine, … Continue reading

Posted in Algorithms, Humour, Programming, Python | Tagged , , , , , | Leave a comment

Elegant Line Clipping Algorithm

I actually wrote about that a long time ago, in the wiki that once was algorithm.co.il. Since the wiki is long gone, and I figured this is a very elegant algorithm, I decided I should write about it. First, some … Continue reading

Posted in Algorithms, Geometry, Graphics, Math, Programming, Python | Tagged , , , | Leave a comment

Simple word lookup for crosswords and such…

I am swamped with university homework. I did manage to come up with some small somewhat useful utility. Do you know when you need a word that ends with a double letter and then an ‘n’? you would want to … Continue reading

Posted in Programming, Python, Utility Functions | Tagged , , , | Leave a comment

Pagerank recommends movies

So how was your Yom Kippur? After Yom Kippur ended, I sat down to write something that was nagging me for quite some time. I wanted to see what pagerank had to say about movies. I’ve always liked to picture … Continue reading

Posted in Algorithms, computer science, Math, Programming, Python | Tagged , , , | 1 Comment

How PyTuner works

PyTuner is really quite simple. Here is the outline of the algorithm behind it: Record audio data with pymedia. Compute the FFT of the audio data – now we have the strength of each frequency in the sample. Find peaks … Continue reading

Posted in Algorithms, Programming, Python, Sound | Tagged , , , , | Leave a comment

Proofreading and what's wrong with the heapq module

Consider the following problem: you have a large book you would like to proofread, with many chapters (100+) and a few men (4) at your disposal. How would you distribute the chapters among the men, considering that each proofreader must … Continue reading

Posted in Algorithms, Programming Philosophy, Python | Tagged , , , | 2 Comments