Posts tagged with python

Generating your holiday photos automatically with the iPhone location database

As you may have read, the iPhone 4 stores a database of your location over time, and it's simple to access this database on your computer. Notwithstanding the privacy implications, it provides an interesting source of data to play with!

I've spent the last few months travelling while working for ReignDesign, and my iPhone has been faithfully recording the trip. I extracted the consolidated.db file which the iPhone stores in its backup, and wrote a small Python script to extract my location history. The script finds the first recorded location for each day, and then:
1. Looks up the city name and country using Google's Geocoding API
2. Searches for photos with the Flickr API taken close to the latitude/longitude I was at, on that day

Note that not every day has a location recorded. When I was in Tonga and Samoa, I didn't have a SIM card. Since the consolidated.db file uses cell towers to calculate location, not GPS, there are gaps. Also, sometimes there are no photos on Flickr for a (location, date) pair.

With those caveats, put it together and you have what I call "the lazy man's holiday photos":

View my holiday photos >>

Lions and tigers, and Pythons and Rabbits, oh my!

We've recently been doing some great work on projects using Google App Engine, a highly scalable framework for building web apps in Python or Java. We've posted before about our friendly talking robot rabbit, Nabaztag. I thought it would be fun (and vaguely useful) to make our rabbit announce when new code was pushed to our repositories on GitHub.
Continue reading...