Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View pat-s's full-sized avatar

Patrick Schratz pat-s

View GitHub Profile
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
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())
}
@pat-s
pat-s / gist:938d5642573107654e09c9884dd3bc28
Last active April 1, 2020 16:32
add mlr3learners Paramtest
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
@pat-s
pat-s / example.R
Created March 17, 2020 21:14
init_mlr3learner_drat_deploy
init_mlr3learner_drat_deploy("mlr3learners.mboost") # replace this with the actual learner name
@pat-s
pat-s / addins.json
Last active March 2, 2020 09:58
Apply RStudio Desktop Settings
{
"styler::style_active_file": "Ctrl+Y",
"addmins::insert_dashes": "Ctrl+8",
"xaringan::inf_mr": "Ctrl+M",
"drake::rs_addin_loadd": "Ctrl+K",
"browse::browse": "Ctrl+B"
}
@pat-s
pat-s / install-r-macOS.sh
Created December 14, 2019 08:20
Install R official on macOS
#! /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 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

Keybase proof

I hereby claim: * I am pat-s on github. * I am pjs_2288 (https://keybase.io/pjs_2288) on keybase. * I have a public key ASB8cUKmxs09bvNSYJ2iOViLxrnW16qLshzeuq2Q0AA9Uwo To claim this, I am signing this object:

{   "body": {     "key": {       "eldest_kid": "01207c7142a6c6cd3d6ef352609da239588bc6b9d6d7aa8bb21cdebaad90d0003d530a",       "host": "keybase.io",       "kid": "01207c7142a6c6cd3d6ef352609da239588bc6b9d6d7aa8bb21cdebaad90d0003d530a",       "uid": "12e179864b07ae9c1b23ce0419e08f19",       "username": "pjs_2288"     },     "merkle_root": {       "ctime": 1571349533,       "hash": "3cde0ebb524780b292e1268998cfe41adfab25eeb860beb42ff66d939ec8f8d4f94084495db97fdb62cc1402c1ec370d757fc22017043acc2abc9ad7a75bc19a",       "hash_meta": "947b2df0b7b8a92e4dadae3cf08ec34596c7f5a41ccabb6ff1135ba71a6b68b2",       "seqno": 8204710     },     "service": {       "entropy": "KD5cShE51I0CqV15tlqxkby/",       "name": "github",       "username": "pat-s"     },     "type": "web_service_bin
@pat-s
pat-s / spack-build-out.txt
Created October 5, 2019 14:43
grass 7.8.0
This file has been truncated, but you can view the full file.
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> [2019-10-05-16:05:13.779680] '/tmp/patrick/grass-7.8.0-2umd6vzsjtjx5dobpu5yblxcuq7sczqu/spack-src/configure' '--prefix=/opt/spack/opt/spack/linux-centos7-zen/gcc-9.2.0/grass-7.8.0-2umd6vzsjtjx5dobpu5yblxcuq7sczqu' '--without-odbc' '--without-nls' '--without-opendwg' '--with-x' '--with-gdal=/opt/spack/opt/spack/linux-centos7-zen/gcc-9.2.0/gdal-3.0.1-ow6bgxc2x5amspwcsjg3lbqxlse4p5bs/bin/gdal-config' '--with-proj-share=/opt/spack/opt/spack/linux-centos7-zen/gcc-9.2.0/proj-6.1.0-i25e6pyslcskd23sac6lqsfczwh6h4gr/share/proj' '--with-cxx' '--with-tiff' '--with-png' '--without-postgres' '--without-mysql' '--with-sqlite' '--without-opengl' '--with-fftw' '--without-blas' '--without-lapack' '--with-cairo' '--without-freetype' '--without-readline' '--with-regex' '--without-pthread' '--without-openmp' '--without-opencl' '--without-bzlib' '--without-netcdf' '--with-geos=/opt/spack/opt/spack/linux-centos7-zen/gcc-9.2.0/geos-3.7.2-hn6gflrgkurjja2i5bltlcse
remotes::install_github("mlr-org/mlr@0c8185963f13303e143d634dc5bcd199edb01442")
library(mlr)
library(ParamHelpers)
library(parallelMap)
library(magrittr)
inner <- makeResampleDesc("CV", iters = 2)
outer <- makeResampleDesc("CV", iters = 4)
lrn_xgboost <- makeLearner(