Skip to content

Instantly share code, notes, and snippets.

View python.exe --help-commands
C:\etc\Python36-32\python.exe C:/git/ --help-commands
Standard commands:
build build everything needed to install
build_py "build" pure Python modules (copy to build directory)
build_ext build C/C++ extensions (compile/link to build directory)
build_clib build C/C++ libraries used by Python extensions
build_scripts "build" scripts (copy and fixup #! line)
clean clean up temporary files from 'build' command
install install everything from build directory
install_lib install all Python modules (extensions and pure Python)
View bls_spending.R
# get page
pg <- html("")
View agentBasedModel.cpp
#include <Rcpp.h>
using namespace Rcpp;
double vacc3a(double age, bool female, bool ily){
double p = 0.25 + 0.3 * 1 / (1 - exp(0.04 * age)) + 0.1 * ily;
p = p * (female ? 1.25 : 0.75);
p = std::max(p, 0.0);
p = std::min(p, 1.0);
ttmmghmm / shiny em.Rmd
Last active Aug 29, 2015
shiny examples
View shiny em.Rmd
ui = fluidPage(
div(id = "myapp",
h2("shinyjs demo"),
textInput("name", "Name", ""),
numericInput("age", "Age", 30),
textInput("company", "Company", ""),
p("Timestamp: ", span(date())),
View cranPkgsDepGraph.R
pkgs <- c("chron")
p <- makeDepGraph(pkgs, enhances = TRUE)
ttmmghmm / ETFs via Quandl
Last active Mar 27, 2016
Quandl constituents.R, ETFs via Quandl, etfGetSymsParallel.R, iShares ETFs, TTR IKTrading .R
View ETFs via Quandl
# See also below (txt <- paste("",
library(magrittr) # after dpylr?
csvQuandlUrl <- ''
csvQuandl <- list(
'Stock Index Constituents' = c(
'S&P 500 Index' = 'Indicies/SP500.csv',
ttmmghmm / git commands
Last active Mar 27, 2016
packageCreate installPackage gitCmds installR
View git commands
Individual Developer (Standalone) commands are essential for anybody who makes a commit, even for somebody who works alone.
standalone developer does not exchange patches with other people, and works in a single repository, using:
git-init(1) to create a new repository.
git-log(1) to see what happened.
git-checkout(1) and git-branch(1) to switch branches.
git-add(1) to manage the index file.
git-diff(1) and git-status(1) to see what you are in the middle of doing.