Skip to content

Instantly share code, notes, and snippets.

@nickjevershed
nickjevershed / urls.csv
Created March 24, 2019 00:24
list of ministerial diary filenames and urls
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 2 columns, instead of 1. in line 4.
01-Premier-October-2018-December-2018.pdf,https://www.dpc.nsw.gov.au/assets/dpc-nsw-gov-au/publications/October-December-2018-1128/643cd59a5b/01-Premier-October-2018-December-2018.pdf
02-Treasurer-and-Minister-for-Industrial-Relations-October-2018-December-2018.pdf,https://www.dpc.nsw.gov.au/assets/dpc-nsw-gov-au/publications/October-December-2018-1128/987868a2d9/02-Treasurer-and-Minister-for-Industrial-Relations-October-2018-December-2018.pdf
Attorney-General-October-2018-December-2018.pdf,https://www.dpc.nsw.gov.au/assets/dpc-nsw-gov-au/publications/October-December-2018-1128/d2e1f8720f/Attorney-General-October-2018-December-2018.pdf
Deputy-Premier-Minister-for-Regional-NSW-Minister-for-Skills-Minister-for-Small-Business-October-2018-December-2018.pdf,https://www.dpc.nsw.gov.au/assets/dpc-nsw-gov-au/publications/October-December-2018-1128/040b8d52fe/Deputy-Premier-Minister-for-Regional-NSW-Minister-for-Skills-Minister-for-Small-Business-October-2018-December-2018.pdf
Minister-for-Counter-Terrorism-Minister-
@nickjevershed
nickjevershed / read_pdfs.py
Created February 12, 2019 01:03
Fuzzy string matching with PDFs
import PyPDF2
from os import listdir
from fuzzywuzzy import fuzz
import simplejson as json
files = listdir("docs/")
with open('template.txt', 'r') as f:
template=f.read().replace("\n", "")
@nickjevershed
nickjevershed / nick_evershed_key
Last active September 14, 2022 23:59
Nick Evershed's public key
-----BEGIN PGP PUBLIC KEY BLOCK-----
xsFNBGMiar0BEAC03MoRwhDQwfPOGniIZuo6weCzY3/lAWmC2LuB9+6BzvkG
JAY0dNx4jl112+hJhpQbLYpwq2v6I9FEnEkE2sdDJzfqvfce065KCWL51MRK
vGQEaH21bvLh7Y0M9FHSIL+LWB2av2w9tH7eYFujErWT5wT88yZIoc5N0ABs
gZD0E5WPPoYtN8mPSR+swzFCEYt3IVtpR+5s2cPrXCEUGKiTfEhXL5Ubys3L
Hcasu/+/tNFSj8+npkFasEpNHkrkCPxpA6gvuTdjQ4dH8wn1yv8M6xwJuIoi
Lb2WEy1LEFV3/hxz+FwPbZJRMgQRMwstfK1xgXwHHzYitXIPt/2HmydrbmyG
twP4Dmxrh5CGpdyHTS61Fi5ybJk9nF1ExcAIQawiErH0gvcwL0EouRN71pLo
StdAIsiZz3jWIo6J99OI+5mNr5O6QAfa0xk2AcNwc40qAfDSZuzrI5TVjxra
I just want to read public Facebook posts from politicians, and track public pages that are making political ads within Australia.
By definition none of this data is private. You can contact me at nick.evershed@theguardian.com, cheers.
@nickjevershed
nickjevershed / epbc-approvals.csv
Created January 30, 2018 01:34
EPBC approvals and rejections, scraped from http://epbcnotices.environment.gov.au/publicnoticesreferrals/ on 24-1-18
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 7 columns, instead of 4. in line 5.
date,notification,refNo,title,outcome,outcome2,
07/03/01,Decision on Approval of Action,2000/8,Mineral Deposits (Operations) Pty Ltd/Mining - sand/Stockton Beach/NSW/Rutile and Zircon Mining on Stockton Rifle Range,Approved with conditions,Approved,
09/03/01,Decision on Approval of Action,2000/14,East Gippsland Region Water Authority/Water Management/Gippsland Lakes/VIC/Constructed wetland in Macleod Morass,Approved with conditions,Approved,
23/03/01,Decision on Approval of Action,2000/22,Woodside Energy Limited (WEL)/Mining - petroleum/Vincent reservoir/Commonwealth Marine/Vincent Appraisal Well,Approved with conditions,Approved,
05/04/01,Decision on Approval of Action,2000/42,Department of Infrastructure Energy and Resources/Land Transport Infrastructure/Hobart/TAS/Sorell Causeway Bridge,Approved with conditions,Approved,
14/05/01,Decision on Approval of Action,2000/7,Ports Corporation of Queensland/Energy and Infrastructure (incl. Pipelines)/Port of Hay Point/QLD/Dalrymple Bay Coal Terminal Expansion Stage

Keybase proof

I hereby claim:

  • I am nickjevershed on github.
  • I am nickevershed (https://keybase.io/nickevershed) on keybase.
  • I have a public key ASCinTV4DESFKo9Rz1NxbILMKmrX2TROswQNjWwtXGif2Qo

To claim this, I am signing this object:

@nickjevershed
nickjevershed / cache.sh
Last active November 3, 2016 05:24
Command line method to convert Chrome cache hex files back into html, images, etc
# got to chrome://cache/ and find the file you want
# check the headers for the file format, then copy the fourth block of text, and copy into a file blah.txt
# for gzipped html
xxd -r < blah.txt | gunzip > cached.html
# for a jpg
xxd -r < blah.txt > cached.jpg
@nickjevershed
nickjevershed / election-results.txt
Created July 5, 2016 05:56
AEC election results
['https://interactive.guim.co.uk/2016/aus-election/results-data/20160629114808.json','https://interactive.guim.co.uk/2016/aus-election/results-data/20160702170038.json','https://interactive.guim.co.uk/2016/aus-election/results-data/20160702170213.json','https://interactive.guim.co.uk/2016/aus-election/results-data/20160702180037.json','https://interactive.guim.co.uk/2016/aus-election/results-data/20160702180207.json','https://interactive.guim.co.uk/2016/aus-election/results-data/20160702180337.json','https://interactive.guim.co.uk/2016/aus-election/results-data/20160702180507.json','https://interactive.guim.co.uk/2016/aus-election/results-data/20160702180637.json','https://interactive.guim.co.uk/2016/aus-election/results-data/20160702180807.json','https://interactive.guim.co.uk/2016/aus-election/results-data/20160702180937.json','https://interactive.guim.co.uk/2016/aus-election/results-data/20160702181107.json','https://interactive.guim.co.uk/2016/aus-election/results-data/20160702181237.json','https://intera
@nickjevershed
nickjevershed / prob-ordered.py
Created March 29, 2016 06:37
Ordered version of chocolates
from collections import Counter
chocTypes = ['Caramello','DairyMilk','CherryRipe','Crunchie','Flake']
numberInBox = 8
allOutcomes = []
for pos1 in chocTypes:
for pos2 in chocTypes:
for pos3 in chocTypes:
for pos4 in chocTypes:
for pos5 in chocTypes:
@nickjevershed
nickjevershed / probability.py
Created March 29, 2016 05:22
Chocolate probabilities
from collections import Counter
chocTypes = ['Caramello','DairyMilk','CherryRipe','Crunchie','Flake']
numberInBox = 8
allOutcomes = set()
for pos1 in chocTypes:
for pos2 in chocTypes:
for pos3 in chocTypes:
for pos4 in chocTypes:
for pos5 in chocTypes: