Tag Archives: Python

Optimize your programs

The last time I blogged about a new course I’m fol­low­ing at my uni­ver­sity. This course, held by Pasquale Lops and Gio­vanni Semer­aro, is very inter­est­ing at the point that I’ll be devel­op­ing a custom infor­ma­tion retrieval engine as part of my intern­ship project. I can’t tell much more at this point since the intern­ship haven’t started yet and I’m not sure I can release more details about this project (we’re still in the process of decid­ing if and how the whole thing will be released to the world).

In the mean­time, I’ve been doing sev­eral exper­i­ments on this topic mostly about the memory usage and the per­for­mances of such system on lim­ited hard­ware. This prac­ti­cally means imple­ment­ing the algo­rithms you’ll be using and mea­sur­ing the com­pu­ta­tional time they require.

Read more »

Announcing Pytagram

Today I just ended one of my side projects: pyta­gram. Basi­cally it gen­er­ates an SVG file (that can suc­ces­sively be saved as eps/pdf/whatever and even­tu­ally man­u­ally manip­u­lated) start­ing from a tree-​like plain text file. This can be useful for gen­er­at­ing cheat sheets or quick ref­er­ences to classes or func­tions that belongs to some project.

I did this for gen­er­at­ing a django quick ref­er­ence (here it is) since it has a lot of func­tions and I know what’s their pur­pose, but I can never remem­ber the names (and now two A4 papers are right in front of me).

If you’re inter­ested in this, check out the google code project page and grab your copy from the SVN repository.

There are tons of things that can be changed/optimized (i.e.: add some optional short expla­na­tion of the func­tion, add more exam­ples, easier way to change colors, …) but now the code is work­ing quite well so that can be already useful to the people out there.

Google, codejam and number conversions

The dec­i­mal numeral system is com­posed of ten digits, which we rep­re­sent as “0123456789” (the digits in a system are writ­ten from lowest to high­est). Imag­ine you have dis­cov­ered an alien numeral system com­posed of some number of digits, which may or may not be the same as those used in dec­i­mal. For exam­ple, if the alien numeral system were rep­re­sented as “oF8”, then the num­bers one through ten would be (F, 8, Fo, FF, F8, 8o, 8F, 88, Foo, FoF). We would like to be able to work with num­bers in arbi­trary alien sys­tems. More gen­er­ally, we want to be able to con­vert an arbi­trary number that’s writ­ten in one alien system into a second alien system.

Read more »

And djangodash is ended…

And I’ve been 6th. So I won a shared 2 host­ing plan at web­fac­tion and a 12 pack of G33K B33R caf­feinated root beer (still trying to under­stand what this is exactly, anyway) from bawls. Anyway, here fol­lows a short resume of what hap­pened from Sat­ur­day through Tues­day (if you’re asking your­self why it didn’t ended on Sunday, well, keep reading).

The com­pe­ti­tion began very well, I worked nor­mally for the first part of the day but then I had to stop for a while. When I came back, svn and djan­go­dash web­site was not work­ing any­more. I ini­tially thought that it was some con­nec­tion issue but when I saw that other sites were work­ing prop­erly so they def­i­nitely had some problems.

Read more »