Tiny Colorful Dots 0.2

Oh right, I forgot. A brand new version of my tiny-yet-oh-so-useful color picker with lots of lovely new features (one of which is ColourLovers support!) is available.

Some instructions:

  • Hold Shift + Ctrl to pick colors from the screen.
  • Use the “Precise” dropdown box to blur the magnified image as it is captured (to choose an average color).
  • Click on a pixel in the magnified image to pick that color.
  • Click on the selected color swatch on the right to invoke the Windows color picker.
  • Double-click on an entry in the list of color formats to copy it to the clipboard. Right-click and Paste to paste almost any color format into TCD.
  • Click on the [+] button in the palette view to add the current swatch to the palette.
  • Click on a swatch in the palette to replace the current swatch with that color. (Shift-click to blend with the current color.)
  • Right-click on the palette view for additional options regarding the palette.
  • Right-click elsewhere in the window for some more options, including Always-On-Top.

Download here:

Python MySQL (MySQLdb) Windows Binaries for Python 2.6 and 2.7

(The post title is verbose on purpose for maximum Google juice.)

Below, Windows binaries for MySQLdb (and as a bonus, OurSQL (I wanted to try it out, heh)) for Python 2.6 and 2.7. Built using VS2008 Express on Windows XP, from .tar.gz source, against MySQL 5.1 client libraries. These are hosted on Dropbox.

Hope these alleviate someone’s pain :)

Tiny Colorful Dots

Who doesn’t love tiny colorful dots?! Just to scratch an itch, I wrote a (very!) small color picker app that does a little more than just that; see the attached screenshot.

Hope it’s of some use to someone – download TCD-0.1.zip here (10 KiB); requires .NET Framework 2.0.

Bleach

Inspired by Acme::Bleach, here’s Bleach for Python.

  1. Save the bleach codec in Python/Lib/Encodings/. The codec can also be used as a command-line filter for source code:
    python bleach.py < my_source.py > bleached_source.py
  2. Run a bleached program, such as Hello, world.

It’s 3:40, so the code is not the cleanest imaginable.

Spotify-compatible PuTTY URL Regexp

Exactly what it says on the tin.


(((https?|ftp):\/\/)|www\.|spotify:)(([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|net|org|info|biz|gov|name|edu|[a-zA-Z][a-zA-Z])|((album|artist|track|playlist):([a-zA-Z0-9_]+)))(:[0-9]+)?((\/|\?)[^ "]*[^ ,;\.:">)])?

EDIT: Seems that PuTTY always tries a web browser, instead of delegating the URL to the OS to manage, so here’s a workaround (200 KiB), RunArg, which is a trivially simple program to just open the given parameter using the Windows shell. Source code for both the C and AutoHotkey version is included. (If you can’t spare 177 kilobytes of extra bandwidth, here’s a ZIP with only the C version, clocking in at 3024 bytes.) The difference is that the AutoHotkey version is 57.7 times larger than the C program, and probably slower, but you can compile it yourself without getting GCC, if you don’t trust the binaries included. To use it, set it in PuTTY’s Preferences → Hyperlinks as the browser executable to use (and the same with the regexp, in the regexp box.)

FARR_TinyEv

FARR_TinyEv is a little plugin for mouser’s Find and Run Robot launcher that integrates the brilliant Voidtools Everything file indexer.

More information on the DonationCoder forums.

Download here: FARR_TinyEv 0.9.4 (11 June 2009, 18 234 bytes.) SHA1: 8e95113b32f008b53c9cffca9aa94f1694ed1f38

Flourishmator

So I wrote a little, silly Python script to turn static flourishes like this into rather attractive animations like this (link leads to Servut.us’s Dropbox) as used in so many video productions nowadays. I got the idea from Video Copilot’s Evolution, btw.

Anyway, here‘s the code. It requires Python 2.5 or newer and PIL, the Python Imaging Library, installed. It will also automatically try and call ffmpeg to generate a FLV video sequence from the generated frames.

I’d love to see what people use Flourishmator for, so please comment if you feel like it.

World wakeup map

Inspired by this xkcd strip (and via maraz), here is a World Wakeup Map! (Or rather, a world map which tells you where in the world the clock is X).

Tested with Firefox 3. YMMV.

Methlab 0.1 (prerelease)

Okay, I said I wouldn’t post often, but look at me go.

Another audio-related piece of software, Methlab (more of a pun on the well-known math software than anything else… honest!) is an expression evaluator for audio. What that means is that it allows you to apply a piece of script to any sample you come across, or entire songs if you feel like it. It supports all formats libsndfile supports, and uses Lua as its scripting language. Don’t worry, you don’t need to know Lua to use Methlab!

This is prerelease software, so it might be buggy (though I haven’t noticed anything showstopping), but is certainly lacking features that will appear in the final version. I have stuff planned. Mwahahaha.

Okay, that aside, quick usage instructions. Methlab has no GUI, so you’ll be using it from the command prompt. For example, the command line methlab input.wav output.wav x=x*2 would read input.wav, double its amplitude (with clipping) and output that into output.wav.

All of your usual mathematical functions (that is, abs, acos, asin, atan2, atan, ceil, cosh, cos, deg, exp, floor, fmod, frexp, ldexp, log10, log, max, min, modf, pow, rad, random, sinh, sin, sqrt, tanh, tan) are available, thanks to Lua’s math library. If you are feeling esoteric, you can also use all the constructs Lua allows you to. (Table ring buffer, anyone?)

Comments and suggestions welcome, of course.

Download here: Methlab 0.1 prerelease (zip, 168K, closed-source freeware)

Midity 1.0

Midity is a simple joystick to MIDI mapper for Windows written in C (and Lua).

Simply put, it allows you to use any joystick, gamepad, dance pad or anything that Windows recognizes as a joystick as a MIDI controller. This includes the Nintendo Wiimote, if you have the right software (PPJoy and GlovePie). I wrote it this April and have successfully tested it with a Positive Gaming Impact dance pad and a Wiimote, using the Microsoft Bluetooth stack.

The configuration can be done in the command line in true UNIX style – midity -m 1 -j 0 -mt 1 -mch 1 1 100 -mc 5 -mnv 2 C#3 80 -mc 1 -am 1 11 0 127 – or with rather intuitive (well, this is a programmer speaking) Lua configuration scripts like

button[1] = { toggle=1, cc=CC.ModWheel, value=100, hold=1, channel=1 }
button[2] = { note=”C#3″, velocity=80, channel=5 }
axis[1] = { cc=CC.Expression }

There’s instructions for the configuration syntax in conf.lua, included in the ZIP. I hope you can find some use for this! I’d love to hear any opinions, suggestions etc. Feel free to comment.

Oh, by the way: You’ll very probably want to run this through Command Prompt (though you can just drag a .lua configuration file onto lua.exe and it should work).

Download here: Midity 1.0 (zip, 84K, closed-source freeware)