Stavros' Stuff

On programming and other things.

PyCuda and Windows

These last few days I have been busy trying to install PyCuda for Windows, but Windows sucks a bit in these things, so it took quite a bit of time. This is a post documenting my Odyssey.

First of all, I had no luck at all with Python 2.6. After two days I got it to compile, but it couldn’t load the module, so I installed 2.5 again. You absolutely need Visual Studio 2003 because I couldn’t get eit

Continue reading…

King for a day

Today I learnt that my sister’s house had gotten burglarized (laptop, camera and my two original gameboys with 30ish cartridges gone), who the hell would rob a student’s house?), so I needed a distraction to get my mind off it. Since I like playing 7 Cities on the iPhone, I started a game, and the online high score submission intrigued me, so I thought if I could somehow hack it to put myself in

Continue reading…

Mounting ddrescue images under Windows.

Today I needed to rescue the data on a hard disk brought to me, so I used GNU ddrescue (what else?) to create an image of the disk. As soon as the image was done, I discovered that the disk contained a FAT32 partition, which I wanted to mount. Mounting it under Linux was easy enough with the loopback devices, but Windows has no support for mounting disks as images.

I soon remembered [VDK](http://

Continue reading…

Spammers

As some of you might have noticed, we had some downtime yesterday. This is due to some gentlemanly folk who decided to use the server to send out spam. I thought I had configured the mail server well, but apparently some things can go wrong. For example, the fact that the root account doesn’t have a password set doesn’t mean that people can’t log in. Apparently my SASL service thought that by “no

Continue reading…

Dead Man's Switch

After the amazingly successful omnisync, it is once again time to present you of another creation of the inimitable Poromenos Studios.

This time, it’s Dead Man’s Switch. As you’re probably aware, everyone carries valuable information in their heads. It might be about their work, financial information, etc. If anything were to happen to them, this information would

Continue reading…

File synchronisation

It is once again time to shake the world from its very foundations with my latest creation. I present to you… omnisync.

omnisync is a file synchroniser (something like rsync), only it’s not built to synchronise just files, but also anything else. It’s extensible through a simple plugin architecture, and you can have it synchronise anything to anything within a few hours.

Continue reading…

Properly name TV episode files

I just encoded my Futurama DVDs to put on my iPod, but it’s a real hassle adding tags to every single file separely, so I created a script to do it for me. I had actually written this before, but I forgot it at home, so I had no option but to rewrite it.

The script (written in Python) will search the filenames for “sXXeXX” and look up the episode name on IMDB, and then will rename the file as “Sh

Continue reading…

Printing "Hello world!" using curve fitting techniques (or: The "Hello world!" function)

Well, I have a computer architecture exam in six hours and can’t be bothered, so I figured I would realize a lifelong dream of mine, and make a program that prints “Hello world!” using curve fitting techniques. Enlisting the help of a good friend with numerous mathematical papers under his belt (ostensibly because he could not afford a tighter belt), MATLAB and a longing for procrastination, we em

Continue reading…

Apple woes

As you may know, I bought a Macbook some two months ago, and the trackpad was broken. The pointer accelerates way too much when I move it, and that makes pointing at stuff really hard. Combine that with the keyboard-unfriendliness of OS X, and you have one big Mac hater in front of you. I sent it for service to the official Greek Apple distributor, Rainbow, but I was a bit worried that they wo

Continue reading…

Finding the Levenshtein distance in Python

I discovered today that Moneygement won’t accept unicode characters when someone adds transactions by email because of the editdist module I used to check it. Since I don’t really need a fast function to do it (it’s all eight-letter words on average), I decided to write my own Python version of the function and am sharing it here if anyone needs it (because I haven’t found a Python implementation anywhere). It’s released under a BSD license with attribution, meaning that I’d like it if my name was mentioned where it is used :)

Continue reading…