Skip to content

Instantly share code, notes, and snippets.

View patcon's full-sized avatar

Patrick Connolly patcon

View GitHub Profile
@patcon
patcon / terminal.log
Last active August 29, 2015 14:20
cm-update-server troubleshooting
~/repos/chef-cm-update-server (master ✘)✭ ᐅ http POST 127.0.0.1:3000/api < test.json
HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 365
Content-Type: application/json
Date: Sat, 09 May 2015 21:11:20 GMT
{
"error": null,
"id": null,
@patcon
patcon / INSTALL.md
Last active July 28, 2017 10:34
Installing why3 IDE for verifying sample Ethereum contract (Ubuntu 14.04)
# install ocaml and deps
apt-get install ocaml ocaml-native-compilers
apt-get install liblablgtk2-ocaml-dev liblablgtksourceview2-ocaml-dev libocamlgraph-ocaml-dev

# install opam from binaries (ocaml package manager)
# See https://opam.ocaml.org/doc/Install.html#Binarydistribution
wget https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh -O - | sh -s /usr/local/bin/

#### OR
@patcon
patcon / README.md
Last active May 10, 2022 23:24
A parser for the City of Toronto subject thesaurus/taxonomy, helpful for searching tmmis with internal city tags (updated 2021-02-24)

@patcon
patcon / toronto-org-hierarchy-A.py
Last active May 17, 2016 16:09
City of Toronto Organizational Hierarchy
ORGANIZATION_HIERARCHY = {
'name': {
'City Council': {
'name': {
'Audit Committee': {},
'Board of Health': {
'name': {
'^Board of Health .+'
}
},
diff --git a/ca_on_toronto/__init__.py b/ca_on_toronto/__init__.py
index bda98f5..82d7281 100644
--- a/ca_on_toronto/__init__.py
+++ b/ca_on_toronto/__init__.py
@@ -4,6 +4,19 @@ from .jurisdiction import TorontoJurisdiction
import lxml.html
import requests
+# Patch importer to swallow DuplicateItemError for Bill
+import pupa.importers.bills

"Toronto Open Data Catalogue Datasets" dataset

This dataset is generated from running this scraper on the Toronto Data Catalogue, like so:

scrapy runspider toronto_data_portal/spiders/portal.py -o data/open-data-catalogue-datasets.json

We use this dataset to generate data.toronto.io community data catalogue itself for the city-managed portion of the site.

@patcon
patcon / 149105.json
Last active May 10, 2016 02:45
City of Toronto Youth Services dataset (Unofficial)
{
"acc": "N",
"accessibility": "Not Accessible",
"address": "33 Victoria St Unit 150, Toronto, ON M5C 2A1",
"application": "Drop in, with appropriate supporting documents (call ahead or see website) * many forms can also be completed and submitted online",
"fees": "Fees for some transactions",
"fid": 149105,
"freePhone": "Ontario-wide 1-800-267-8097",
"hours": "Mon-Wed, Fri 9 am-5 pm; Thu 9 am-7 pm; Sat 9 am-1 pm",
"intersection": "Yonge St and King St W",
@patcon
patcon / README.md
Created May 10, 2016 04:34
Toronto Police Services - Calls For Service