Skip to content

Instantly share code, notes, and snippets.

View psd's full-sized avatar

Paul Downey psd

View GitHub Profile
psd / ngrs
Last active August 29, 2015 13:56
Reduce accuracy of OS coordinates using regex
let tests=0
let fails=0
while read ngr expected
let tests=tests+1
out=$(echo $ngr | gawk '{
#!/usr/bin/env python
from bs4 import BeautifulSoup
from json import JSONEncoder
def xml2json(text):
xml = BeautifulSoup(text, 'xml')
#print xml.prettify()
title = {
'title_number': xml.TitleNumber.string
psd / gist:bed9f4a8d67b26b9a2fd
Created September 18, 2014 13:24
### Keybase proof
I hereby claim:
* I am psd on github.
* I am psd ( on keybase.
* I have a public key whose fingerprint is 1C76 88BC 706A 353B 0CAD D260 C78B 6F27 E1EE 3052
To claim this, I am signing this object:

One CSV, thirty stories

I hit something of an impasse blogging here of late. A number of colleagues in a similar position have used the 30 days song challenge to unblock their blogs with some success, and I thought I’d try to do something similar, but different.

So I’ve picked out a single CSV file, the list of price paid for property from The Land Registry, and each day over the next month I’ll use it to tell small stories about open data and visualisations. Thirty is a nice round number and at this point seems almost unachievable and definitely a challenge.

The code for these articles are open source, natch, and I’ll build a portfolio site as we go along.

_Something of a disclaim

psd / diffs.txt
Last active August 29, 2015 14:10
This file has been truncated, but you can view the full file.
< "{AFC934E1-B31A-473B-960C-0309094FE2E3}","106000","1995-01-09 00:00","SW11 3BL","F","N","F","533","FLAT ABOVE SHOP","BATTERSEA PARK ROAD","LONDON","LONDON","WANDSWORTH","GREATER LONDON","A"
> "{AFC934E1-B31A-473B-960C-0309094FE2E3}","106000","1995-01-09 00:00","SW11 3BL","F","N","F","533A","","BATTERSEA PARK ROAD","","LONDON","WANDSWORTH","GREATER LONDON","A"
< "{1FB96B78-6395-4C6F-9A7C-F1D8ABC78EB6}","65000","1995-01-20 00:00","NR14 7SX","S","N","F","22","","CAWSTONS MEADOW","PORINGLAND","NORWICH","SOUTH NORFOLK","NORFOLK","A"
> "{1FB96B78-6395-4C6F-9A7C-F1D8ABC78EB6}","65000","1995-01-20 00:00","NR14 7SX","D","N","F","22","","CAWSTONS MEADOW","PORINGLAND","NORWICH","SOUTH NORFOLK","NORFOLK","A"
> "{CEB111BB-7F11-49D6-BE3A-61998E3B084F}","37500","1995-01-31 00:00","CB7 4TQ","S","N","F","2","","MILE END CROSSING","PRICKWILLOW","ELY","EAST CAMBRIDGESHIRE","CAMBRIDGESHIRE","A"
$ tiddlywiki test --init server
.. created test/tiddlers/$__sidebar.tid
$ tiddlywiki test --server
psd / jslint.conf
Created October 7, 2009 17:37 — forked from sneeu/jslint.conf
# Configuration File for JavaScript Lint 0.2.6
# Developed by Matthias Miller (
# This configuration file can be used to lint a collection of scripts, or to enable
# or disable warnings for scripts that are linted via the command line.
#### Feel free to experiment with enabling/disabling individual warnings to
psd / error.txt
Created December 7, 2009 14:07 — forked from FND/error.txt
future import issues
works fine on Ubuntu, but on Mac OS X:
Traceback (most recent call last):
File "/usr/local/bin/twanager", line 14, in <module>
File "/Library/Python/2.5/site-packages/tiddlyweb/", line 309, in handle
File "/Library/Python/2.5/site-packages/tiddlyweb/", line 76, in server
File "/Library/Python/2.5/site-packages/tiddlyweb/web/", line 53, in start_cherrypy
psd / README
Created December 7, 2009 15:08
XML TiddlyWeb serializer
simple tiddlyweb.xml twinstance
$twanager server
ERROR: ImportError: No module named marshal
addrole: Add a role to an existing user. <username> [role] [role] [role]
adduser: Add or update a user to the database: <username> <password> [[role] [role] ...]
bag: Create or update a bag with the json text on stdin: <bag>
imwiki: Import tiddlers from a Tiddlywiki document into a bag: <bag> <filename>
psd / controls.html
Created December 16, 2009 11:07
Slideshow Controls
<title>Slideshow Controls</title>
<style type="text/css">
body {
background-color: #FFF;
.tv {