View gist:b0cb9a11e6f3fabe50e05b89915180cf
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 ubuntu:focal | |
# set ENV variables | |
ENV LC_ALL=en_US.UTF-8 | |
ENV LANG=en_US.UTF-8 | |
ENV TERM=xterm | |
ENV DEBIAN_FRONTEND=noninteractive | |
# locale ----------------------------------------------------------------------# | |
RUN apt update \ |
View rcli.json
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
{ | |
"version": "0.9.0", | |
"description": "The R installation manage: Install, remove, configure R versions.", | |
"homepage": "https://github.com/pat-s/rcli", | |
"license": "LGPL-3", | |
"url": "https://github.com/pat-s/rcli/releases/download/0.9.0/rcli", | |
"bin": "rcli", | |
"checkver": "github" | |
} |
View collect-mlr3-updates.R
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
library(tidyverse) | |
library(htmltab) | |
library(lubridate) | |
library(pkgsearch) | |
list_repos = httr::content(httr::GET("https://api.github.com/orgs/mlr-org/repos?per_page=100")) | |
list_repos_v = unlist(lapply(list_repos, function(x) x$name)) | |
repos_mlr3 = grep("mlr3", list_repos_v, value = TRUE) | |
# add non-mlr3 repos |
View code.R
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
## ----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 |
View install-cluto.R
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
# 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) |
View git-startup-rstudio
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
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() |
View git-pull-rstudio
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
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() | |
} | |
} |
View gist:529d386d2e1e9e6ae068db73431f8866
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
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 |
View RStudio_usethis_selection_browse.R
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
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()) | |
} |
View gist:938d5642573107654e09c9884dd3bc28
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
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 |
NewerOlder