Category Systems

Make a RAM disk on Mac OS X 1.5 or later

Create the RAM disk: diskutil erasevolume HFS+ “ramdisk” `hdiutil attach -nomount ram://1165430` (the magic number 1165430 is explained here as the number of 512 byte sectors. The string “ramdisk” is just the name of the disk, which will appear under…

Calling a Python LP-solver from a PostgreSQL function

Prepare the database by installing PL/Python and a function: CREATE EXTENSION IF NOT EXISTS plpythonu; CREATE OR REPLACE FUNCTION hello_lp() RETURNS float[] AS $$ import subprocess output = subprocess.Popen ( [ “”, “” ], stdout = subprocess.PIPE, stderr = subprocess.STDOUT…

Introducing the Web Co-Processor

Here is a project I’m working on called the Web Co-Processor (credit for name goes to Marcos Vaz Salles). There is a demo you can try if you clone the project. Read the following four bullets and you’ll understand what…