Zenburn for EasyEclipse for Python 1.3.1

Abchernin has sent a step-by-step guide how to enable Zenburn colors into EasyEclipse for Python v1.3.1 - it should work with any Eclipse+pydev combination.
(more…)

Everyone Loves a SAT Solver

I needed DIMACS-format output from STP, so I hacked together a patch for it.

It works only against the SVN version of STP, but is trivial (although not automatic) to patch the latest non-SVN version also. To patch, cd to the STP folder, then use something like patch -R -p1 < stp_dimacs.patch

Then, use the “-o” switch to dump a DIMACS file to the current folder. Next, fire up your favorite SAT solver and profit…

Update: It seems the toDimacs call can create strange outputs. Be aware of bugs!

Visual Cryptography

After admiring the Krypto-Kekkonen, I thought I’d roll my own.

Here’s a Python script called split_pic.py to split an image of your choosing into two shares as described by the Naor-Shamir “visual cryptography” scheme. See the script for details.

The script requires PIL (Python Image Library). The outputs are two files, “share1.png” and “share2.png”. Print share1.png on paper, and share2.png on transparency/foil/plastic and carefully align them on top of each other to see the hidden image.

Or, you can use an image editor such as Gimp. Note, the layer effect must be “multiply” for both layers.

Here are two examples you can play with:

First share of the hidden image

First share of the hidden image

Second share of the hidden image

Second share of the hidden image

The Lost Sounds of Modern Music

Nowadays a lot of music is in digital format. One of the most popular digital encoding methods is MPEG-1 Audio Layer III, aka. “MP3“. Typically an MP3 file takes around 1/10 the size of the uncompressed original (depending on quality), thereby saving storage space.

MP3 uses a form of lossy compression. This means that the original sound can not be perfectly recovered. What is recovered (sound you hear) is some kind of approximation of the original.

MP3 does this lossy compression by removing the sounds which a human ear cannot distinguish, using so-called “perceptual coding“. The sounds which are removed are specified by a psychoacoustic model, which is created using human input, for example listening tests.

In other words, this means that many people are all the time listening to music with “something missing”. But what is this something, what does this something sound like?
(more…)

Make Dutch Country Cheese Soup!

After you’ve made some nice onion soup, how about trying a different soup? The soup is called Dutch country cheese soup.

Yet again, it is a soup that is perfect for the cold winter days (speaking of which, today it’s -15 C here).
(more…)

Make Onion Soup!

Winter will soon be here in full effect at the Northern hemisphere, especially here in Scandinavia. What better way to thaw from the subzero temperatures than with some good, hot food. Here’s an easy recipe for some damn good onion soup.
(more…)

Zenburn v2.4

Zenburn v2.4 is released!

Changes: 256-color syntax fixes (in Spellchecker and PMenu). Toggle for forcing dark background (Tim Smith).

Grab it from Vim.sf.net or from the Zenburn page.

Do-It Yourself Ominously Apocalyptic Prophecy Generator

Found this old crappy program I made a long time ago. It autogenerates ominous-sounding “prophecies” รก la Nostradamus. Have a look at Nostra and run for cover!

Example:

“You know how to handle contradicting of singularity, but you cannot read the signs of the times. It is the exile asking for a crown jewel, but the only thing given will be the sign of the Equator.” (3 John 9:44)

New Zenburn version (v2.3)

Includes CursorLine fix for 256-color mode by Pablo Castellazzi. Get it here! Also up at vim.sf.net.

LibGMP Version of Rowland’s Prime Generating Function

I took Christian Sonne’s C-language version of Eric Rowland’s algorithm to generate prime numbers, optimized it and enhanced it to use the GNU MP multiple precision arithmetic library.

This means you can keep on running it as long as you like and occasionally peek which primes pop out. It might be good to redirect the output to a file, too.

Grab the source here.