This file contains hidden or 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
[2013-02-19 09:25:50] make | |
CC = clang | |
LD = ld | |
LDSHARED = clang -dynamic -bundle | |
CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -pipe | |
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT | |
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/Users/maraaverick/.rvm/usr/include -I. -I.ext/include/x86_64-darwin12.2.0 -I./include -I. | |
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace | |
SOLIBS = | |
compiling regparse.c |
This file contains hidden or 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
gcc --version | |
gcc (GCC) 4.8.0 20130113 (experimental) | |
Copyright (C) 2013 Free Software Foundation, Inc. | |
This is free software; see the source for copying conditions. There is NO | |
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
This file contains hidden or 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
api.tumblr.com/v2/blog/{base-hostname}/posts/text?api_key={key}&[optional-params=] | |
// Response format | |
"response": { | |
"blog": { ... }, | |
"posts": [ | |
{ | |
"blog_name": "citriccomics", | |
"id": 3507845453, | |
"post_url": "http:\/\/citriccomics.tumblr.com\/post\/3507845453", |
This file contains hidden or 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 and load the stattleshipR package | |
devtools::install_github("stattleship/stattleship-r") | |
library(stattleshipR) | |
## get your API token stattleship.com | |
## set your API token | |
set_token('YOUR_ACCESS_TOKEN') | |
## set params according to | |
## developers.stattleship.com |
This file contains hidden or 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 and load the stattleshipR package | |
devtools::install_github("stattleship/stattleship-r") | |
library(stattleshipR) | |
## get your API token stattleship.com | |
## set your API token | |
set_token('YOUR_ACCESS_TOKEN') | |
## Set params according to | |
## developers.stattleship.com |
This file contains hidden or 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
######################################################################### | |
## Get NBA Team Game Logs From the Stattleship API | |
######################################################################### | |
## install and load the stattleshipR package | |
devtools::install_github("stattleship/stattleship-r") | |
library(stattleshipR) | |
## set API token | |
set_token('YOUR_ACCESS_TOKEN') |
This file contains hidden or 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 and load the stattleshipR package | |
devtools::install_github("stattleship/stattleship-r") | |
library(stattleshipR) | |
## get your API token stattleship.com | |
## set API token | |
set_token('YOUR_ACCESS_TOKEN') | |
## load NBA teams data frame | |
load("nba_teams.Rdata") |
This file contains hidden or 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 and load the stattleshipR package | |
devtools::install_github("stattleship/stattleship-r") | |
library(stattleshipR) | |
## get API token at playbook.stattleship.com | |
## set API token | |
set_token('YOUR_ACCESS_TOKEN') | |
## set up envt | |
options(stringsAsFactors=FALSE) |
This file contains hidden or 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
## load the stattleshipR and dplyr packages | |
library(stattleshipR) | |
library(dplyr) | |
## set params for team_game_logs | |
sport <- "basketball" | |
league <- "nba" | |
ep <- "team_game_logs" | |
## leave q_body empty to get all |
This file contains hidden or 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
## set keys for the data table on game_slug and opponent_slug | |
team_game_logs <- setkey(team_game_logs, game_slug, opponent_slug) | |
## get opponent leads by matching on both key columns | |
team_game_logs$opp_biggest_lead <- team_game_logs[. (team_game_logs$game_slug, team_game_logs$opponent_slug)]$points_biggest_lead | |
## set keys for the data table on game_slug and opponent_slug | |
team_game_logs <- setkey(team_game_logs, game_slug, opponent_slug) | |
## get opponent leads by matching on both key columns |
OlderNewer