Skip to content

Instantly share code, notes, and snippets.

View erichoco's full-sized avatar

erichoco

  • Meta
  • University of Illinois at Urbana-Champaign
View GitHub Profile
# init a dict
d = dict()
d = {}
d = {'Name': 'Zara', 'Age': 7, 'Class': 'First'} # like js object
# get
d['Name'] # 'Zara'
d['Gender'] # KeyError # Don't use this
# dict.get(key, default=None)
@erichoco
erichoco / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@erichoco
erichoco / README.md
Last active December 24, 2015 01:29 — forked from mbostock/.block

A sunburst (radial partition layout) built with D3, featuring interactive distortion based on InterRing: when you click on a node, it expands to fill 80% of the parent arc. Clicking on the root node resets all distortions.