Skip to content

Instantly share code, notes, and snippets.

@davidshinn
davidshinn / .block
Last active March 29, 2018 23:58 — forked from mbostock/.block
Box Plots
license: gpl-3.0
@davidshinn
davidshinn / gist:ad2f5e570d6d06543a11
Created February 3, 2016 02:58 — forked from fernandoaleman/gist:5083680
How to update VirtualBox Guest Additions with vagrant
# Start the old vagrant
$ vagrant init centos-6.3
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
#!/usr/bin/env python
"""Outputs the WebKit cookies for a specified URL.
Useful for wget'ing URLs which require authentication.
$ python thisfile.py http://example.com > wgetcookies.txt
$ wget --load-cookies wgetcookies.txt http://example.com/example.zip
"""
import objc
from Foundation import NSHTTPCookieStorage, NSURL
@davidshinn
davidshinn / README.md
Last active December 31, 2015 01:59 — forked from mbostock/.block
Line Chart with Focus-Context
@davidshinn
davidshinn / README.md
Last active December 30, 2015 23:59 — forked from mbostock/.block
Focus+Context via Brushing on the y-Axis

This example is a revision of Focus+Context via Brushing to demonstrate how to use D3's brush component to implement focus + context zooming but along the y-axis. Click and drag up/down in the narrow chart on the left to pan or zoom.

#!/usr/bin/env python
"""
simple example script for running and testing notebook resulting in a new workbook.
Usage: `ipnbdoctest.py foo.ipynb foo_new.ipynb`
Each cell is submitted to the kernel, and the outputs are compared with those stored in the notebook.
"""
import io