When somebody offers to compile your Python code, exactly what kind of mischief are you getting yourself into? What diabolical schemes does a just-in-time compiler enact to transmute sluggish Python code into something speedier? This post is going to illuminate mysterious inner workings of a just-in-time compiler by following a function through its various stages of existence within Parakeet which is a library that accelerates numerical Python.
Some functional programming languages (like Haskell) offers a functionality called lazy evaluation by default. It consists of defering evaluation of functions to the moment their results are actually used. Instead of results, everything works as if your function call are returning the recipe to compute the actual result. In python, it is actually pretty straightforward to hack __getattr__ and __setattr__ to implement an hackish lazy evaluation as a decorator.
A post showing how to build a robust multicast Python application.
Out of the box, Django includes a significant number of template filters. But sometimes you might need to create your own custom template filter. This post shows how making your own template filters is easy and allows you to do some pretty creative formatting in templates.
Explore ways to model optimization applications in Python using Python Optimization Modeling Objects (Pyomo), an open source tool. You can use Pyomo to define symbolic problems, create concrete problem instances, and solve these instances with standard solvers. This article series shows how to leverage Pyomo's ability to integrate with Python to model optimization applications. The part 1 covers the basics.
A post by Ned Batchelder about how Rails' security troubles also affect Python.
Interesting Projects, Tools and Libraries
An implementation of the Ruby programming language, in Python, using the RPython VM toolchain. It's goals are simplicity of implementation and performance.
Daft is a Python package that uses matplotlib to render pixel-perfect probabilistic graphical models for publication in a journal or on the internet. With a short Python script and an intuitive model-building syntax you can design directed (Bayesian Networks, directed acyclic graphs) and undirected (Markov random fields) models and save them in any formats that matplotlib supports (including PDF, PNG, EPS and SVG).
HoloPy is a python based tool for working with digital holograms and light scattering. HoloPy provides a powerful and user-friendly interface to scattering and optical propagation theories. It also provides a set of flexible objects that make it easy to describe and analyze data from complex experiments or simulations.
Live object editing for django with jQuery UI and Bootsrap. With django-editlive users can edit model fields with minimum efforts without reloading the page.
Pyteomics is a cross-platform Python library providing a rich set of tools for MS-based proteomics. It provides modules for reading LC-MS/MS data, search engine output, protein sequence databases, theoretical prediction of retention times, electrochemical properties of polypeptides, mass and m/z calculations, and sequence parsing.
Django-mini is a command-line utility for running Django management commands without a settings module. It is intended to help developers run and test stand-alone Django apps.
Wrapper around the Mega API.
Zipline is a Pythonic algorithmic trading library. The system is fundamentally event-driven and a close approximation of how live-trading systems operate.
A fun little gravity simulator.
This project provides tools to play with geographical data. It also works with non-geographical data, except for map visualizations.
Authorize SSH public keys from trusted online identities.
A simple multiplayer game built on Pyramid framework and socket.io
Python Koans is an interactive tutorial for learning Python by making tests pass.
This is a little CLI utility that helps deploying static websites to Amazon S3.
Books
This book is an introduction to numerical methods. It covers the usual topics found in an engineering course: solution of equations, interpolation and data fitting, solution of differential equations, eigenvalue problems, and optimization. The algorithms are implemented in Python 3.