Generic looping in Python

I just posted on my IlliGAL blog how to implement a generic genetic algorithm (GA) main loop squeezing the dynamic behavior of Python. Pretty sleek, if you have tweaked GA main you main find this interesting ;)

Jan 16, 2008 · 1 min · 37 words · Xavier Llorà

Profiling Python Code

For the first time in 9 years, this vacation break I have done absolutely nothing. Wow what a coach potato I have become! Well that is not totally true, just for fun I started going over Python and, as usual, for any new language I end writing a simple genetic algorithm. I like the flexibility and compactness of the code (no verbose at all). However when I fire my first run (yes, the good old OneMax problem), I realized that some of my assumptions about coding did not directly transfer. Yes, it was a bit slow. So I started digging for a profiler and, surprise!, it comes with the Python interpreter. Here is an example on how to run the profiling capabilities ...

Jan 10, 2008 · 3 min · 496 words · Xavier Llorà

Reasoning for the semantic web

Jena 2 Inference Support is a nice introduction to the inference engines provided by the Jena package. Besides standardized reasoning for RDF and a subset of OWL/Lite and OWL/All ontologies, it also provides the mechanisms for creating your own rule-based inference engine using the generic rule-based inference also provided.

Nov 26, 2007 · 1 min · 49 words · Xavier Llorà

Wordpress and your iPhone

WordPress iPhone / Mobile Admin adapts the WordPress admin UI to be more friendly to mobile devices, specifically phones.

Oct 12, 2007 · 1 min · 19 words · Xavier Llorà

Reset the MBR using Linux

Here is a simple trick if you need to clean it. Recently I needed to clean some Rocks Clusters node’s HD to allow it to reinstall dd if=/dev/zero of=/dev/HD count=1 bs=512 This avoid the computer to try to boot from the hard drive. However, if the node was already on the cluster, you need to run # insert-ethers --remove="compute-0-1" To remove it from the cluster, where “compute-0-1” is the name of the node in cluster. Then, you can start insert-ethers, and boot the node and it will start reinstalling itself. ...

Sep 21, 2007 · 1 min · 90 words · Xavier Llorà