Skip to content

Instantly share code, notes, and snippets.

Avatar

Tom Loredo tloredo

  • Cornell University
  • Ithaca, NY
View GitHub Profile
View YosemiteDiagnosticTestResults
1 Start time: 18:52:58 06/21/15
2
3 Revision: 1323
4
5 Model Identifier: MacBookPro10,2
6 System Version: OS X 10.10.3 (14D136)
7 Kernel Version: Darwin 14.3.0
8 Time since boot: 6 minutes
9
10 FileVault 2
@tloredo
tloredo / PyStanNormNormTest.py
Last active Aug 29, 2015
Basic test of PyStan using a normal mean estimation problem
View PyStanNormNormTest.py
"""
Test an installation of PyStan using a simple normal mean estimation problem.
The script does a Stan fit to simulated data from a normal distribution,
estimating the mean with a normal prior/normal sampling dist'n model. It prints
summaries of the posterior to the terminal, and plots two figures showing
traceplots (of the posterior mean and the log density) and an estimated
posterior PDF (blue curve) along with the analytical PDF (green dashed curve).
Three statistical tests are run, with results printed to the terminal. They
@tloredo
tloredo / BVNGridSpec.py
Created Apr 15, 2015
GridSpec example for BVNDemo IPython notebook
View BVNGridSpec.py
# This won't run as a standalone Python script; put it in a cell at
# the bottom of your BVNDemo IPy notebook and run it there.
# Get BVN samples to plot.
bvn = BivariateNormal([0,0], [1,1], .7)
xyvals = bvn.sample(500)
# We'll put 3 different, related axes in a single new figure.
fig = figure(figsize=(8,6))
@tloredo
tloredo / NotebookIntro.ipynb
Created Feb 6, 2015
Quick intro to the IPython notebook for BDA course
View NotebookIntro.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tloredo
tloredo / ScrapeNetflixRatings.py
Created Jan 17, 2014
Python script for scraping a Netflix user's movie ratings from the user's ratings web pages.
View ScrapeNetflixRatings.py
"""
Scrape a user's Netflix movie ratings by automating a Safari browsing
session (with the user already logged in). The ratings are written
as tab-delimited UTF-8 encoded text in a plain text file.
This Python script is for terminal-savvy Mac users.
To use
======