This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# take an image and a desired width in inches, set the DPI | |
# | |
input=$1 | |
width=$2 | |
echo $input | |
echo $width |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\title{Warren Buffet's 1B Basketball Challenge} | |
\begin{document} | |
\maketitle | |
\section{Expected Value} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{beamer} | |
\begin{document} | |
<<echo=FALSE>>= | |
library("qgraph") | |
@ | |
%%% SLIDE 1 %%% | |
\begin{frame}[fragile]{Weights matrices} | |
\begin{columns} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
### unsass.R | |
### | |
### a fairly syntactically clean way of doing unstructuring assignments in R | |
### | |
### syntax: (a~b~c) %=% list(A,B,C) | |
### | |
### not very tested | |
### | |
unsass <- function(lhs,rhs){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from lxml import etree | |
import zipfile | |
# some namespaces we may need | |
DRAW="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" | |
DRAWC = "{%s}" % DRAW | |
PRES='urn:oasis:names:tc:opendocument:xmlns:presentation:1.0' | |
PRESC = "{%s}" % PRES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# here is a way to make an rpanel dialog wider. Useful when the default skinny | |
# sliders are not precise enough for fat fingered prodders: | |
# standard slider demo | |
density.draw <- function(panel) { | |
plot(density(panel$x, bw = panel$h)) | |
panel | |
} | |
# create panel and add slider. Note aschar=FALSE so we can get the $window: |