So I finally got around to moving my sandbox type stuff and my blog off of slicehost and onto linode. I rarely touch my blog and do anything with wordpress so it is always a bit of a chore to upgrade etc. ’cause I’m treading on unfamiliar ground.

Anyway, I thought I would give myself a challenge and run wordpress behind nginx. The formula is to proxy nginx to php-cgi. This worked fine but was horribly unstable as the php-cgi process goes down quite often. The problem was running spawn-fcgi from init.d. It needed to be run from a proper process manager. As luck would have it, I had supervisord already running to monitor uwsgi.

I wish I would have stumbled across this post from Grig Gheorghiu, as it would have saved me a lot of effort. Funny how he is also a python guy.

Andy McKay linked to a bit of interesting data from his twitter account. I wanted to be able to visualize the data so I used it as an excuse to try out flask, a python micro web framework, and some other stuff. It was all a bit of a yack shave because I could have done the whole thing as a static page but what the hell. It also led me to finally moving my blog off of slicehost and over to linode which of course led to an upgrade of wordpress which led to trying wordpress behind nginx and so on and so forth. Such is the life of a techie.

Anyway without further ado, click through to see all locations in BC where a marijuana grow operation was found by the police in the last year. And here is the raw data.

The visualization shows a circle at the location and the size is proportional to how many plants were seized. A scaling factor was applied to the circles so that they are still visible, and proportional, at all zoom levels.

Also, don’t be surprised if the whole thing comes crashing down because this was thrown together as an experiment.

Installing supervisor on Natty Nat will undoubtedly throw the error ImportError: cannot import name fixtag

The root cause of this error is the python-meld3 library and the following import statement:

from xml.etree.ElementTree import fixtag

The problem has been fixed in version 0.6.7 of python-meld3. Therefore, before you install supervisor, do the following on the command line as root:

aptitude install python-meld3
pip install meld3==0.6.7

The above will install version 0.6.5 of python-meld3 and then pip will upgrade it to the latest. You can then install supervisor without any problems.

If you want you can read the gory details of the problem in python-meld3.

© 2013 rootsmith blog Suffusion theme by Sayontan Sinha