Let's share a secret!

Assume you have a secret that should only be revealed when several participants team up with their corresponding shares. Say, you have a CA certificate in a big company and you don't trust one person alone to behave themself.

Adi Shamir presented in "How to share a secret" a ...

Weiterlesen ...


Spatialite and SQLAlchemy

To be able to use Spatialite under SQLAlchemy (or GEOAlchemy), it must be loaded with every new connection to the DB. Since SQLAlchemy can and will tear down and create new connections to the DB at some time, we must register a hook that is invoked at connection creation time ...

Weiterlesen ...


Spatialite auf uberspace.de

Um Spatialite auf uberspace.de zu nutzen, reichen einige wenige Kommandos:

toast arm geos

lädt und kompiliert die Geometry Engine, und:

toast add http://download.osgeo.org/proj/proj-4.8.0.tar.gz
toast arm proj

kompiliert PROJ.4. Die URL ist dabei natürlich an das jüngste Release von der ...

Weiterlesen ...


Unicode __repr__ and IPython

Unicode __repr__ and __str__ functions that return non-ascii characters result on my IPython installation in a stack trace. Try this:

In [1]: class Foo(object):
...:     def __repr__(self):
...:         return u"äöü"

In [2]: Foo()
Out[2]: ---------------------------------------------------------------------------
UnicodeEncodeError                        Traceback (most recent call last)
<ipython-input-2-bbcd91f35259> in <module>()
----> 1 Foo ...
Weiterlesen ...


DPCM analyzed

I am currently building a little recordable music chip, like the Nuvoton ISD chips, but using nothing more than a microcontroller. Since these chips have quite little flash memory, I need to compress the audio samples. One way to do that is differential pulse-code modulation. It's a very low-complexity ...

Weiterlesen ...