Category: Projects

A new home for IPGphor2reader

IPGphor2reader is a software meant to parse log (text) files resulting from an experiment with the IPGPhor and to plot graphs. I previously hosted it on my personal website and just moved it to Sourceforge, here. Amongst the various reasons for this move, I wanted the possibility for anyone to participate in the project and no hassle to manage this.

Slowly, slowly, most software on my website will be hosted on Sourceforge or Bioinformatics.net.

P.S. Obviously I chose the time where they are in the middle of a large scale site changes and upgrades so nothing is available for now (except the screenshot).

FOSDEM 2009 and Gemvid 0.6c

This year, I only went for the Saturday afternoon session of FOSDEM 2009, the Free and Open Source software developers’ European Meeting. Two years ago, I mentioned the general trend that more women were interested in free/open source software/movement and this trend continues. But this time, I also noticed some really cute babies … and my son Neel-Alexandre was one of them of course! Although he’s only 7-month-old, he was really interested in the FreeBSD, Linux and Firefox mascots (respectively a red daemon, Tux the penguin and a fox). You are never too young to taste the truth 😉

I also gave a lightning talk about Gemvid, my solution to monitor rats general activity. I tried to explain most biological information needed to understand the principles and I think people were really interested in this software, something with an application a bit different than the previous talks. I updated the Gemvid website and I uploaded the latest revision (0.6c) that was “analysing” the audience from my laptop during the talk. Finally, I also uploaded the presentation (PDF, 1.3Mb) and you can directly see it below.

See you next year, for the next version?

Baby movements during sleep

After a while, here is why I got a TV tuner for my Linux laptop, took screen captures and wrote a script to add a timestamp on pictures … I wanted to know how my (then 5-month-old) son was sleeping (his mom can be reassured: I was not planning to put electrodes on his scalp 😉 ).

Get the Flash Player to see this player.

