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
/* ------------------------------------------------------- | |
* | |
* !! This file was generated by xaringanthemer !! | |
* | |
* Changes made to this file directly will be overwritten | |
* if you used xaringanthemer in your xaringan slides Rmd | |
* | |
* Issues or likes? | |
* - https://github.com/gadenbuie/xaringanthemer | |
* - https://www.garrickadenbuie.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
#! /bin/bash | |
R_VERSION=$1 | |
wget https://mac.r-project.org/el-capitan/R-${R_VERSION}-branch/R-${R_VERSION}-branch-el-capitan-sa-x86_64.tar.gz | |
sudo tar fvxz R*.tar.gz -C / | |
rm R*.tar.gz |
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
init_mlr3learner_drat_deploy("mlr3learners.mboost") # replace this with the actual learner name |
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
fs::dir_create("inst/paramtest", recurse = TRUE) | |
writeLines('on: | |
push: | |
pull_request: | |
# for now, CRON jobs only run on the default branch of the repo (i.e. usually on master) | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: "0 4 * * *" | |
name: Parameter Check |
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
browse_news <- function(package = NULL) { | |
# check for pkgdown url | |
field_url <- desc::desc_get_urls(file = system.file("DESCRIPTION", package = package))[1] | |
# check if a news site exists for the given url | |
has_pkgdown <- httr::status_code(httr::GET(paste0(field_url, "/news"))) == 200 | |
if (has_pkgdown) { | |
view_url((paste0(field_url, "/news"))) | |
return(invisible()) | |
} |
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
Jun 12 01:03:00 charge2 kernel: [762622.063494] testing the buffer | |
Jun 12 01:03:00 charge2 kernel: [762622.063505] testing the buffer | |
Jun 12 01:03:00 charge2 kernel: [762622.063592] testing the buffer | |
Jun 12 01:03:00 charge2 kernel: [762622.063604] testing the buffer | |
Jun 12 01:03:01 charge2 CRON[58247]: (ursmaendli) CMD (/home/ursmaendli/charge2/run.sh >> /home/ursmaendli/run-sh.log 2>&1) | |
Jun 12 01:03:01 charge2 CRON[58248]: (ursmaendli) CMD (/home/ursmaendli/charge2/run-static.sh >> /home/ursmaendli/run-static-sh.log 2>&1) | |
Jun 12 01:03:02 charge2 containerd[80521]: time="2020-06-12T01:03:02.341916576Z" level=info msg="shim containerd-shim started" address=/containerd-shim/355a87ba8742cd32cd0d779d231a254f64410b04ae06fd07a1616efb84c2781f.sock debug=false pid=58266 | |
Jun 12 01:03:02 charge2 containerd[80521]: time="2020-06-12T01:03:02.397109845Z" level=info msg="shim containerd-shim started" address=/containerd-shim/ef6ccfec1e235dab150e0ec0e1409e821985432e28a324418737a76f1c85f8a3.sock debug=false pid=58300 | |
Jun 12 |
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
if (requireNamespace(c("callr", "git2r"), quietly = TRUE)) { | |
has_git = git2r::in_repository() | |
if (has_git) { | |
message("Running `git2r::pull()` in the background.") | |
callr::r_bg(function() {git2r::pull()})$wait()$get_result() | |
} | |
} |
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
if (requireNamespace(c("callr", "git2r", "gert", "cli"), quietly = TRUE)) { | |
has_git = git2r::in_repository() | |
if (has_git && Sys.getenv("RSTUDIO") == 1) { | |
cli::cli_text("Running | |
{.code gert::git_pull(verbose = FALSE, prune = TRUE, rebase = TRUE)} | |
in the background.") | |
callr::r_bg(function() { | |
gert::git_pull(verbose = FALSE, prune = TRUE, rebase = TRUE) | |
}, | |
stdout = out <- tempfile(), stderr = err <- tempfile())$wait() |
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
# because base::file.rename() is a pain across OS | |
requireNamespace("fs", quietly = TRUE) | |
# download cluto zip file | |
temp = tempfile() | |
utils::download.file("http://glaros.dtc.umn.edu/gkhome/fetch/sw/cluto/cluto-2.1.2a.zip", temp, quiet = TRUE) | |
utils::unzip(temp, files = c("cluto-2.1.2/Linux-x86_64/vcluster", "cluto-2.1.2/MSWIN-x86_64/vcluster.exe")) | |
unlink(temp) |
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
## ----mlr3-config, echo = FALSE--------------------------------------------------------------------------- | |
lgr::get_logger("bbotk")$set_threshold("warn") | |
lgr::get_logger("mlr3")$set_threshold("warn") | |
## ----example, fig.show="hide"---------------------------------------------------------------------------- | |
library("mlr3verse", quietly = TRUE) | |
set.seed(42) | |
# example tasks |