The story of Abdallah Higazy
Rafe Coburn writes about how to get an innocent man to admit to being a terrorist: the story of Abdallah Higazy.
Abdallah Higazy was staying in a hotel in New York City on September 11 and the hotel emptied out when the planes hit the tower. In his room, a radio was found that can be used to talk to airline pilots. FBI agents threatened Mr. Higazy, that his family in Egypt would be tortured if he didn't confess that he was connected to the events of 9/11, so he confessed even though he's innocent. It turned out that an actual pilot had forgot the radio in the room that Mr. Higazy was staying in.
This is what you get if you allow "coercion". This is what you get if you give law-enforcement officials too much power. It's a prime example of racial profiling and an important reminder that threatening people cannot be part of fighting terrorism. Ever.
Impressive satellite imagery of the fires in California
Distance queries
With a little time last night, I decided to publish a new page in the Work-section. It’s called How to query database records by their relative distance to each other on Earth?.
I recently solved this problem for a customer and had to search the web a lot to find all the necessary information. So I thought writing it all down might save someone else some time in the future.
Porting a database from MySQL 5.0 to PostgreSQL or other DBMS
...just got a lot easier. As I just saw on Peter Nixon's weblog, mysqldump has now new values for its command-line switch "--compatible", namely "db2", "postgresql", "oracle" and "mssql". So that should make this part of my life a lot easier in the future. We still have some eZPublish installations that run on local MySQL databases instead of our PostgreSQL setup.
If you can read this…
then maurus.net has successfully moved to a new, dedicated, server running Debian Etch. The theme has new ajax-based features (though strictly speaking the involvement of XML is minimal :-) ) and I can finally install a fully spam-protected mail server. Let's see where this goes.
simplejson 1.7.x, ActiveState Python and the Visual Studio 2003 compiler
If you’re trying to install a Python library like simplejson that uses code written in C or C++, you might run into this error message:
error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing “-c mingw32″ to setup.py.
There seem to be 2.5 possible fixes. 2 of them fix the issue directly, the .5 is a work-around for simplejson:
Install Visual Studio 2003 or at least the non-optimizing C++-compiler that Microsoft delivers with the free .NET SDK. Finding the right version might be an issue though. This fix doesn’t work for me, as I have Visual Studio 2005 installed here already.
Use a Win32 port of the GCC C++ compiler. Details on how to compile simplejson 1.7 with the MingW32-GCC C-compiler.
Disable the C-extensions altogether by using this work-around:
python setup.py –-without-speedups bdist_[whatever]
I simply chose the work-around. I don’t know if there are similar command-line switches for other libraries, but for my current project the performance of json-parsing code is not an issue.
Tab-completion with ActiveState Python 2.5 in the interactive shell on Windows
The default documentation tells you that this will only work on Unix, because the readline library is not available on Windows, or at least not included in ActiveState’s Python distribution.
In fact, there’s a ctypes based version of the readline library developed here: PyReadline on SciPy. You can use this easily to enable tab-completion on a Windows system:
ActivePython 2.5.1.1 (ActiveState Software Inc.)
1. >>> import readline, rlcompleter
2. >>> readline.parse_and_bind('tab: complete')
IronPython (for people not knowing already: IronPython is Python for the .NET CLR/DLR) has tab-completion built-in in the shell, ipy.exe. You enable it like this:
c:\>ipy.exe -X:TabCompletion -X:ColorfulConsole
I’m currently upgrading this weblog (read: I’ve been at it for 3 months now ;-) ), but I needed to write this down. I hope this helps someone else out there…
Update (10/16/2007): I’ve moved this weblog to a new server… it only took me three months :-). Time sure flies around here.