Skip to content
Snippets Groups Projects
Select Git revision
  • 0e8aeccc96c35d384e6f1b5fb9a907d084b5e84c
  • master default protected
  • debug_summertime_expulsion
3 results

jsonfortran-config.cmake.in

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))
    }