Skip to content

Instantly share code, notes, and snippets.

Jimmy Tang talyian

Block or report user

Report or block talyian

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
@kekyo
kekyo / option.fs
Created Jul 3, 2017
F# option computation expression
View option.fs
[<Struct>]
type OptionalBuilder =
member __.Bind(opt, binder) =
match opt with
| Some value -> binder value
| None -> None
member __.Return(value) =
Some value
let optional = OptionalBuilder()
@mango314
mango314 / subway.py
Last active Feb 20, 2017
parse subway gtfs
View subway.py
import requests
key = ''
r = requests.get('http://datamine.mta.info/mta_esi.php?key=%s&feed_id=1'%(key))
# http://datamine.mta.info/sites/all/files/pdfs/nyct-subway.proto.txt
# https://developers.google.com/transit/gtfs-realtime/gtfs-realtime-proto
# https://github.com/google/protobuf
import gtfs_realtime_pb2, nyct_subway_pb2
You can’t perform that action at this time.