View MongoDB_Experiment_IPython
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:2c5a94596837b925899f0aab294f5a5d31a0c6227abf97c00b871ecbe116bcdf" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
View Postgres_Fun
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
csvsql --db postgresql:///test1 --insert Problem_Set_Operations_Research.csv | |
# I was having some trouble getting a csv file inserted into a Postgres Database. The above line worked. | |
\dt | |
#Shows the tables in a particular database | |
\connect test1 | |
#Connects to a database with a particular name in the case above "test1" |
View pandas_dbms.py
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
# -*- coding: utf-8 -*- | |
""" | |
LICENSE: BSD (same as pandas) | |
example use of pandas with oracle mysql postgresql sqlite | |
- updated 9/18/2012 with better column name handling; couple of bug fixes. | |
- used ~20 times for various ETL jobs. Mostly MySQL, but some Oracle. | |
to do: | |
save/restore index (how to check table existence? just do select count(*)?), | |
finish odbc, |
View datascienceRscript
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
install.packages("caret") | |
install.packages("rpart") | |
install.packages("tree") | |
install.packages("randomForest") | |
install.packages("e1071") | |
install.packages("ggplot2") | |
table <- read.csv("DataSciIntro/assignment5//seaflow_21min.csv") | |
library("caret") | |
library("rpart") |
View datascienceRscript
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
install.packages("caret") | |
install.packages("rpart") | |
install.packages("tree") | |
install.packages("randomForest") | |
install.packages("e1071") | |
install.packages("ggplot2") | |
table <- read.csv("DataSciIntro/assignment5//seaflow_21min.csv") | |
library("caret") | |
library("rpart") |
View installpythonframeworks.sh
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/bash | |
virtualenv .env && | |
source .env/bin/activate && | |
sudo apt-get install -y libevent-dev && | |
sudo apt-get install -y libyaml-0-2 && | |
sudo apt-get install --yes --force-yes automake autoconf libtool* gfortran && | |
sudo apt-get install --yes --force-yes liblapack-dev && | |
sudo apt-get install --yes --force-yes binutils && | |
sudo apt-get install -y libatlas-dev && | |
sudo apt-get install -y build-essential --upgrade && |
View Updated_Six_Nations_Model
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:9c901b87c21a76e998af9a7e0bf41fad4ba1df839faeac70481cbcb4124e7289" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
View Sixnationsmodel
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:50c3d72f03b2ec97ee24d9e5a4f27faa1a48d7fe209616e378edc70f146f845b" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
View report-runner.py
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
# -*- coding: utf-8 -*- | |
""" | |
Sample report generation script from pbpython.com | |
This program takes an input Excel file, reads it and turns it into a | |
pivot table. | |
The output is saved in multiple tabs in a new Excel file. | |
""" |
View Bayesian_Model.py
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
g = simuls.groupby('Team') | |
season_hdis = pd.DataFrame({'points_lower': g.points.quantile(.05), | |
'points_upper': g.points.quantile(.95), | |
'goals_for_lower': g.gf.quantile(.05), | |
'goals_for_median': g.gf.median(), | |
'goals_for_upper': g.gf.quantile(.95), | |
'goals_against_lower': g.ga.quantile(.05), | |
'goals_against_upper': g.ga.quantile(.95), | |
}) | |
season_hdis = pd.merge(season_hdis, df_observed, left_index=True, right_on='Team') |
OlderNewer