Monthly Archives: March 2009

Computing Large Determinants in Python

Story: For my seminar work, I had to calculate the determinant of a large integer matrix. In this case, large meant n>=500. You might say that this isn’t very large and I would agree. However, it is large enough to … Continue reading

Posted in Algorithms, computer science, Math, Programming, Python, Research | Tagged , , , , , | 2 Comments

Easy Harvesting

Image by existentist. I’ve been doing a lot of harvesting (aka screen-scraping) lately. Fortunately, I don’t need forms automation, so I’m using urllib2 and not Mechanize like my friend Ron Reiter recommended. At first, when I wanted to get some … Continue reading

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

You know you need to install a new Python version when…

>>> import decimal >>> decimal.Decimal(’0.2’) <&nbsp; 0.3 False >>>>>> import decimal >>> decimal.Decimal(‘0.2’) <&nbsp; 0.3 False >>> This little gem took me two hours to track down. It turns out that since my code is using sqlobject, it also uses … Continue reading

Posted in Programming, Python | Tagged , , , | 4 Comments

A Python Rant

Last night I encountered yet again one of Python’s annoyances. The annoyance I’m referring to is the lack of string like functions for lists. Trivial examples include find() and rfind(). Before you mention index though, it’s important to point out … Continue reading

Posted in Programming, Python, rants | Tagged , , , , , | 6 Comments