Merging separate SVN repositories

I needed to merge together several SVN repositories together. After browsing a bit, I found a simple perl script named svn-merge-repos.pl published on December 2007 by Fabien Coelho. This script allows you to merge multiple repositories, properly interleaving the revisions by date. It also allows you to set specific target paths for the repositories being merged. The only issue I ran into was the limitation that you cannot target the same new directory as the destination for multiple repository sources on the same run. You can get around it using the usual svnadmin dump and svnadmin load sequence, but it is not as beautiful and it does not interleave the revisions… ...

May 27, 2008 · 1 min · 111 words · Xavier Llorà

ZooKeeper and distributed applications

Lately I have been exploring different alternatives for coordinating the execution of distributed applications. Yes, you guessed it right, I am working on the distribution of the execution of Meandre flows. Chopping the data-intensive flow and mapping the chunks onto a set of distributed processors requires several elements (graph analysis, resource management, etc.). However, the basic element that needs to be solved first is the need for a reliable and scalable coordination system. ...

May 22, 2008 · 1 min · 205 words · Xavier Llorà

SVNKit or analyzing SVN content in Java

The other day I was looking for a piece of software that could help me pull data out of SVN repository so I can do a little analysis on it. Browsing over the net, I run into several tools, but the one that finally caught my eye was SNVKit. The package does a lot of stuff, but for instance, if you are only interested on pulling information out, it makes your like quite easy. The code below is just a simple example of how you can use it to pull information out of a SVN repository. ...

May 20, 2008 · 1 min · 188 words · Xavier Llorà

A simple and flexible GA loop in Python

Yes, yes, I know, Python. I just have been playing around to see how much you can squeeze out of it and I am very surprise of how elegant it can be. Just and example. I am pretty sure you have written way to many customize GA loops that you need to tweak every now and then, if so take a look at the Python version below. def evolve(self): """Implements a simple evolution loop""" func\_calls = \[\] func\_calls.append(self.evaluate) if ( self.env.selection!=None ) : func\_calls.append(self.selection) if ( self.env.crossover!=None ) : func\_calls.append(self.crossover) if ( self.env.mutation!=None ) : func\_calls.append(self.mutate) if ( self.env.replacement!=None ) : func\_calls.append(self.replace) \[f() for f in func\_calls for i in range(self.env.length/5)\] self.evaluate() return (self.best\_fitness,self.best\_individual) Where the self.env object just contains references to the methods implementing each of the functionalities generically implemented in self.evaluate, etc. Pretty sleek. ...

Jan 16, 2008 · 1 min · 136 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à