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:
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) |
# Created: 2015.05.18 | |
# Copyright: Steven E. Pav, 2015 | |
# Author: Steven E. Pav <shabbychef@gmail.com> | |
# Comments: Steven E. Pav | |
library(shiny) | |
library(ggplot2) | |
library(reshape2) | |
library(hypergeo) |
I hereby claim:
To claim this, I am signing this object:
# 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 |
" code to place in .vimrc to make Conque play nicely with R | |
" (or other languages, though you would have to generalize the | |
" commands to allow different syntax and filetypes) | |
" | |
" to use, place in .vimrc, resource, and issue | |
" | |
" :RConque | |
" | |
" this will give you a screen session named 'r'; | |
" use R in this session; |
# see | |
# http://climateecology.wordpress.com/2013/08/19/r-vs-python-speed-comparison-for-bootstrapping/ | |
# first version#FOLDUP | |
set.seed(101) | |
# generate data | |
x <- 0:100 | |
y <- 2*x + rnorm(101, 0, 10) | |
Entity Name Title Base Overtime Other (vacation, sick, bonus, etc) Medical/Dental/Visual Employeer Contribution to Pension Employee Contribution to Pension Paid By Employer Employer Contribution to Deferred Compensation (401k) Misc Total Cost of Employment | |
Bay Area Rapid Transit Dugger, Dorothy General Mgr 298700 0 34500 14951 39521 23324 1869 6796 419661 | |
Bay Area Rapid Transit Crunican, Grace General Mgr 312461 0 3846 19141 37513 17500 1869 7591 399921 | |
Bay Area Rapid Transit Tietz, Forrest Police Sergeant 136746 111902 33921 18200 60630 156 0 1107 362662 | |
Bay Area Rapid Transit Pangilinan, Edgardo Asst Controller 107785 0 214322 10903 13017 7650 1869 5734 361279 | |
Bay Area Rapid Transit Lucarelli, Frank Police Lieutenant 173811 46280 33422 23364 76427 233 0 5019 358556 | |
Bay Area Rapid Transit Collier, Roberta Asst Treasurer 33971 0 289534 1797 4072 2378 1869 4897 338518 | |
Bay Area Rapid Transit Parker, Thomas Exec Mgr Transit System Compl 136544 0 145633 19139 16863 9923 1869 5584 335554 | |
Bay Area Rapid Transit Rai |
require(quantmod) | |
getSymbols(c("SPY","TLT","GLD","AAPL")) | |
allofem <- merge(SPY[,"SPY.Adjusted"],TLT[,"TLT.Adjusted"],GLD[,"GLD.Adjusted"],AAPL[,"AAPL.Adjusted"]) | |
mo.pry <- to.monthly(allofem,OHLC=FALSE) | |
mo.ret <- diff(log(mo.pry)) | |
sub.ret <- mo.ret[(dim(mo.ret)[1]-59):dim(mo.ret)[1],] | |
mu <- apply(sub.ret,2,mean,na.rm=TRUE) | |
Sg <- cov(sub.ret,use="complete.obs") | |
w <- solve(Sg,mu) | |
n <- dim(sub.ret)[1] |