Category Archives: Python

Wiki + Spreadsheet

The underlying concept is very simple: spreadsheets are a way to organize text, numbers and formulas into what might be seen as a natively numeric environment: a matrix. So what would happen if we loosed some of the bolts of … Continue reading

Posted in Math, Project, Python | 5 Comments

Watch out for list(dict.keys()) in Python 3

As everyone is probably aware by now, in Python 3 dict.keys(), dict.values() and dict.items() will all return iterable views instead of lists. The standard way being suggested to overcome the difference, when the original behavior was actually intended, is to … Continue reading

Posted in Python | 10 Comments

Google using Geohash

According to Dave Troy, Google seems to be using the Geohash algorithm: Google is employing the GeoHash algorithm I’ve been pushing to do spatial searching using BigTable. Since database schemes like BigTable don’t support traditional GIS extensions/spatial indexes, GeoHash allows … Continue reading

Posted in Project, Python | 7 Comments

dateutil 1.4 is out

Friday I’ve released version 1.4 of dateutil. There are some interesting fixes there, so please upgrade if you have the chance.

Posted in Project, Python | 2 Comments

Enhancements on geohash.org

Some improvements to geohash.org were made. Some of them were motivated by a conversation with Rodrigo Stulzer. Support for geocoding addresses (city names, whatever). E.g. http://geohash.org/?q=21 Millbank, London Support for moving the Geohash marker in the embedded map, so that modifying the … Continue reading

Posted in GPS, Project, Python | 2 Comments

geohash.org is public!

After about one year writing this service in my spare time, it’s finally out. geohash.org offers short URLs which encode a latitude/longitude pair, so that referencing them in emails, forums, and websites is more convenient. Geohashes offer properties like arbitrary … Continue reading

Posted in Article, GPS, Project, Python | 8 Comments

Mocker 0.10 and trivial patch-mocking of existing objects

Mocker 0.10 is out, with a number of improvements! While we’re talking about Mocker, here is another interesting use case, exploring a pretty unique feature it offers. Suppose we want to test that a method hello() on an object will … Continue reading

Posted in Project, Python, Snippet, Test | 2 Comments

Partial stubbing of os.path.isfile() with Mocker

One neat feature which Mocker offers is the ability to very easily implement custom behavior on specific functions or methods. Take for instance the case where you want to pretend to some code that a given file exists, but you … Continue reading

Posted in Project, Python, Snippet, Test | Leave a comment

More releases: dateutil 1.3 and nicefloat 1.1

A couple of additional releases tonight: dateutil 1.3, and nicefloat 1.1. They’re both bug fixing releases.

Posted in Project, Python | Leave a comment

Mocker 0.9

A few more improvements were made to Mocker.

Posted in Project, Python | 6 Comments