Skip to content

Instantly share code, notes, and snippets.

View talyian's full-sized avatar

Jimmy Tang talyian

View GitHub Profile
@kekyo
kekyo / option.fs
Created July 3, 2017 23:51
F# option computation expression
[<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 February 20, 2017 21:41
parse subway gtfs
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 August 16, 2023 02:31
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