Skip to content

Instantly share code, notes, and snippets.

View psd's full-sized avatar

Paul Downey psd

View GitHub Profile
{
"type": "object",
"required": [
"name",
"shoesizeLeft"
],
"properties": {
"name": {
"title": "Name",
"description": "Gimme yea name lad",
{
"type": "object",
"required": [
"name",
"shoesizeLeft"
],
"properties": {
"name": {
"title": "Name",
"description": "Gimme yea name lad",
@psd
psd / README.md
Last active November 11, 2017 13:44
Form explorer data for the MoJ
import io
import csv
import requests
class Records:
"Minimal register client"
records = {}
url = 'https://%s.register.gov.uk/records.tsv?page-size=5000'
#!/bin/bash
# 10 /government/uploads/system/uploads/attachment_data/file/98864/thumbnail_emr-2010-11.pdf.png GET 200 origin,2
find daily -type d -name '20??????' |
while read dir
do
date=$(echo "$dir" | sed -e 's/^.*\(20[0-9]*\).*$/\1/')
zcat $dir/count_cdn-govuk.log-20*.csv.gz |
sed -e 's/^[0-9][0-9] //' \
@psd
psd / show-and-tell.html
Created February 2, 2017 11:26
Links for a show and tell
http://www.openregister.org/
https://gds.blog.gov.uk/2015/09/01/registers-authoritative-lists-you-can-trust/
https://twitter.com/search?q=from%3Apsd%20%22list%20of%20the%20day%22&src=typd
https://www.gov.uk/government/publications/list-of-gov-uk-domain-names
https://www.gov.uk/government/publications/current-registered-providers-of-social-housing
https://data.gov.uk/dataset/list-of-internal-drainage-boards
https://www.gov.uk/government/publications/list-of-authorised-isa-managers/isas-authorised-managers
http://openregister.github.io/country-data/lists/report.html
https://reports.ofsted.gov.uk/
https://github.com/psd/doctate
@psd
psd / read-tsv.py
Created August 2, 2016 18:23
Read a TSV file looking for names with double-quotes
#!/usr/bin/env python3
import sys
import csv
for row in csv.DictReader(sys.stdin, delimiter='\t'):
if '"' in row['name']:
print(row['name'])
@psd
psd / tsv reader
Created August 2, 2016 18:19
Read a TSV file which may contain quotes ..
#!/usr/bin/env python3
import sys
import csv
for row in csv.DictReader(sys.stdin, delimiter='\t'):
if '"' in row['name']:
print(row['name'])
@psd
psd / all.txt
Last active April 6, 2016 11:23
Find words containing all of the vowels, in order
$ egrep 'a.*e.*i.*o.*u' /usr/share/dict/words
abietineous
abstemious
abstemiously
abstemiousness
abstentious
acetabuliferous
acetarious
acheilous
acheirous
@psd
psd / README.md
Last active December 4, 2015 23:20

Location Data Importer

Location Data Importer is a scala application that imports Ordinance Survey data into a mongo database. Primarily it is used to back the locate-api which provides address and local authority lookups from postcode / GSS Code.

The code is under an MIT license, see LICENSE.

Data

This is backed by two Ordinance Survey products: