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
quandyfactory / Blocked By Judi
Last active Nov 19, 2018
Twitter accounts that have been #blockedbyjudi
View Blocked By Judi
angleonfire63 - https://twitter.com/angleonfire63/status/1062541726232047617
@brookscappadoci - https://twitter.com/brookscappadoci/status/1057443095959216129
@brundle_fly - https://twitter.com/brundle_fly/status/1062750998400303104
@craig_burley - https://twitter.com/craig_burley/status/1062679892003831808
@Crazy4Waldorf - https://twitter.com/Crazy4Waldorf/status/1063074479600009218
@d3talk - https://twitter.com/d3talk/status/1062757700185083904
@dogfacedon - https://twitter.com/dogfacedon/status/1063065543618584576
@donhanzel - https://twitter.com/donhanzel/status/1063069742871859200
@ericgillis - https://twitter.com/ericgillis/status/1063276271872954368
@ian_reynolds - https://twitter.com/ian_reynolds/status/1063058485540196359
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.

View get_election_results.py
# -*- coding: utf8 -*-
from HTMLParser import HTMLParser
import os
import requests
class MLStripper(HTMLParser):
def __init__(self):
self.reset()
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 - http://www.topografix.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/0" xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
<time>2016-08-03T17:07:58-04:00</time>
<bounds minlat="43.25955166666667" minlon="-79.88774166666667" maxlat="43.26784333333333" maxlon="-79.87228166666667"/>
<trk>
<trkseg>
<trkpt lat="43.260035" lon="-79.87297">
</trkpt>
<trkpt lat="43.25955166666667" lon="-79.87294166666666">
</trkpt>
View get_rth_comments.py
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(v.vote) 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
View sobi_gpx.py
#!/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.
TABLE OF CONTENTS
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
quandyfactory / get_sobi_data.py
Last active Aug 29, 2015
Fetch SoBi Rides Data
View get_sobi_data.py
#!/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.