Here is a collection of software, libraries or recipes that I wrote for my own purposes and that you might find useful as well. Unless stated otherwise, permission is granted to copy, distribute and/or modify these software under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
DANA is a python framework for distributed, asynchronous, numerical and adaptive computing. The computational paradigm supporting the dana framework is grounded on the notion of a unit that is a essentially a set of arbitrary values that can vary along time under the influence of other units and learning. Each unit can be connected to any other unit (including itself) using a weighted link and a group is a structured set of such homogeneous units.
In collaboration with Axel Hutt, we've been studying the spatio-temporal activity propagation which obeys an integral-differential equation in two spatial dimensions that involves a finite transmission speed, i.e. distance-dependent delays and derived a fast numerical scheme that allow to quickly simulate numerically such equations. This python script implements this numerical integration using python, numpy and scipy library.
In collaboration with Yann Boniface, we designed a variation of the self-organising map where the time-dependency learning function has been replaced. This allows for on-line and continuous learning on both static and dynamic data distributions. The newly proposed algorithm does not fit the magnification law and the vector density is not proportional to the density of the distribution as in most vector quantisation algorithms.
Here is a list of some standard neural networks written in python. They were made to be simple and useful for students. Each script is self-contained and is around a hundred of lines. Numpy is required for simulation and matplotlib for visualization.
Glumpy is a python/OpenGL library for the fast vizualization of numpy arrays, (mainly two dimensional) that has been designed with efficiency in mind. If you want to draw nice figures for inclusion in a scientific article, you'd better use matplotlib. If you want to have a sense of what's going on in your simulation while it is running, then maybe glumpy can help you.
SciGL (Scientific OpenGL Visualization ToolKit) aims at facilitating the development of scientific visualization by providing a set of C++ classes for rapid prototyping of scientific visualization software. It has not been designed as a library since the goal of SciGL is to try to offer a minimal set of objects without the need for any kind of installation. A large number of examples is provided to show how one can use parts of SciGL components to suit its own needs.
The goal of glipy is to create a comprehensive environment for interactive and exploratory computing. To support this goal, glipy has two main components: an interactive Python terminal and an architecture for embedding various graphical elements directly within the terminal.
Since modern terminals are able to handle up to 256 colors, it is thus quite easy to visualize a 2-dimensional numpy array as long as it fits within the terminal. It might come handy to quickly check how an array looks like.
Python bindings for the FreeType library high-level API.
A modified rs2html.py to write a scientific article using the ReST format.
atb-python offers python bindings for the AntTweakBar library which is small and easy-to-use C/C++ library that allows programmers to quickly add a light and intuitive graphical user interface into graphic applications based on OpenGL, DirectX 9 or DirectX 10 to interactively tweak their parameters on-screen.
Glydget is a(nother) pyglet GUI toolkit dedicated to "debugging" or scientific computing. It is far from a complete GUI system (like kytten or simplui) but rather aims at a quick and fast solution for displaying/editing variables and pressing buttons.
Pyroom is a fullscreen editor written in Python and GTK featuring full screen multidocument text editor, small set of shortcuts, simple help page for shortcuts and different styles / colorsets available. More recent versions are available at http://pyroom.org.
A matplotlib alternative gallery
If you want to contribute, clone the gallery repository at https://github.com/rougier/gallery and submit a pull request for a new example:
Inspired by the wordle site, I made a quick try in python using cairo, numpy and pyglet to get more or less the same result. The script allows you to save the image as well as a clickable map to link each word to a specific link. Code can be improved in a lot of different ways so feel free to modify it.
numpy extract is a small python script that allows to extract a sub-array centered on a given position using a fixed shape, even it is out of bounds.
numpy group proposes an alternative implementation of record arrays using contiguous block of memory. The design choice of numpy array layout is to have data pointer points to one block of N items where each item is described by the dtype. While it makes sense in most situation, it prevents record arrays to have contiguous block of memory for each elementary dtype.
Boost provides free peer-reviewed portable C++ source libraries. You will find in the archive a set of boost python examples that illustrate various boost mechanisms (as well as different build systems).
OpenGL/FreeType is a simple engine for displaying a unicode text using a (single) vertex buffer. The idea is simply to tightly pack every necessary glyphs into a single texture and to generate a single vertex buffer to draw the text.
Inspired by the VIM powerline, I've coded a small powerline-like for emacs. Original sources are available from the emacswiki. Since then, Donald Ephraim has rewritten this package and his version uses many of the techniques in the original but tries to make it easier to add new things
Hills screensaver let you gently drift over rolling grassy hills, using ARB multitexture, heightmap and lightmap. It requires SDL and OpenGL and should work with xscreensaver and gnome-screensaver.
Chris Kent has ported hills to OSX and made a screensaver out of it (sources). Nick Ziztmann has since released an updated version on http://seiryu.home.comcast.net/~seiryu/savers.html and sources are available on github.
GNUBiff is a mail notification program that checks for mail and displays headers when new mail has arrived. GNUbiff features include multiple mailbox support, pop3, apop, imap4, mh, qmail and mailfile support, SSL & certificates support, GNOME & GTK support and many other features.
While these software are certainly outdated and may not run on modern linux distributions, they may be useful for code study. Of course, you're welcome to adapt them and send me the new code...
glpython is an OpenGL oriented python shell designed for efficient interactive work with all major GUI toolkits in a non-blocking manner as well as a library to build customized OpenGL objects using python as the basic language. GLPython relies on backends such as GTK, WX, SDL or Qt that are able to open an OpenGL context and handle keyboard and mouse events when necessary
pycons implements a python (or ipython) shell within a GTK window and handles python stdin/stderr/stdout redirection and system wide stdout/stderr redirection (using a pipe), provides history based on the GNU readline package and automatic completion. It is also able to display matplotlib figures inline. Each call to the show functions actually produces a FigureCanvasGTKAgg that is inserted within the console. A 'replot' command has been added that replot the last figure.
SDL Terminal is a library that allows to have a pseudo-ansi color terminal that can be used with any SDL application (with or without OpenGL). The internal terminal surface is an SDL surface that is mapped to a texture when OpenGL is used (and then it is quite simple to use the texture to map it on any GL surface, like in the glcube example from distribution). Any user input raises an SDL_TERMINALEVENT that can be catched like any other SDL event and the event structure holds the user actual input.
Boom is a partial port of a Delphi/OpenGL demo made by Thomas Jahn. I only ported the particle engine to C++/SDL/OpenGL to get the very nice explosion Thomas designed. The soft is called "boom" since it basically displays an explosion every 5 seconds (with sound). It requires SDL and OpenGL libraries and it is supposed to be working indifferently on linux, mac os or windows (using DevC++).
GTK Object view uses Python self introspection capability to display any object attributes with the possibility to edit them and supports undo/redo operations.
Kohonen is an old version of the self-organizing map (SOM). This one has been coded in C++ and run under windows or linux.
Pets is a port of an old program by Masayuki Koba where a cute tiny kitty was following your mouse all over the screen. This new version is base on gtk and uses an xml description for animations. There is also another animation with a tiny tux (see the Artwork section for povray sources).