A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
# Step 1. | |
seaflow <- read.csv('seaflow_21min.csv', header=T) | |
summary(seaflow) | |
# Step 2. | |
# a <- sample(dim(seaflow)[1], dim(seaflow)[1]*0.8) | |
# trainseaflow <- seaflow[a,] | |
# b <- 1:dim(seaflow)[1] | |
# test.df <- seaflow[setdiff(b, a),] |
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
# C extensions | |
*.so | |
# Distribution / packaging | |
.Python | |
env/ |
# Using airquality dataset | |
data <- airquality | |
data[4:10,3] <- rep(NA,7) | |
data[1:5,4] <- NA | |
# Removing categorical variables | |
data <- airquality[-c(5,6)] | |
summary(data) | |
#------------------------------------------------------------------------------- |
import requests | |
import csv | |
import sys | |
# get me all active players | |
url_allPlayers = ("http://stats.nba.com/stats/commonallplayers?IsOnlyCurrentSeason" | |
"=0&LeagueID=00&Season=2015-16") | |
#request url and parse the JSON |