Category Archives: Code

Python script to read our moods into an Sqlite database

This script takes a csv file, output from the mood reporting Android app that Peter wrote us and inserts the records into a database #! usr/bin/env python #-*- coding:utf-8 -*- # # Daniel Belasco Rogers 2011 Wed 16 Feb 2011 … Continue reading

Posted in Android, Code, Python | Tagged , | Comments Off on Python script to read our moods into an Sqlite database

Compile New GPSBabel from source

A new version of GPSBabel – version 1.4.2 came out but it’s not yet in the Ubuntu repositories and there are no binaries on the GPSBabel site. I’m here to tell you that installing from the source worked pretty painlessly … Continue reading

Posted in Bash scripting, Code, Diary, GPS, Linux, Software, Ubuntu | Tagged , | Comments Off on Compile New GPSBabel from source

A much better Python script to rename all tracknames in a gpx file with the first trackpoint date

Of course, just as I predicted, Peter beat me to it and seemed to learn as much about Python as me in a few days whereas its taken me a few years to get this far (sigh). Last night, as … Continue reading

Posted in Code, Diary, Python | Tagged , , | Comments Off on A much better Python script to rename all tracknames in a gpx file with the first trackpoint date

A Python script to get a list of placenames from latitude and longitude

Here’s a handy adaptation from Nicolas Laurance’s geoname.py script which takes a lat long and returns a list of place names and their code derived from the geonames database. #!/usr/bin/env python #-*- coding:utf-8 -*- # based on geoname.py by Nicolas … Continue reading

Posted in Code, GPS, Linux, Python, Software | Tagged , , | 1 Comment

A complete and utter starter Python script

A friend said that it was the duty of a computer scientist to learn a new computer language a year and asked me to introduce him to Python. Ignoring the fact that he’ll probably outstrip my two-year-old Python abilities in … Continue reading

Posted in Code, GPS, Python | Comments Off on A complete and utter starter Python script