Ough, my blog just got infected with Blog.Worm.
The logs of my (drupal powered) website show a lot of referer spam. Some time ago I had this statistics page which contained a listing of the last 10 pages my site's visitors came from (aka referers). Soon spambots found out and spammed this list. I made the list invisible for anonymous visitors, but nevertheless spambots stil target my site (less frequent than when the list was visible, however), polute my stats, use bandwidth, use processing power and kill those cute little puppies. Now I went a bit further to block those dirty spambots ...
When you point your Mozilla or Firefox browser to a malformed url, for example
: after the http)
http://http://www.google.com (two times
http://), you don't end up where you would expect.
English google users would get served with
Micr oso fts website, while I (a Belgian/Dutch google user) end up at
This page explains what is happening here. And to follow the proposed solution, I'll put here a link to information about http.
This weekend I encountered a weird problem during programming C extension modules for Python. For some obscure reason floats from my C extension modules were formatted with a comma as separater (e.g.
123,456) instead of with the more familiar point (e.g.
123.456). Obviously some locale related problem. Most of my desktop and applications are set up for Dutch (my native language), but when I'm programming/working I use English and scientific conventions (e.g. a point as decimal separator). After isolating the problem I found out it was related to importing the pylab (aka Matplotlib) module (which I started using for plotting graphs and figures from Python). The following situation illustrates the problem.
A weird outcome of a halftoning experiment. Not what I would call a good halftone, but it's nice on itself.
Scipy is a (set of) open source Python modules for scientific/mathematical/engineering stuff. I (try to) use it instead of Matlab or its open source clone Octave because I don't like Matlab's scripting language and prefer Python's programming features.
If you want to store a 2D array (aka matrix) to an image file, the default behaviour of Scipy's
imsave() function is to rescale the matrix to a 0-255 range (like Matlab's
imagesc() function). For example:
The OpenDocument file format (aka "OASIS Open Document Format for Office Applications"), is an open and free standard for office files. It's fairly easy to read OpenDocument files in/from Python. Basicly, an OpenDocument file is just a zip archive but with another extension (".ods" spreadsheets, ".odt" for text documents, ".odg" for graphics and so on). The files in the zip file are mainly some XML files, like
Basicly, we just need two standard python modules from the nice standard Python library to extract data from a OpenDocument File: zipfile for handling the zip compression and xml.parsers.expat (or another xml parser module) for parsing the xml. A possible/simple/minimal way to do read a fictional spreadsheet file
pelican.ods is as follows:
I want to share an image with the world.
It is not art. It is just the result of a experiment that — how should I put it — went wrong.
To be continued
Man, this is heavy linux/unix commandline fun:
which which locate locate man man help help info info whatis whatis echo echo touch touch yes yes whereis whereis
It's a simple concept, but I already lost a lot of time looking for the solution: changing the active (aka default or just render) camera in Blender. I just can't find any clue in the (context) menus or in the wikified Blender manual. Google directed me to this Blender survival guide in which the solution is concealed:
select the camera which you want to make active and press