Category archives: Snaking
Discussions of programming, particularly of programming Python
Really Dumb HTML5 Video Tag Back-end
Written by
on
in
Snaking.
So you want to create a stupid-and-dirty HTML5 video tag to allow you to monitor a (local-only) multicast stream from your (Django + Nginx) web site? Not something to be seen by "real people", but a way for you to see if anything is broadcasting?
This is a pretty simplistic thing, again; do *not* do ...
How can an audio server take up 900MB of RAM?
Written by
on
in
Snaking.
So we want to capture the (alsa) output of processes and pipe it into an mpeg-ts stream. Except gstreamer's alsasrc can't do "monitor", so we wind up having to do a pulsesrc... which brings the server to its knees in a few minutes with memory exhaustion for no reason I can fathom.
Annoying part is ...
Experience has some value... and risk
Written by
on
in
Snaking.
Each time I sit down to help someone relatively new to coding I find myself somewhat awe-struck at how much I've "forgotten". Just install nginx with gunicorn and django in a virtualenv. Package up your code with a setup.py using distribute. Run your unittests with Nose. Use sphinx and embedded doctests.
You tell someone that ...
Piping Data Around with Fussy
Written by
on
in
Snaking.
In one of those cases where you ask a question, don't get an answer, then spend far longer than you intended playing with the problem, I've just added a Pipe mechanism to Fussy (why to fussy, you ask? Well because that's where I wanted to use it). Basically it provides a small wrapper around subprocess ...
So apparently I don't need to write my own test code...
Written by
on
in
Snaking.
Just stumbled across the OpenGL Samples Pack, which is a bunch of OpenGL sample code for advanced features... exactly the kind of thing I need to test if I've got PyOpenGL working... of course, they're written in C, but it's way easier to translate from C to Python than to come up with dozens ...
2Day Python (Our Tutorial for Software Carpentry)
Written by
on
in
Snaking.
http://readthedocs.org/docs/2daypython/
and you can branch and alter/adapt the source (in restructured text) as you wish using:
bzr branch lp:2daypython
One thing that seemed ...
Announcing the Fussy Firmware Packager
Written by
on
in
Snaking.
As mentioned a while ago, I was looking for a firmware packager that would allow for "user uploads a signed bundle" style upgrades for hardware devices. Esky is similar (even a similar on-disk layout), but focused on cross-platform and distutils-based "application" setup. Fussy is intended for "core of a system" setups, where the entire user ...
Libraries Exposing 8-bit Binary Strings to Python 3, Best Practice?
Written by
on
in
Snaking.
Query came up on PyOpenGL-dev this morning about how to handle GLchar pointer arguments. These are binary-specified arguments, they are human-readable text *most* of the time, ascii source-code and identifiers, that kind of thing, but nothing about GLchar pointer requires that they be ascii. They *are* 8-bit character strings (that's what GLchar pointer means).
But ...
Firmware Upgrade Module?
Written by
on
in
Snaking.
I'm wondering if this package exists, preferably in Python (well, I *know* it exists, as I wrote it for a commercial project, and can't use it any more. I'm hoping there's an Open Source version I can enhance for future use):
- bundle a .tar.gz (signed, optionally encrypted) for delivery to embedded platforms
- on platform, decrypt ...
Research in Action 2012
Written by
on
in
Snaking.
Spent the afternoon at Research in Action (at University of Toronto). Highlights:
- big classical (i.e. right out of the textbook) neural network used for road detection in satellite imagery; okay results, huge amounts of computing power involved; not sure it's really all that much better than a hand-coded solution, but it did seem to work ...