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
{ | |
"properties": { | |
"name": "keyvault", | |
"connectionParameters": { | |
"vaultName": { | |
"type": "string", | |
"uiDefinition": { | |
"displayName": "Vault name", | |
"description": "Name of the vault", | |
"tooltip": "Provide name of the vault", |
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
#' Load or install packages | |
#' | |
#' It tries to install the specified packages multiple (deafault is 10) times. | |
#' | |
#' @param packages character vector of packages which should be loaded or installed if they are not already. | |
#' @param recursive_depth Argument that is used for selecting how many times the installation should be tried. | |
#' Defaults to 10. Not intended to be changed. | |
#' | |
#' @return | |
#' @export |
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(parallel) | |
# detect number of compute cores | |
num_cores <- detectCores() | |
# register the cluster | |
cl <- makeCluster(num_cores) | |
# load libraries on all nodes in cluster | |
clusterEvalQ(cl, library(data.table)) |
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
#!/bin/sh | |
# Check which device you want to work with | |
fdisk -l | |
# Format it with ext4 journaling filesystem. It has sufficiently low number of writes, so it is ok to use with SSDs. | |
mkfs.ext4 /dev/sda | |
# Create directory where the new disk will be mounted | |
mkdir /mnt/evo | |
# Mount the new disk to the newly created directory | |
mount /dev/sda /mnt/evo/ | |
# Check the available space on the newly mounted disk |
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(lubridate) | |
t1 <- Sys.time() | |
# DO STUFF | |
t2 <- Sys.time() | |
time_diff <- difftime(t2, t1, units = 'secs') | |
duration_str <- hms::as.hms(round(time_diff, 3)) |
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(jsonlite) | |
library(httr) | |
library(R6) | |
library(curl) | |
# Create Slack configuration object | |
slack_conf <- list( | |
incoming_webhook = "", | |
icon_url = "http://breakingapis.org/assets/vis/logo_cran.png", | |
bot_username = "R notification", |