How to remove files ending with '~'

The vim text editor always produce a file ending with a tilde (~) as a kind of backup of the currently modified file (this is a default behaviour). On my MS-Windows machine (Pentium M, 1.73GHz), I was tired of manually deleting these files so I first used the “Search” option in the File Explorer. After some time, I got tired to wait for the results. So I wrote a Python and a batch scripts to find all these files. They are going much faster than the Search GUI. The first time I launch them, they are still going slow (but faster than a GUI). As you can see in the graph below, the second time I launch these scripts, they went at least 10 times faster. I’m not a specialist but I guess it has something to do with caching at the OS level. For the first run, the batch script is 20% slower than the Python script. After that, the Python script is 50% slower than the batch script (but between 3.7s and 5.6s, the difference is not big). ...

November 15, 2006 · 2 min · jepoirrier

OSS/FS players about GPL Java

Sun opened Java in the most elegant way of doing it (imho): the licence is the GPL. This move was analysed and commented by many people. Even some important Open Source/Free Software players gave their comments on a Sun website. Unfortunately, their comments are only available in a proprietary video format. You can now have access to audio recordings of these interviews ( Brian Behlendorf, Paul Cormier, Eben Moglen, Tim O’Reilly, Mark Shuttleworth, Richard Stallman and Dr. Marcelo K. Zuffo), to a text transcript and even to SHA1 sums of the audio files!

November 14, 2006 · 1 min · jepoirrier

Double quotes!

GGGRRrrrrrrr … I was quietly using R to analyse my data when, suddently, I wasn’t able to open the file containing these data anymore. It’s just a plain text file! How can it be corrupted? Here is the error message: t < - read.table('ratsdata.csv', header=TRUE, sep=",") Warning message: incomplete final line found by readTableHeader on 'ratsdata.csv' For hours, I tried everything: I counted the number of separators on each line, I counted the number of decimal points on each line, I removed double quotes around factors, I examined in details the final line, etc. (well, Python scripts did the job for me because my file already has > 700 lines). Finally, the solution was so dumb: I mistakenly deleted one double quote before a header. My first line looked like (1) and should look like (2): ...

November 14, 2006 · 1 min · jepoirrier

White &amp; Nerdy

It’s Sunday, let’s rest a little bit … I really liked this Al Yancovic’s video " White & Nerdy". To fully understand it, you need some basic technical background and a friend that looks like the white & nerdy guy in the video. Because, of course, you are not like him ;-) " Dont’ download this song" is also great (some background about DRM is welcome). " It’s all about Pentiums" is not my music style but some lyrics are good. ...

November 12, 2006 · 1 min · jepoirrier

How to fix Error 500 (or 302) in WordPress

After having updated WordPress to version 2.0.5, you can find some Error 500 (or 302) when writing new posts (you’ll fortunately not lose any content). Mark Jaquith wrote a simple plug-in to fix this little annoyance. Upload it, activate it and you’re free from this small bug.

November 6, 2006 · 1 min · jepoirrier

Simple Sitemap.xml builder

In a recent post, Alexandre wrote about web indexing and pointed to a nice tool for webmaster: the sitemap. The Sitemap Protocol “allows you to inform search engines about URLs on your websites that are available for crawling” (since it’s a Google creation, it seems that only Google is using it, according to Alexandre). If you have a shell access to your webserver and Python on it, Google has a nice Python script to automatically create your sitemap. ...

November 5, 2006 · 2 min · jepoirrier

Dry beveling micropipettes using a computer hard drive

I really like this kind of application: a person used an old hard disk to bevel micropipettes for electrophysiology [1]. It’s fast, simple, easy and the author got an article published at an impact factor 1.784. [1] Canfield, J.G. " Dry beveling micropipettes using a computer hard drive" Journal of Neuroscience Methods 158 (1):19-21.

October 31, 2006 · 1 min · jepoirrier

Search for images by sketching

On his blog, Laurent wanted to know who is this guy. I though it was an interesting starting point to see how good is Retrievr, “an experimental service which lets you search and explore in a selection of Flickr images by drawing a rough sketch”. Although my drawing skills really needs to be improved (and their drawing tools more refined - always blame the others for your weaknesses ;-) ), a first sketch gives some interesting results (see screenshot below): 7 retrieved photos (44%) show a b/w human face in “frontal view” (if you count the dog, it’s even 8 correct images). ...

October 29, 2006 · 2 min · jepoirrier

Automated Pubmed reference to BibTeX

In biology, we often need to use PubMed, a biomedical articles search engine for citations from MEDLINE and other life science journals. In the MS-Windows world, you have nice, proprietary tools (like Reference Manager or Endnote) that retrieves citations from PubMed, store them in a database and allow you to use them in proprietary word processing software (in fact, in MS-Word only since nor Wordperfect nor OpenOffice.org are supported). If you are using BibTeX (for LaTeX) as your citations repository, there isn’t a lot of tools. The best one, imho, is JabRef, a free reference manager written in Java (for me, the only “problem” is that it adds custom, non-BibTeX tags). Or you can edit the BibTeX file by yourself with any text editor. ...

October 22, 2006 · 3 min · jepoirrier

Diwali 2006 @ ISAL

On Saturday, after the Kolam ritual, we went for Diwali, the Hindu Festival of Lights, organized by the ISAL. It was very nice to meet people we already met on previous ISAL “functions” and to talk with them. And I think that ISAL is attracting more and more people, both of Indian origin (working in Belgium, for example) and of non-Indian origin: this time, people from Belgium, China, Poland, Russia, Spain, etc. were there. As usual, I took some photos.

October 22, 2006 · 1 min · jepoirrier