var s1 = new SWFObject(“../videos/player.swf”,”ply”,”360″,”240″,”9″,”#FFFFFF”);
s1.addParam(“allowfullscreen”,”false”);
s1.addParam(“allowscriptaccess”,”sameDomain”);
s1.addParam(“flashvars”,”file=../videos/081129-night.flv&image=../videos/081129-night.jpg”);
s1.write(“container”);

Following this, I had interesting discussions with my dad about sleep patterns in babies. It could also be interesting to hybridize what we did for Gemvid and this simple solution in order to be able to quantify human/baby movements during sleep. My little knowledge of OpenCV can then come in handy for the motion and pattern detection …

Some additional technical details : Video was made from 321 TV screen captures (1 every 2 minutes) and played back at 1 frame per second. It was converted with FFmpeg (LGPL) and the Flash player is JW FLV Media Player (CC by-nc-sa). Ok: Flash is not free.

Short script to add a timestamp on pictures

Here is a short script (1.6kb) to add a timestamp on all PNG pictures in a directory. It requires Python and the Python Image Library (PIL). In order to use it, modify some parameters in the beginning to suit your needs (images directory, font file and size, etc.) and launch ./timestampFiles.py. Here is a before/after example (size of pictures is reduced to fit in this blog):

Before/after example of adding a timestamp to a picture

Note 1: the font is not included in the script. Here, I used FreeSans which is a true free font (GNU GPL with font exception). It is available here (local copy, just the FreeSans font, 753kb).

Note 2: I chose to convert PNG images to JPG ones for 2 reasons. First, my capture script gives me PNG images (see previous posts). Second, I want to be able to copy all JPG pictures in a MJPEG movie. It shouldn’t be difficult to change the different file formats to suit your needs (ask me if you can’t do that).

Note 3: I guess this would also have been possible using a bash script and imagemagick, Perl or any other programming language 😉

Pixel lapse under Linux

pixel-lapse under Linux

Finally, I got a working pixel lapse software under Linux 🙂 It’s a bit late (and I have to work tomorrow), code is rather dirty but I’ll publish it as soon as possible (btw that’s why I needed a webcam and a library to read it yesterday). Originally,

"pixel lapse" photography is the process of creating an image one pixel at a time. Beginning in the upper left corner, pixels are captured sequentially at a set rate until the entire image is formed.

Unfortunately, their software only runs on MacOS and Windows and requires Quicktime. Here, I "only" use OpenCV which is free and available under all the OS mentioned in this post. More details soon …

The “full-size” (640×480) image is here on Flickr

Edit on November 5th, 2008: version 0.1 of the software is available here.

AEL-NG?

A few days ago, I was sad to see that the Association Electronique Libre (AEL) website was down and only replaced by two measly <html> tags. For those who didn’t know it:

The Association Electronique Libre is a belgian association protecting the fundamental rights in the information society.

The Association Electronique Libre supports the freedoms of speech, press, and association on the Internet and any electronical mediums, the right to use encryption software for private communication, the right to write software unimpeded by private monopolies, the right to access and preserve public domain and free digital information.
(from an old copy of the AEL website)

Although it was based in Belgium, the information it contained as well as the actions that were supported exceeded the small Belgian borders. The wiki was a very useful and valuable source of documents, links and comments about freedom in the electronic media. “Fortunately” we still have a 2007 version of the website on archive.org and some messages from the mailing-list were kepts on the mail-archive and open subscriber (and I will preciously keep my archives!).

Following a small exchange of e-mails with one of the main guy behind AEL, the machine hosting the AEL is simply dead (the fact the machine was dying was announced a long time ago, no one apparently reacted). I guess (or rather hope) that the data is still available on the hard disk(s).

Now what? Beside the fact we are all getting “older” with other priorities in life, how come we don’t feel more concerned about our freedom in the cyberspace? Internet liberties are still in danger [1], the Electronic Frontier Foundation website has more and more issues, a paper-media publishing house is printing comics to “educate teenage youth about an array of issues ranging from privacy, free software, security and the impact of politics on personal freedom as it relates to the use of technology”, … Are we too lazy to try to understand what’s behind Facebook, LinkedIn, Orkut, Ning and other “social networking websites“? Maybe the technological gap between these polished websites and what indivuals can do “in their garage” radically increased since the advent of so-called Web2.0, inhibiting our will to actively participate in it [2], to make it ours? Did most of us “surrender” in front of the razzle-dazzle aspects of new communication media?

The idea behind this post title (AEL – New Generation?) is simply that something should be done to bring back to life a central, hopefully community-driven website to gather information about our freedom in cyberspace …

[1] Ironically, in this post, this reference is written by the main person behind the AEL
[2] About the “creativity” of people in Web2.0 applications, we could read with interest this article from C. Jonckheere and F. Schreuer (unfortunately in French only)

Vertical badge

vertical number of days without Belgian governmentI was writing the next version of my badge counting the number of days without Belgian government when Laurent added his comment requesting for a vertical version. You can see it on the right.

Since the original release, I also added translation of the sentence in Dutch and German (after all, Belgians are speaking 3 official languages). And I approximately centered the text on the vertical version (I personally prefer the text on the right for the horizontal version but you can easily modify this by yourself).

As usual, here is the HTML code to include this vertical version in your page, blog, etc.:

<img src= "http://www.epot.org/belgov/belgovv.php" alt="belgov counter on epot.org" />

And here is the source code (for both version): belgov-0.3.tar.gz (20kb).

How many days without governement?

Now it’s not a secret anymore: more than 148 days passed since we, Belgians, went to vote (it was on the 10th of June 2007) and we still don’t have any government!

If you want to count the numbers of days without Belgian government, it’s easy: just have a look at Belgian newspapers. Or … have a look at the counter below (in French, Vlaams or German) 😉

belgov counter on epot.org

And if you want the same on your website or blog, it’s very easy, just copy/paste the HTML code below:

<img src="http://www.epot.org/belgov/belgov.php" alt="belgov counter on epot.org" />

Enjoy!

P.S. For those who could be interested, here is the source code: belgov-0.2.tar.gz (6kb). It’s written in PHP and under the GNU GPL (so it’s free!). Each small animal (Lion of Flanders or Rooster of Wallonia) represents 2 days without government. On the last line, there is a small gradation of transparency.

P.P.S. If you want to specifically support the unity of Belgium (because quite a number of politicians and citizens want to split Belgium), Pilok has a “I love Belgium” banner. Here I just wrote a counter of days without government, whatever your opinion is about Belgium.

Edit on Nov. 7th: I added translations in Vlaams and German for the line on the bottom.

More on Java DBs comparison

Following a comment from Alexandre on a previous post, I went a little bit further with my performance test of database engines running under Java. This evening, I tested a profiling tool and a variable number of insertions/retrievals (I didn’t tested transaction).

Taking the code from the previous time, I simply changed the number of elements to be inserted/retrieved. As expected, the durations of object initialization (except for 2 points for Derby and H2) and database creation did not change with the number of elements to be inserted, Derby being still the slowest engine to create a simple database (1 table only). The durations of the insertion step increased slowly with all the database engine, except for SQLite+JDBC: you can see a much steeper initial angle in the increase of the duration in the graph below (be careful: x-axis shows logarithmic values).

Click for bigger graph

For the retrieval, all the engines increased their time spent in this step in the same way (approximately). All the graphs can be seen here.

Performance analysis was completed using a free profiling tool, jRat (list of tools available here and here). There is a big difference here since jRat measures the time spent in each function. These functions approximately match the previous “steps” but not exactly. And I had memory problems using jRat with a number of elements inserted > 100 (hence the limit here).

Derby and SQLite+JDBC always performed worst than other engines (except for the showData() function). Usually, H2 and HSQLDB had more stable results (smaller standard deviations). And SQLite+JDBC was still the worst engine regarding data insertion (see graph below).

Click for bigger graph

It was also very strange to see that H2 and HSQLDB took approximately the same time to insert 100 or 1000 elements (note that for HSQLDB, I did not take into account the fact one needs to explicitly close the connection, allowing HSQLDB to temporarily store data in memory before committing them to the file — but closing the connection didn’t take so much time). All the graphs can be seen here.

One conclusion of all this: if you write a Java application and need a fast Java database engine, use HSQLDB (BSD-like license) or H2 (modified MPL). Next time, I’ll test transactions (but I don’t know when it’ll be).