Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jonypawks's full-sized avatar

Jesse Printz jonypawks

View GitHub Profile
from timeit import timeit
zipmethod = """dict(zip(sample[::2], sample[1::2]))"""
formethod = """\
d = dict()
for i in range(1, len(sample) - 1, 2):
d[sample[i]] = sample[i+1]
"""
if __name__ == '__main__':
document.getElementById("tabVendor").onTabClick = function() { InitVendor() }
@jonypawks
jonypawks / README.md
Created October 11, 2013 20:04 — forked from mbostock/.block

This example demonstrates brush transitions, a new feature in D3 3.3.

Try dragging the brush or selecting a new region. When you mouseup, the brush transitions smoothly back to its original position. The transition is initiated simply by applying the brush to a transition (rather than a selection), similar to automatic axis transitions. Note that interacting with the brush interrupts the current transition!

@jonypawks
jonypawks / gist:7192173
Created October 28, 2013 06:23
Coffeescript UUID4
_random =
if crypto?.getRandomValues
-> crypto.getRandomValues(new Uint32Array(1))[0] / Math.pow(2, 32)
else
Math.random
uuid4 = ->
'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace /[xy]/g, (c) ->
u = _random() * 16 | 0
u = u & 0x3 | 0x8 if c is 'y'
@jonypawks
jonypawks / README.md
Last active December 27, 2015 21:39
D3 and Nested SVG Elements.

README

An example of using nested svg elements to have different coordinate systems in the same visualization. In this case, we provide a histogram of random data that fills the width of the graph while keeping the title in a static size for easy reading.

README

@jonypawks
jonypawks / keybase.md
Created February 10, 2017 05:29
keybase.md

Keybase proof

I hereby claim:

  • I am jonypawks on github.
  • I am jprintz (https://keybase.io/jprintz) on keybase.
  • I have a public key ASBsioH8tDpr93NcUh2slME9LscqRuVEKFr_mGy8M4eiWgo

To claim this, I am signing this object: