Skip to content

Instantly share code, notes, and snippets.

Ryan McGreal quandyfactory

Block or report user

Report or block quandyfactory

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
quandyfactory / Blocked By Judi
Last active Nov 19, 2018
Twitter accounts that have been #blockedbyjudi
View Blocked By Judi
angleonfire63 -
@brookscappadoci -
@brundle_fly -
@craig_burley -
@Crazy4Waldorf -
@d3talk -
@dogfacedon -
@donhanzel -
@ericgillis -
@ian_reynolds -
View LRT_Answers.markdown

Answers to LRT Questions from Twitter

Q: How many trains?

A: I haven't seen definitive fleet numbers but it will be enough vehicles to provide 5-6 minute headways.

Q: Where do you store the extra units Where do you service the units How much will servicing cost?

A: Light Rail Vehicles (LRVs) will be stored and serviced in a maintenance facility build in the vicinity of Longwood Road and Frid Street. The maintenance facility will connect to the main LRT line via a spur line running along Longwood Road to Main Street. Incidentally, this means the LRT construction will include the cost to replace the Hwy 403 overpass on Longwood Road, which is 60 years old and due for replacement.

# -*- coding: utf8 -*-
from HTMLParser import HTMLParser
import os
import requests
class MLStripper(HTMLParser):
def __init__(self):
self.fed = []
View sample_hamilton_bike_share_gpx_file.gpx
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.0" creator="ExpertGPS 1.1 -" xmlns:xsi="" xmlns="" xsi:schemaLocation="">
<bounds minlat="43.25955166666667" minlon="-79.88774166666667" maxlat="43.26784333333333" maxlon="-79.87228166666667"/>
<trkpt lat="43.260035" lon="-79.87297">
<trkpt lat="43.25955166666667" lon="-79.87294166666666">
def get_comments(article_id):
"""Returns the comments for an article"""
# fetch comments from database
query = sql.text("""
select c.comment_id, c.parent_id, c.article_id, c.username,
c.date_posted, c.comment,
sum( as comment_score
from comments c
left join comment_votes v
View trips_results_sobi_test.txt
Starting trip ea03f66647c2cba026cf18b123924e1b
Point (43.2533483333, -79.86947) is not inside a segment
Point (43.2534083333, -79.8695166667) is not inside a segment
Point (43.2534466667, -79.8695466667) is not inside a segment
Point (43.253605, -79.8698516667) is not inside a segment
Point (43.2536316667, -79.8700233333) is not inside a segment
Point (43.2537033333, -79.8702633333) is not inside a segment
Point (43.25405, -79.8701383333) is not inside a segment
Point (43.2542383333, -79.8700533333) is not inside a segment
Point (43.25445, -79.86996) is not inside a segment
#!/usr/bin/env python
from xml.dom.minidom import parseString
from xml.dom.minidom import parse
import os
segments = (
# West of Cannon Cycle Track
'block': 'Dundurn to Kinnell (West of Cycle Track)',
View RAW: OCR text of Citizens' Jury on Transit
Report on Proceedings and Recommendations from the Citizens’ Jury on Transit
Prepared for Hamilton City Council
by Tim L. Dobbie Consulting Ltd. and Associates
Date: February 12, 2016
Tim L. Dobbie Consluting Ltd.
1. Introduction . . .
View De Caire Retirement Announcement
Media Release
Police Chief Glenn De Caire Retires Effective
January 17, 2016
For immediate release: December 18, 2015
Hamilton, ON
The members of the Hamilton Police Service continue to perform with excellence and professionalism and I remain extremely proud of the efforts that each member has put forth in delivering community based police services to our diverse communities across Hamilton. Our partnerships in the community are strong and we are working together to enhance community safety, revitalize the city, encourage investment and growth and we, as a community, are doing amazing work together.
quandyfactory /
Last active Aug 29, 2015
Fetch SoBi Rides Data
#!/usr/bin/env python
# coding: utf-8
This script downloads your Social Bicycles (SoBi) routes data from the SoBi web
API and saves it as a JSON file. It uses HTTP basic authentication with your SoBi
username (your email address) and password.
The function that requests route data executes recursively, incrementing the page
parameter with each subsequent request, until there are no more results.
You can’t perform that action at this time.