Skip to content

Instantly share code, notes, and snippets.

@samuelleach
samuelleach / identityintheUK.txt
Created March 15, 2014 12:15
Typical identity and address verification in the UK
Thank you for your application. Having conducted electronic searches, we have been unable to confirm your identity and/or obtain verification of your residence at the specified address.
In order to proceed with your application, we would be grateful if you would provide us with one item from Group A and one item from Group B - from the list below. This will enable us to verify your identity and your current address as shown on your application.
Please note that we are unable to accept the same document for address verification and identity. If you are sending original documents, we would recommend that they are sent by recorded delivery. If certified copies are to be sent, they must be certified by someone who is not related to you.
We will of course return any original documents by recorded delivery.
Do not send us original Group A documents. Copies MUST be certified by an independent person (not a family member), who must also provide their full name, address and daytime telephone contact number. Please
RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/Cellar/openssl/1.0.1e rbenv install 2.0.0-p451
@samuelleach
samuelleach / Makefile
Created November 28, 2014 13:37
Process Doogal UK postcode data into a postcode, lon, lat file
# Doogal downloads:
DOOGAL_SITE=http://www.doogal.co.uk/files/
DOOGAL_DATADIR=data_raw/doogal
all: $(DOOGAL_DATADIR)/postcodes_cut.csv
# PURPOSE: Create directory structure
setup:
mkdir -p data_raw data_intermediate data_deploy log
@samuelleach
samuelleach / awesome-geojson.txt
Created May 29, 2015 10:24
Installation script for tools at awesome-geojson https://github.com/tmcw/awesome-geojson
npm install -g geojson-pick; npm install -g geojson-random; npm install -g geojson-extent; npm install -g geojson-summary; npm install -g geojson-flatten; npm install -g geojson-rewind; npm install -g geojsonhint; npm install -g geojsonio-cli; npm install -g togeojson; npm install -g csv2geojson; npm install -g tokml; npm install -g geojson2dsv; npm install -g wellknown; npm install -g topojson; pip install geojson
@samuelleach
samuelleach / mysq_json.txt
Created June 11, 2015 14:36
Install JSON UDF for Mac OS 64bit
#via https://github.com/mysqludf/lib_mysqludf_json
#and https://github.com/mysqludf/lib_mysqludf_json/issues/2
git clone git@github.com:mysqludf/lib_mysqludf_json.git
cd lib_mysqludf_json
gcc -v $(/usr/local/bin/mysql_config --cflags) -shared -fPIC -o lib_mysqludf_json.so lib_mysqludf_json.c
sudo ln -s lib_mysqludf_json.so /Applications/XAMPP/xamppfiles/lib/mysql/plugin/.
@samuelleach
samuelleach / overpass.txt
Created June 12, 2015 16:18
Example use of OSM overpass API for extracting an OSM way to geojson
# With help from http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#Query_by_element_id
sudo pip install overpass
overpass --timeout 500 'way(272386359)' test.geojson
@samuelleach
samuelleach / test.sh
Created August 20, 2015 09:06
Running scrapy on mac os
# http://stackoverflow.com/questions/21320585/cannot-set-up-a-scrapy-project
export DYLD_LIBRARY_PATH=$HOME/anaconda/lib

hello markdown

@samuelleach
samuelleach / eastnorth2lonlat.py
Created November 14, 2015 18:32
Convert Eastings/Northings to lon lat
import pyproj as pyproj
import pandas as pd
import numpy as np
df = pd.read_csv('SCOOT_Detectors.csv')
osgb36 = pyproj.Proj("+init=EPSG:27700")
eastnorth = np.apply_along_axis(func1d=lambda x: osgb36(x[0],x[1], inverse=True), arr=df[['EASTING', 'NORTHING']].values, axis=1)
@samuelleach
samuelleach / reserve_install.R
Last active May 23, 2021 13:01
Install Rserve on Mac
pkg_url <- "http://cran.r-project.org/bin/macosx/mavericks/contrib/3.1/Rserve_1.7-3.tgz"
install.packages(pkg_url, repos = NULL)
library(Rserve)
Rserve(args="--vanilla")