I hereby claim:
- I am seabbs on github.
- I am seabbs (https://keybase.io/seabbs) on keybase.
- I have a public key ASDWcflm0qRi8bGzqTjCLreVJSfzjC9UKr0UnsWBtQzM4wo
To claim this, I am signing this object:
| # Install and load the package -------------------------------------------- | |
| #Use install.packages(c("getTBinR", "dplyr", "getTBinR")) to get required packages | |
| library(getTBinR) #TB data + visualisations | |
| library(dplyr) # For data manipulation | |
| library(ggplot2) # For additional visualisations etc. | |
| #For storyboards - install with commented out code | |
| # install.packages("devtools") | |
| # devtools::install_github("thomasp85/patchwork") |
| ## Load latest CRAN version of benchmarkme | |
| library(benchmarkme) | |
| ## Run a benchmark for a single core | |
| single_perf <- benchmark_std() | |
| ## Run a benchmark on multiple cores (here 4) | |
| mutli_perf <- benchmark_std(cores = 4) |
| FROM rocker/tidyverse:latest | |
| MAINTAINER "Sam Abbott" contact@samabbott.co.uk | |
| ## Shell tools | |
| RUN apt-get update && apt-get install -y --force-yes --allow-unauthenticated --no-install-recommends --no-upgrade \ | |
| curl \ | |
| ## R package dependencies |
| library(xgboost) | |
| # load data | |
| data(agaricus.train, package = 'xgboost') | |
| data(agaricus.test, package = 'xgboost') | |
| train <- agaricus.train | |
| test <- agaricus.test | |
| # fit model | |
| bst <- xgboost(data = train$data, label = train$label, max_depth = 5, eta = 0.001, nrounds = 1000, | |
| nthread = 2, objective = "binary:logistic", tree_method = "gpu_hist") | |
| # predict |
| library(xgboost) | |
| # load data | |
| data(agaricus.train, package = 'xgboost') | |
| data(agaricus.test, package = 'xgboost') | |
| train <- agaricus.train | |
| test <- agaricus.test | |
| # fit model | |
| bst <- xgboost(data = train$data, label = train$label, max_depth = 5, eta = 0.001, nrounds = 1000, | |
| nthread = 2, objective = "binary:logistic", tree_method = "gpu_hist") | |
| # predict |
| ## Get required packages - managed using pacman | |
| if (!require(pacman)) install.packages("pacman"); library(pacman) | |
| p_load("getTBinR") | |
| p_load("ggplot2") | |
| p_load("ggrepel") | |
| p_load("scales") | |
| p_load("viridis") | |
| p_load("dplyr") | |
| p_load("tidyr") | |
| p_load("forcats") |
| if (!require("pacman")) install.packages("pacman") | |
| p_load("getTBinR") | |
| p_load("tidyverse") | |
| p_load("mgcv") | |
| p_load("zoo") | |
| tb <- get_tb_burden() | |
| tb_features <- tb %>% | |
| filter(e_inc_100k >= 200, e_inc_num > 100) %>% |
| # If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the | |
| # scheme used to connect to this server | |
| map $http_x_forwarded_proto $proxy_x_forwarded_proto { | |
| default $http_x_forwarded_proto; | |
| '' $scheme; | |
| } | |
| # If we receive X-Forwarded-Port, pass it through; otherwise, pass along the | |
| # server port the client connected to | |
| map $http_x_forwarded_port $proxy_x_forwarded_port { | |
| default $http_x_forwarded_port; |
| #!/bin/bash | |
| cd $repo | |
| git reflog expire --expire=now --all && git gc --prune=now --aggressive | |
| cd .. | |
| java -jar bfg-$(version).jar --strip-blobs-bigger-than 100M $repo |
I hereby claim:
To claim this, I am signing this object: