Skip to content

Instantly share code, notes, and snippets.

@rdhyee
rdhyee / notebook_javascript_examples.ipynb
Last active December 20, 2015 12:29
some primitive examples of integrating JavaScript into IPython notebook (including vexflow)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdhyee
rdhyee / Evernote_rate_limit.json
Created September 24, 2013 15:53
A proxying interface to the Evernote Python SDK as one approach to dealing with rate limiting: simple retry after suggested wait.
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@rdhyee
rdhyee / topaste.js
Created September 25, 2013 03:37
what to paste in to Google JavaScript Console to get a Racial Dot Map to a specific location --> captures lat, lon, zoom. Don't know how to get labeling options yet.
"http://demographics.coopercenter.org/DotMap/index.html" +
"#lat=" +map.getCenter().lat() + "&lon=" + map.getCenter().lng() +
"&z=" + map.getZoom()
@rdhyee
rdhyee / lxml_namespace.ipynb
Last active December 25, 2015 01:09
one way to use lxml.find with namespaced elements
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdhyee
rdhyee / taste.yml
Created October 11, 2013 20:56
my version of the ansible playbook taste.yml based on the Ansible chapter of Matt Jaynes' Taste Test (http://devopsu.com/books/taste-test-puppet-chef-salt-stack-ansible.html).
- hosts: all
tasks:
- name: ensure nginx is installed
action: apt pkg=nginx state=present
- hosts: puppy
vars:
baby: puppy
tasks:
- name: ensure nginx is installed
@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 / minecraft_do.yml
Last active June 9, 2020 03:44
Ansible playbook to launch a digitalocean droplet and then configure it to run Minecraft based on instructions from https://www.digitalocean.com/community/articles/how-to-set-up-a-minecraft-server-on-linux Note that some things are hardwired: the name of the droplet, the version of minecraft
# http://www.ansibleworks.com/docs/modules.html#digital-ocean
# Create a new Droplet
# Will return the droplet details including the droplet id (used for idempotence)
- name: launch DO droplet
hosts: local
gather_facts: False
tasks:
- name: pwd
@rdhyee
rdhyee / hypothes_is_api.ipynb
Last active December 26, 2015 11:49
first steps at figuring out hypothes.is API -- now can login and page through results
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdhyee
rdhyee / python_math_isnan.ipynb
Created November 23, 2013 15:45
What happens if you do arithmetic with NaN in Python?
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdhyee
rdhyee / Moby Dick Or The Whale - Melville Herman.mrexpt
Created November 25, 2013 14:29
An export to list of bookmarks from my bookmarking/highlighting of The Gutenberg edition of *Moby Dick* via Moon+ Reader Pro
549360
indent:false
trim:false
#
1
Moby Dick, or, the whale
/sdcard/Books/MoonReader/Moby Dick Or The Whale - Melville Herman.epub
/sdcard/books/moonreader/moby dick or the whale - melville herman.epub
6
0