Go, go, go
I’ve decided to learn Go. Not the board game, but the programming language. Why? I’ve been wanting to learn a systems programming language for a while, but have so far avoided picking up my brick of a C++ manual.
I’ve decided to learn Go. Not the board game, but the programming language. Why? I’ve been wanting to learn a systems programming language for a while, but have so far avoided picking up my brick of a C++ manual.
This video was mentioned on highscalability.com, so I thought I’d have a look. Knowning this stuff is useful when you’re in the business of delivering large amounts of geographical data to a large amount of clients. C10M = 10 million…
A few days ago I found out that using the Python debugger is so easy, I can’t believe I haven’t used it before. Import the module: import pdb Set a breakpoint somewhere in your code: def some_function(self, x, y, z):…
OK, calling it a benchmark is a bit of an overstatement. It’s taking two different database libraries for a quick spin, and seeing how fast they can write a bunch of integers to disk. A second benchmark checks how fast…
In a project I’m going to use clustering algorithms implemented in Python, such as k-means. Clustering scipy.cluster has been reported to have some problems, so for now I’ll use PyCluster (following advice given on stackoverflow). Install PyCluster: pip install…
So you have a list of tuples, created with the zip built-in function in Python. Like this: z = [(1, ‘a’), (2, ‘b’), (3, ‘c’)] And you want to reverse zip, to get these two lists: x = [1, 2,…
Given a numpy matrix (mixed_float_matrix) with a variety of float values, how do you convert it into a matrix, with zeros and ones (ones in place of non-zero values in the original matrix)?
I’m learning about matplotlib, and actually just bought the book Matplotlib for Python Developers. Geographical plots Browsing stackoverflow, the matplotlib homepage, and other resources, I eventually came by this stackoverflow post, which mentions BaseMap. Since the data that I’m plotting…
I like to install 3rd party Python libraries using pip. Pip and easy_install can automatically download and install Python code from PyPi (also known as The Cheese Shop). This is how to publish your own Python code on PyPi, so…
Install SQLAlchemy This is easy (using pip): pip install sqlalchemy Learn SQLAlchemy This tutorial uses an in memory SQLite database, which is cool in itself. Various topics: Indexes