Skip to content

Instantly share code, notes, and snippets.

View shabbychef's full-sized avatar
tcb

Steven Pav shabbychef

tcb
View GitHub Profile
@shabbychef
shabbychef / Dockerfile
Last active August 29, 2015 14:04
Pyro4 nameserver
# Pyro4 nameserver MWE
# This appears to be properly configured.
# preamble
FROM orchardup/python:2.7
MAINTAINER Steven E. Pav, shabbychef@gmail.com
USER root
# setup
RUN pip install -qq Pyro4

Keybase proof

I hereby claim:

  • I am shabbychef on github.
  • I am shabbychef (https://keybase.io/shabbychef) on keybase.
  • I have a public key whose fingerprint is 69BF 8752 A716 023A 02D4 2C42 6F6D BA6E 505E FB13

To claim this, I am signing this object:

@shabbychef
shabbychef / install_github2.r
Created May 30, 2015 18:47
install_github only once ever.
library(git2r)
library(devtools)
library(drat)
install_github2 <- function(repo) {
dest <- tempfile()
dir.create(dest, recursive=TRUE)
# download
repo <- git2r::clone(paste0('https://github.com/',repo,'.git'),dest)
@shabbychef
shabbychef / monthly_spy_anova.R
Created May 20, 2012 04:12
ANOVA on monthly GSPC returns
# * Sat May 19 2012 21:04:56 Steven E. Pav <shabbychef@gmail.com>
# from https://github.com/milktrader/rfinance2012/blob/94e6dd0452b16697ad10f9bc7e0e7431c95d9020/xts/.Rhistory
require(quantmod)
getSymbols('^GSPC', from='1950-01-01')
G <- monthlyReturn(Cl(GSPC))
G$monnum <- .indexmon(G)
# try ANOVA on the monthly returns
@shabbychef
shabbychef / ipython_magics.py
Created December 12, 2012 21:06
demonstrate R and octave 'magics' in ipython.
# to get the R<->python magic
%load_ext rmagic
# now you can code in R:
%%R
library(survival)
amod <- coxph(Surv(lung$time,lung$status) ~ lung$sex + lung$ph.karno)
print(summary(amod))
# done
@shabbychef
shabbychef / ipython_test.ipynb
Created December 12, 2012 21:22
testing ipython notebook and magic.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shabbychef
shabbychef / moy_effect.ipynb
Created January 4, 2013 01:38
month of year effects in SPY since 1950, lack thereof.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.