Skip to content
Snippets Groups Projects
Select Git revision
  • daa80bd65fe85f5050277a0515522aed9d92daa9
  • master default
  • v0.6.9
  • v0.6.8
  • v0.6.7
  • v0.6.6
  • v0.6.5
  • v0.6.4
  • v0.6.2
9 results

setup.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    util.R 631 B
    randomized_sleep <- function() {
      
      wait_time <- sample(seq(5, 10, 0.5), 1) # generate random number between 5 and 10
      print(paste0("Waiting ", wait_time, " seconds")) # print waiting
      Sys.sleep(wait_time) # wait
      
    }
    
    getCurrentFileLocation <-  function()
    {
      this_file <- commandArgs() %>% 
        tibble::enframe(name = NULL) %>%
        tidyr::separate(col=value, into=c("key", "value"), sep="=", fill='right') %>%
        dplyr::filter(key == "--file") %>%
        dplyr::pull(value)
      if (length(this_file)==0) # if called out of R studio
      {
        this_file <- rstudioapi::getSourceEditorContext()$path
      }
      return(dirname(this_file))
    }