Skip to content

Instantly share code, notes, and snippets.

@jtyberg
jtyberg / maple_temps.ipynb
Last active August 26, 2016 03:46
Read temperature data from AWS DynamoDB
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtyberg
jtyberg / os_environ.ipynb
Last active March 18, 2016 18:19
Jupyter notebook that prints os.environ
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtyberg
jtyberg / python_tz_dst
Created March 18, 2016 17:45
Python timezone with DST if pytz unavailable
from datetime import timedelta, datetime, tzinfo
# Taken from http://stackoverflow.com/questions/6558535/python-find-the-date-for-the-first-monday-after-a-given-a-date
def next_weekday(d, weekday):
days_ahead = weekday - d.weekday()
if days_ahead <= 0: # Target day already happened this week
days_ahead += 7
return d + timedelta(days_ahead)
class USEastern(tzinfo):
@jtyberg
jtyberg / declarativewidgets_numpy_serialization.ipynb
Last active December 7, 2015 23:11
ipkernel json_clean no like numpy types
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtyberg
jtyberg / pandas_yahoo.ipynb
Last active November 10, 2015 20:27
pandas_yahoo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtyberg
jtyberg / README.md
Created August 26, 2015 01:22
openssl encrypt

Encrypts a file using OpenSSL. Requires ENC_PASS set and INSECURE pointing to the absolute path of the insecure file to encrypt.

@jtyberg
jtyberg / README.md
Last active August 29, 2015 14:26
KISS docker-machine create generic

docker-machine create --driver generic

@jtyberg
jtyberg / vpn_fix.sh
Last active February 17, 2020 03:25 — forked from christian-blades-cb/vpn_fix.sh
fix network routing issues caused by Cisco AnyConnect with VirtualBox and boot2docker on Mac OS X
#!/usr/bin/env bash
# Fix network routing issues caused by Cisco AnyConnect VPN when using
# VirtualBox and boot2docker on Mac OS X.
#
# Environment:
# Mac OS X 10.9.5
# VirtualBox 4.3.20
# Cisco AnyConnect 3.1.04074
# boot2docker v1.4.1 (Git commit: 43241cb)
@jtyberg
jtyberg / IPython-dev-vagrant.md
Last active August 29, 2015 14:13
IPython-dev-vagrant

Bring up vagrant

vagrant up ipython
vagrant ssh ipython

Install OS pkgs

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.