Skip to content

Instantly share code, notes, and snippets.

@rdhyee
rdhyee / Hillary_for_America_events_in_Berkeley_office.ipynb
Last active October 31, 2016 17:20
Generate a markdown list of events happening at the Berkeley HfA office
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdhyee
rdhyee / hfa-berkeley-events.md
Last active October 22, 2016 19:26
List of phone banking events at the Hillary for America Berkeley office [1224 Solano Ave, Albany, CA](https://goo.gl/maps/MGrDZX5g5Fz)
@rdhyee
rdhyee / digitalocean_ansible_minecraft.ipynb
Last active October 22, 2016 17:42
An IPython notebook that I use to create a digitalocean.com droplet to host a minecraft server. I've currently hardcoded a reference to the Ansible Playbook, which I've posted at https://gist.github.com/rdhyee/66f1aa40b6ea520c9e6e. There's code to use the Ansible Python API to play the playbook -- though clearly I can use the command line to do …
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdhyee
rdhyee / bug_report.ipynb
Last active July 19, 2016 22:22
A demonstration of a bug in pyzotero reported at https://github.com/urschrei/pyzotero/issues/52
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdhyee
rdhyee / process_chunk_timing.txt
Created February 24, 2016 21:26
Timing of [python-taq/raw_taq.py at d2bf87f1b8f461e3f62511eec573770683f8c181 · dlab-projects/python-taq](https://github.com/dlab-projects/python-taq/blob/d2bf87f1b8f461e3f62511eec573770683f8c181/taq/raw_taq.py#L331-L371) using [rkern/line_profiler: Line-by-line profiling for Python](https://github.com/rkern/line_profiler)
Line # Hits Time Per Hit % Time Line Contents
==============================================================
330 @profile
331 def process_chunk(self, all_bytes):
332 '''Convert the structured ndarray `all_bytes` to the target_dtype
333
334 If you did not specify do_process_chunk, you might run this yourself on
335 chunks that you get from iteration.'''
336 # Note, this is slower than the code directly below
337 # records = recfunctions.append_fields(easy_converted, 'Time',
@rdhyee
rdhyee / GITenberg_basics.ipynb
Last active February 16, 2016 20:12
List of repositories in https://github.com/gitenberg as of 2016.02.12
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2016-01-29 22:43:10,869 INFO: - App: Building service dependencies...
2016-01-29 22:43:10,873 INFO: - App: Copying files and filling templates...
2016-01-29 22:43:10,924 INFO: - App: Building the app image with Dockerfile...
2016-01-29 22:43:10,931 INFO: - App: Starting custom Dockerfile build (download logs for more details)
2016-01-29 22:43:11,129 INFO: - App: Sending build context to Docker daemon 532.6 kB
Sending build context to Docker daemon 1.081 MB
Sending build context to Docker daemon 1.638 MB
Sending build context to Docker daemon 2.195 MB
Sending build context to Docker daemon 2.753 MB
Sending build context to Docker daemon 3.31 MB
@rdhyee
rdhyee / vincent_examples.ipynb
Created January 27, 2014 20:14
IPython notebook to illustrate error I'm getting in trying to use vincent 0.4.3 + IPython 1.1 to display a map
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[[1, "China", 1349585838], [2, "India", 1220800359], [3, "European Union", 509365627], [4, "United States", 316438601], [5, "Indonesia", 251160124], [6, "Brazil", 201009622], [7, "Pakistan", 193238868], [8, "Nigeria", 174507539], [9, "Bangladesh", 163654860], [10, "Russia", 142500482], [11, "Japan", 127253075], [12, "Mexico", 118818228], [13, "Philippines", 105720644], [14, "Ethiopia", 93877025], [15, "Vietnam", 92477857], [16, "Egypt", 85294388], [17, "Germany", 81147265], [18, "Turkey", 80694485], [19, "Iran", 79853900], [20, "Congo, Democratic Republic of the", 75507308], [21, "Thailand", 67497151], [22, "France", 65951611], [23, "United Kingdom", 63395574], [24, "Italy", 61482297], [25, "Burma", 55167330], [26, "Korea, South", 48955203], [27, "South Africa", 48601098], [28, "Tanzania", 48261942], [29, "Spain", 47370542], [30, "Colombia", 45745783], [31, "Ukraine", 44573205], [32, "Kenya", 44037656], [33, "Argentina", 42610981], [34, "Poland", 38383809], [35, "Algeria", 38087812], [36, "Sudan", 34847910],