Dusty Phillips, Arch Linux shwag guy, Archcon co-organizer, (python) consultant and since recently buddy of mine wrote his first book: Python 3 Object Oriented Programming.
I got the opportunity to get a free pdf copy in exchange for a review on my blog, so here we go.
::Read more
posted on Monday, 23 Aug 2010 19:01 - link - tags: python - path: / - 0 comments
Gensim is a very cool python2, numpy-based vector space modelling (information retrieval) framework. It does the job in a straightforward way, and it has been a great project for me to learn python with because it uses some nice tricks in real life scenarios (like Generators) and is AFAICT elegantly coded. Sometimes I find it hard to believe how much functionality can be crammed in so few lines of (readable) code.
But anyway we're having some issues in it with cPickle (it breaks when saving large matrices, it breaks with some objects). For now I worked around it by using jsonpickle but I wonder how viable this alternative really is.
To give at least a crude idea of performance characteristics of different pickle methods, I wrote a very simple benchmark program - picklebench - to compare pickle, cPickle and jsonpickle. The script fills a dictionary which gets bigger and bigger, and for certain sizes of dictionary it is saved to, and loaded from disk again. We measure some metrics of each step. We continue until memory is exhausted.
posted on Thursday, 16 Jun 2011 22:32 - link - tags: foss, python - path: / - 0 comments
posted on Saturday, 26 Mar 2011 21:48 - link - tags: foss, python - path: / - 8 comments
pyblosxom is a pretty cool blogging platform written in python.
Like many of the modern minimal blog engines it works with plaintext files only (no database), has a relatively small codebase, supports many plugins (like markdown support), is written in a proper scripting language, has a simple and clean file structure, is seo-friendly, and so on.
The one feature that sets it apart from other minimal blog engines is that it supports comments, and doesn't just rely on an external service like disqus, but stores comments as plaintext files as well.
Some features seem a bit overengineered (like, multiple possible locations to store themes (known as "flavours") and templates; I'm a fan of convention over configuration and keeping things simple), but discussing this with the maintainer revealed this is because pyblosxom is meant as a reimplementation of the original perl-based bloxsom project. Over time features could be simplified and/or redesigned.
So I plan to migrate this blog from drupal to pyblosxom.
To do this, I'm building the tool drupal-to-pyblosxom.
The goal is to convert posts, associated metadata (publish time, tags) and comments from the drupal database to pyblosxom files. Source code display should be converted too (merely a matter of converting between different plugin conventions), and images shown should be downloaded. Currently I'm about halfway, if there's anyone out there with a similar use case, help is welcome ;)
::Read more
posted on Sunday, 19 Dec 2010 19:54 - link - tags: drupal, python - path: / - 2 comments
Rss2email is a great tool. I like getting all my news messages in my mailbox and using smtp to make the "news delivery" process more robust makes sense.
However, there are some things I didn't like about it so I made a github repo where I maintain an alternative version which (imho) contains several useful improvements, both for end users and for developers/downstreams.
Also, this was a nice opportunity for me to improve my python skills :)
Here is how it compares:
::Read more
posted on Saturday, 25 Sep 2010 20:33 - link - tags: foss, python - path: / - 7 comments