Skip to content

Instantly share code, notes, and snippets.

@johntyree
johntyree / history_vol.py
Last active February 26, 2020 04:24
Calculate annualized volatility from historical data.
#/usr/bin/env python
from pandas import np
from pandas.io.data import DataReader
def historical_volatility(sym, days):
"Return the annualized stddev of daily log returns of `sym`."
try:
quotes = DataReader(sym, 'yahoo')['Close'][-days:]
@bwhitman
bwhitman / wvdial.conf
Created December 31, 2012 15:22
wvdial.conf for ARM 3G Chromebook running Chrubuntu
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Phone = #777
ISDN = 0
Password = vzw
Username = XXX-XXX-XXXX
Modem = /dev/ttyUSB1
Baud = 921600
Stupid Mode = on
@peter
peter / creating-edgerails-app.sh
Created June 30, 2012 21:03
Creating and Deploying an EdgeRails (Rails 4) Application to Heroku
# 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL
# 0.2 If you are on the Mac, make sure you have a c compiler by installing XCode Command Line Tools or gcc4.2 with homebrew
# https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers
# 0.5 Make sure you have bundler version ~> 1.2 as Rails depends on it
gem install bundler
# 1. Get edge Rails source (master branch)
git clone https://github.com/rails/rails.git
@mrnugget
mrnugget / INSTRUCTIONS.md
Created March 25, 2012 13:21
Make MacVim use the correct $PATH with rbenv