Skip to content

Instantly share code, notes, and snippets.

View ajschumacher's full-sized avatar

Aaron Schumacher ajschumacher

View GitHub Profile
@paulfitz
paulfitz / Makefile
Created December 21, 2010 13:51
This is format specification for table differences
default:
asciidoc tdiff_spec_draft.txt
@abelsonlive
abelsonlive / scrapeBikeShare.R
Created May 13, 2012 23:41
Scrape NYC BikeShare Data
require("rjson")
#generate urls to scrape
#I determined the lowest and highest unique ids
#by looking at the page that had just the coordinates
root.url <- "http://a841-tfpweb.nyc.gov/bikeshare/get_point_info?point="
id<- seq(11992,12404, by=1)
urls <- paste(root.url, id, sep="")
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@mbostock
mbostock / .block
Last active November 7, 2023 07:54
Collapsible Tree
license: gpl-3.0
redirect: https://observablehq.com/@d3/d3-collapsible-tree
@mbostock
mbostock / .block
Last active March 1, 2024 12:32 — forked from mbostock/.block
Tidy Tree
license: gpl-3.0
border: no
height: 2000
redirect: https://beta.observablehq.com/@mbostock/d3-tidy-tree
@wingrunr21
wingrunr21 / catchall.coffee
Created October 23, 2013 13:27
A simple catchall script for Hubot to process anything it doesn't know how to handle via Wolfram|Alpha
Wolfram = require('wolfram-alpha').createClient(process.env.HUBOT_WOLFRAM_APPID)
module.exports = (robot) ->
robot.catchAll (msg) ->
r = new RegExp "^(?:#{robot.alias}|#{robot.name}) (.*)", "i"
matches = msg.message.text.match(r)
if matches != null && matches.length > 1
Wolfram.query matches[1], (e, result) ->
if result and result.length > 0
msg.send result[1]['subpods'][0]['text']
@cbednarski
cbednarski / camera.py
Last active February 17, 2024 05:54
Webcam capture for python - Pops up a preview from your webcam and snaps a picture when you press 'q'
import cv2
# Windows dependencies
# - Python 2.7.6: http://www.python.org/download/
# - OpenCV: http://opencv.org/
# - Numpy -- get numpy from here because the official builds don't support x64:
# http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
# Mac Dependencies
# - brew install python
@apg
apg / round-28.md
Last active August 29, 2015 13:56
Hack and Tell - Round 28

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Hate markdown? See this in all its rendered glory.

Round 28: Jeepy Gee

Hello Hackers-

Thanks to Meetup for hosting us! As always

@asfaltboy
asfaltboy / clip_magic.py
Last active September 20, 2021 22:23 — forked from nova77/clip_magic.py
"""
Add copy to clipboard from IPython!
To install, just copy it to your profile/startup directory, typically:
~/.ipython/profile_default/startup/
Example usage:
%clip hello world
# will store "hello world"