Python Descriptors Demystified


This clarifies things even more than the pycon 2014 talk on descriptors, which is also a commendable attempt at explaining this magical property.  Now I know what I’m doing and when to implement this technique I will have to refactor some redundant method logic.

I’ve saved a copy of the ipython notebook accessible with the password “beaumont”:


GAE Python SDK Installation Notes

appengine_finalThis installation log assumes you know what Google App Engine development is all about.  There are links to video resources there too.
The official installation tutorial here goes over the general steps below, which I have amended with my installation experiences (Notes) saved here for future reference or as a guide for Windows developers starting out.  I unexpectedly had a rough go with this seemingly simple tutorial, running into problems setting up the deceptively small list of dependencies.

Adventures in LTC/DOGE Mining

Litecoin-cleanLast December me and group of guys at work decided to make a modest investment in building and maintaining a Litecoin mining rig.  It was after we’d realized the Bitcoin ship had sailed and securing a Baby Jet from HashFast was an unscrupulous decision.

Why mine cryptocurrencies?

Bitcoin Investing Comic

Continue reading


openFrameworks, ofxCV, and ofxFaceTracker


Really bad ofxFaceTracker expressions example :D

I wish I could say I am a cool kid for figuring this out but this code has been around for some months now, but finally I got to see what all the fuss is about the past couple weekends. I feel like my first steps are pretty insignificant when you look at all the creative stuff that’s already been achieved with this, but still it’s so much fun to build these projects from source and play around with just my macbookpro and iSight.

It’s no excuse but I’ve been too busy with other side projects to get around to it ’till now.  At long last I cloned the openFrameworks github repo along with ofxFaceTracker.  After a couple years almost of knowing about these projects, the veil has finally been completely lifted!

After learning a bit about openFrameworks and cloning it I realized how clean and organized it is, making it easy to learn and extend.

I think this is my new playground for a while.  There are so many add-ons already to play with even ones for arduino and iphone.  Plopping in ofxFaceTracker was really much easier than it could have been, although I did do some clean-up of some libs and subsequently tweaking and reconfiguring the projects and solutions

Plowing through all the opencv and openFrameworks examples became a breeze and after soaking in all that information I decided to see if the face tracker software would work. It’s stunning to think that this is freely available out there and, above all, works! I have in my hands technology once only available through proprietary channels and I can dig in and see how it all works. I’m a kid in a candy store!

I hope to apply my expertise in facial animation to write an ofxFaceRetargeter to collect and remap data from the tracker onto a creature/character although it seems this has already been achieved through proprietary software like faceshift available in Autodesk App Exchange.  Things are changing so rapidly…  I need to dip my toes into Unity3d and C++ more in the coming weeks.


VStudio Plugin Build Environment for Maya_2012-x64 and Beyond

maya2011_thumbFree yourself from relying on other people to compile your beloved 3rd party plugins.  If you are interested in learning to write plugins it’s a great exercise to do it yourself.  Also take a look at the source code.  If it doesn’t make sense at first, sooner or later it will if you are dedicated to learning c++ or python or other OOP language for that matter.

Here are some concise steps to downloading, editing, and building the source of Micheal Comet’s poseDeformer yourself.  I’m not supplying the link to the source but you should do a quick search to find it.  If you weren’t aware of this awesome plugin dig in to figure out what it does by reading all about it and actually look into the code!  There are also download links out there that have the plugin completely compiled for you on Windows up till 2014.  To really learn, try building it from just the source and then undo from last to first the steps to setup the environment to see what happens when a project fails and actually read the debug output to try and make the connections yourself.

Windows 7 SDK:

  1. Download and install the Windows Software Development Kit version 7.1. Visual C++ 2010 Express does not include a 64 bit compiler, but the SDK does. A link to the SDK:

To make a VC Studio 2010 project:

  1. Start a new empty project in a directory other than source, name it poseDeformer
  2. Add the source files and header files by right clicking > add > add existing > choose files from extracted source.
  3. Right-click on the project and choose “properties”
  4. It’s probably a good idea when you’re following along to click “apply” after each step when you’re editing in the “properties” dialog
  5. Pull up the “configuration manager”
  6. Find your project, hit the Platform drop-down, select New, then select x64. Now change the “Active solution platform” drop-down menu to “x64.”  “copy from” drop down can read <empty>
  7. Change your toolset. In the Properties menu of your project, under Configuration Properties > General, change Platform Toolset from “v100” to “Windows7.1SDK”
  8. Go to General under Configuration Properties
  9. Set the target extension to “.mll”
  10. Set the platform toolset to “Windows7.1 SDK”
  11. Set the configuration type to “dynamic link library (.dll)”
  12. Go to the VC++ Directories panel
  13. Append “;C:\Program Files\Autodesk\Maya2012\include” to the include directories
  14. Append “;C:\Program Files\Autodesk\Maya2012\lib” to the library directories
  15. Navigate to C/C++ and Preprocessor
  16. Append “;NT_PLUGIN;REQUIRE_IOSTREAM” to Preprocessor Definitions
  17. Navigate to Linker and Input
  18. Append to additional dependencies the following list: “;Foundation.lib;OpenMaya.lib;OpenMayaUI.lib;OpenMayaAnim.lib;OpenMayaFX.lib;OpenMayaRender.lib;Image.lib”
  19. This step is optional, some instructions out there say to append: /export:initializePlugin /export:uninitializePlugin to Linker > Command Line Additional Options.  Don’t do it and run debug compilation to see if it works first!
  20. Open up poseDeformer.cpp and poseDeformerEdit.cpp and append this line at the top of the includes: #include <maya/MIOStream.h>
  21. Build

Next up:  Speed up build for future Maya releases with precompiled Maya headers & compile for Linux.

Helpful source link:

Minecraft Pi Edition Python Maze Generator

Rasp_turn_aroundThanks @Dave Finch for this great example! This is my favorite of all the Minecraft scripts out there already.  I’ve update this great tool with a little more Python fancy schmanciness.  Made it object oriented and added some functionality with the idea of upgrading the algorithm to generate the maze, make it 3D, and add some funkiness.  Stay tuned!

Maze mas grande, por favor!

Maze mas grande, por favor!

un maze mas pequeno por favor!

un maze mas pequeno por favor!

Continue reading


Headless RPi Gets it on with Dashing Arduino

These are my first explorations with the RaspberryPi in conjunction with Arduino.  I try to keep things as simple as possible and only use Cygwin terminal to administer the Raspi remotely via ssh or sftp.  Sometimes its just easier to use WinSCP to graphically drag and drop a bunch of files though.  For forwarding X11 I use Cygwin’s installation of XWin on my Windows machine as the client.  It’s as simple as setting the DISPLAY env variable and opening a ssh connection in conjunction with using the display forwarding option.

The Setup

  • Windows 7 PC running Cygwin with XWin
  • RaspberryPi running Raspbian — Debian Wheezy for RPi
  • Arduino powered with an old Linksys modem DC adaptor
  • Additional software: ssh, sftp, winSCP, Processing, Arduino, VICE
  • All software is free and open-source
  • All hardware is open-source and very cheap or salvaged!
RaspberryPi with Arduino

RaspberryPi with Arduino, 2 Hearts beating in just one LED.

Continue reading