-
Recent Posts
Recent Comments
Archives
- June 2011
- February 2011
- January 2011
- December 2010
- April 2010
- March 2010
- February 2010
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- February 2007
Categories
- Algorithms
- Assembly
- C
- Challenges
- Compilation
- computer science
- Cryptography
- CSS
- Databases
- decompilation
- Design
- Fractals
- Game Development
- Geometry
- gotchas
- Graphics
- Group Theory
- Humour
- Javascript
- Linux
- Math
- Miscellaneous
- Optimization
- Optimization
- Optimization
- Optimization
- Origami
- Personal
- Programming
- Programming Philosophy
- Projects
- Protocols
- Python
- rants
- Research
- Security
- Sound
- startup
- Statistics
- Teaching Programming
- Testing
- Uncategorized
- Utility Functions
- web-design
Tag Archives: Python
Bulk INSERTs FTW
A short while ago, I had to research some API for a company I’m consulting for. This API yields very good quality data, but isn’t comfortable enough to process it for further research. The obvious solution was to dump this … Continue reading
Posted in Databases, Programming
Tagged bulk-insert, Databases, Python, sql-server, sqlalchemy, sqlite
1 Comment
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 Float, Fractions, Matrix Determinants, Numerical Analysis, Programming, Python
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 BeautifulSoup, Harvesting, Programming, Python
Leave a comment
You know you need to install a new Python version when…
>>> import decimal >>> decimal.Decimal(’0.2′) < 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 the decimal module. I had some constants set … Continue reading
Fractals in 10 minutes No. 5: Sierpinski Chaos Game
A few years back, I was in some course where they also taught me some Matlab. One of the exercises was to draw the Sierpinski triangle using a method of progressing a point randomly. I was quite surprised at the … Continue reading
Fractals in 10 minutes No. 4: Mandelbrot and Julia in Ascii Art
I felt like it’s about time I tackled the Mandelbrot and Julia sets, in Ascii-Art. Heck, the Mandelbrot fractal is on the logo of this Blog! However, being the most well-known fractal, this issue was tackled already, with satisfactory results. … Continue reading
Posted in Fractals, Programming, Python
Tagged ascii-art, fractal, julia, mandelbrot, Python
Leave a comment
Must Have Python Packages
Python 2.6 and 3.0 are upon us. I helped a friend set up the new Python environment for research and development, and we thought about constructing a PythonPack: a compilation of packages every home should have lying around.
Small Python Interactive Interface Trick
Not too long ago, I helped someone with some research work, and one of the research tools was also used from the Python interactive prompt. The interface used was handy enough for development: intuitive, readable, short, and useful. Still, for … Continue reading
Posted in Programming, Python, Research, Utility Functions
Tagged Interactive Prompt, NoParens, Python, Research
9 Comments
Fractal Memory Usage and a Big Number
In a previous post I said I’d talk about 4**(4**(4**4)). First, about the number. I first saw it mentioned in a math lesson back in high-school, when the teacher wanted to demonstrate estimation abilities. He wrote it on the board, … Continue reading
Posted in Algorithms, computer science, Fractals, Math, Programming, Python
Tagged exponentiation, memory usage, Programming, Python
1 Comment