Cloud, containers & misc. logos roadmap
"The Swiss Army Knife of Embedded Linux"
| Busybox |
|---|
![]() |
| # original script from @jennybc but wanted to change function name | |
| # original source: https://gist.github.com/jennybc/2bf1dbe6eb1f261dfe60 | |
| ## quick-and-dirty ersatz Unix tree command in R | |
| ## inspired by this one-liner: | |
| ## ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/' | |
| ## found here (among many other places): | |
| ## http://serverfault.com/questions/143954/how-to-generate-an-ascii-representation-of-a-unix-file-hierarchy | |
| tRee <- function(path = getwd(), level = Inf) { |
| # Creates interactive datatable | |
| # EDIT: Found how to add save buttons (cc: augmented dom var) | |
| # Check here: https://stackoverflow.com/questions/33432174/how-to-set-multiple-option-list-and-extensions-in-dtdatatable/35200721#35200721 | |
| DTtabler <- function(file = file, | |
| nDigits_after_decimal = 2){ # absolut path to file |
| # Motivation of including extra code snippet: | |
| # Annoying warning message spammer repo of the day: | |
| # CRANextra = "http://www.stats.ox.ac.uk/pub/RWin" | |
| batchInstaller <- function(list_of_packages , | |
| cpuse = parallel::detectCores() - 2){ | |
| options(repos = (CRAN = "https://cran.rstudio.com/")) | |
| # Stack gem here: https://stackoverflow.com/questions/4090169/elegant-way-to-check-for-missing-packages-and-install-them | |
Found here
| ES6 with JS | ES6 logo | ES6 Syntax |
|---|---|---|
![]() |
![]() |
![]() |
| # Creates interactive datatable | |
| # EDIT: Found how to add save buttons (cc: augmented dom var) | |
| # Check here: https://stackoverflow.com/questions/33432174/how-to-set-multiple-option-list-and-extensions-in-dtdatatable/35200721#35200721 | |
| interactivDataTabler <- function(df = df, | |
| nDigits_after_decimal = 2, | |
| header_color = "#0199F3", | |
| caption = ""){ # absolut path to file |
| # A GET request for retrieving all projects | |
| import requests | |
| url = "http://api.lifebit.ai/projects" | |
| payload = "" | |
| headers = { | |
| 'apikey': "HO000000PMqh60000000aDIJxgkRKnUllWXU", | |
| } |
| # >_ Install tidyverse and use many cores else we will wait forever: | |
| percentage_cpu = 0.75 | |
| if (!require("tidyverse")) install.packages("tidyverse", Ncpus = floor(percentage_cpu * parallel::detectCores())) | |
| # Load the whole tidyvrse - totally unnecessary btw (dpdlyr will suffice) | |
| library(tidyverse) | |
| # Convert dataframe to tibble for the group_by etc functions to work | |
| iris_tbl <- tibble::as_data_frame(iris) |
| percentage_cpu = 0.75 | |
| if (!require("parallel")) install.packages("parallel") | |
| if (!require("devtools", quietly = TRUE)) install.packages("devtools", Ncpus = floor( percentage_cpu * (parallel::detectCores() ))) | |
| devtools::source_url("http://bit.ly/mr_installoader") |
| # SO help from here: https://stackoverflow.com/questions/6081439/changing-column-names-of-a-data-frame | |
| colnames(dataframe)[which(names(dataframe) == "columnName")] <- "newColumnName" |