Skip to main content

Posts

Showing posts from January, 2014

Compiling progressiveCactus on Mac Mavericks

Follow their instructions for grabbing the sourceYou will need wget, which is not present. So from here wget is simply curl -O. However there are a bunch of problems with making wget an alias to curl -O from aliases not being expanded in noninteractive shells to some debate about what /bin/sh does on mac. My pragmatic solution wasmake a one line script curl -O "$@" and save it as /usr/bin/wget and chmod +x for that file Then proceed with make which should conclude successfully

Matplotlib animations mac os x (using built in codecs)

Mac OS X (Mavericks) comes with a bunch of built in codecs listed here that people can play with the bundled quicktime application. If you can give people animations in these formats/codecs they don't have to do any work to play them on their mac.

In order to get matplotlib saving animations in these formats you need to do:

Install ffmpeg for mac. I grab Mac binaries from here. You may need 7zX for mac to unzip the file.Place the binary in a suitable local path and make sure you add the path.When you call matplotlib.animate pass the arguments extra_args=['-vcodec', 'libxvid'] This should produce a video file that is playable by QT on any standard install of Mac OS X

Preview and signatures

Preview on Mac OS (at least the newer ones) has limited editing options that I find very useful (It's a waste to pay the premium on Adobe Acrobat Pro for the simple editing I need). One major task is to insert signatures on documents that are being passed around electronically (so much better than using mail and hardcopies). Preview has a neat trick where you can create signatures without needing a scanner. You simply sign on a piece of paper and hold it up to the camera and some sophisticated software extracts the signature for you. But like all things Mac, they got too clever. There is no option to load a signature from an existing file. This does not represent any kind of extra security. If you don't have pen and paper handy, or you need to insert some one else's signature (as I did) you would have to find a printer, print out the signature and hold it up to the camera. So I had one of those rare 'smart' moments. I took the signature file, opened it up on my…