Skip to content

Instantly share code, notes, and snippets.

Avatar

Jimmy Tang talyian

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
@drhelius
drhelius / Game Boy Sound Operation
Last active May 27, 2020
Game Boy Sound Operation
View Game Boy Sound Operation
Game Boy Sound Operation
------------------------
Shay Green (blargg)
gblargg@gmail.com
http://www.slack.net/~ant/
** This is an incomplete draft
This documents the behavior of Game Boy sound; details which aren't
relevant to the observable behavior have been omitted unless they
You can’t perform that action at this time.