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
| from datetime import date | |
| import datatable as dt | |
| dt.Frame([dt.Type.date32.min, date(2021, 7, 20), dt.Type.date32.max], stype='date32') |
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
| library(data.table) | |
| library(gtrendsR) | |
| library(ggplot2) | |
| library(ggthemes) | |
| # Adopted from the product list by time.com: | |
| # https://time.com/5810811/coronavirus-shopping-data/ | |
| products = c("milk", "meat", "alcohol", | |
| "cleaner", "beans", "toilet paper", | |
| "hand sanitizer", "facial tissue", "rice", |
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
| library(ggplot2) | |
| library(ggthemes) | |
| library(scales) |
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 dai package | |
| library(dai) | |
| # Connect to Driverless AI instance | |
| dai_uri = "http://your.instance.name:12345" | |
| usr = "user_id" | |
| pwd = "password" | |
| dai.connect(uri = dai_uri, username = usr, password = pwd, force_version = 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
| #!/bin/bash | |
| # Install core packages | |
| sudo apt -y update && \ | |
| sudo apt -y --no-install-recommends install \ | |
| curl \ | |
| apt-utils \ | |
| wget \ | |
| libblas-dev \ | |
| default-jre \ |
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
| titanic_1tree = h2o.gbm(x = predictors, y = response, | |
| training_frame = titanicHex, | |
| ntrees = 1, min_rows = 1, sample_rate = 1, col_sample_rate = 1, | |
| max_depth = 5, | |
| # use early stopping once the validation AUC doesn't improve by at least 0.01% | |
| # for 5 consecutive scoring events | |
| stopping_rounds = 3, stopping_tolerance = 0.01, | |
| stopping_metric = "AUC", | |
| seed = 1) |
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
| library(ggplot2) | |
| data(mtcars) | |
| ggplot(mtcars) + | |
| geom_bar(aes(factor(cyl), fill=factor(cyl))) |
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
| library(RSocrata) | |
| data15.source = read.socrata(url = "https://www.dallasopendata.com/resource/8pn8-24ku.csv") | |
| data16.source = read.socrata(url = "https://www.dallasopendata.com/resource/4qfv-27du.csv") | |
| data17.source = read.socrata(url = "https://www.dallasopendata.com/resource/8849-mzxh.csv") |
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
| library(googlesheets) | |
| library(dplyr) | |
| library(lubridate) | |
| gsh = gs_title("Rome-Siracusa-vacations") | |
| vdata = gsh %>% gs_read() | |
| vdata$ts = mdy(vdata$Date) |
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
| library(toaster) | |
| close(conn) | |
| conn = odbcDriverConnect(connection="driver={Aster ODBC Driver};server=10.xx.xx.xx;port=2406;database=dallas;uid=beehive;pwd=beehive", | |
| interpretDot=TRUE) | |
| dallasPermitsTableInfo = getTableSummary(conn, "dallasbuildingpermits") | |
| getNumericColumns(dallasPermitsTableInfo) |
NewerOlder