Skip to content

Instantly share code, notes, and snippets.

@tturocy
tturocy / MLEEstimate-20160510.ipynb
Created May 27, 2016 11:59
Doing statistical game theory: (Towards) the missing manual
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tturocy
tturocy / gist:4654752
Created January 28, 2013 11:25
brew install python fails - verbose output
$ brew install python --verbose
==> Downloading http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
Already downloaded: /Library/Caches/Homebrew/python-2.7.3.tar.bz2
/usr/bin/tar xf /Library/Caches/Homebrew/python-2.7.3.tar.bz2
==> Downloading patches
/usr/bin/curl -f#LA Homebrew 0.9.3 (Ruby 1.8.7-358; Mac OS X 10.8.2) https://gist.github.com/raw/4349132/25662c6b382315b5db67bf949773d76471bbcee7/python-nfs-shutil.diff -o 000-homebrew.diff
######################################################################## 100.0%
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file Lib/shutil.py
brew doctor:
no problems found.
brew --config:
HOMEBREW_VERSION: 0.9.3
ORIGIN: https://github.com/mxcl/homebrew
HEAD: b8ed4c17395a8e67deea8501928fbfbf52485b21
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
@tturocy
tturocy / consec.py
Created August 4, 2015 14:46
Compute streaks of consecutive batters retired from Retrosheet play-by-play files
import pandas
import glob
if __name__ == '__main__':
events = pandas.concat([ pandas.read_csv(fn)
for fn in glob.glob("event*.csv") ],
ignore_index=True)
events = events[events.BAT_EVENT_FL=="T"]
events["BAT_TEAM_ID"] = events["BAT_TEAM_ID"].replace("MON", "WAS")
@tturocy
tturocy / risk-version.ipynb
Created July 6, 2015 12:04
Discussion of issues in applying risk aversion and logit choice in common-values auctions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tturocy
tturocy / MLEEstimate-20150624.ipynb
Last active August 29, 2015 14:23
Doing statistical game theory: (Towards) the missing manual - talk at UEA 2015/06/24
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.