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
get_split_date_periods <- function(split_dates) { | |
n_splits <- length(split_dates) | |
if (n_splits > 1) { | |
split_date_periods <- list() | |
iterable <- c(1, 1:n_splits) | |
for (i in 1:length(iterable)) { | |
if (i == 1) { | |
split_date_periods[[i]] <- sprintf("/%s", split_dates[iterable[i]] - 1) | |
} else if (i == length(iterable)) { | |
split_date_periods[[i]] <- sprintf("%s/", split_dates[iterable[i]]) |
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
import sys | |
import requests | |
import bs4 | |
import lxml | |
import selenium | |
print(sys.version) | |
print(requests.__version__) | |
print(bs4.__version__) | |
print(lxml.__version__) |
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
import sys | |
import numpy as np | |
import pandas as pd | |
import matplotlib as mpl | |
print(sys.version) | |
print(np.__version__) | |
print(pd.__version__) | |
print(mpl.__version__) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from chalice import Chalice, BadRequestError | |
import json | |
from datetime import date, datetime | |
import csv | |
import requests | |
import io | |
app = Chalice(app_name='jhu-data-scraper') | |
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
import requests | |
request_url = "https://data.nba.net/10s/prod/v3/today.json" | |
request_headers = { | |
'authority': "data.nba.net", | |
'method': "GET", | |
'path': "/10s/prod/v3/today.json", | |
'scheme': "https", | |
'accept': "application/json, text/plain, */*", | |
'accept-encoding': "gzip, deflate, br", |