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
--- | |
params: | |
board: null | |
n: 0 | |
total: 0 | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(include = FALSE) | |
library(gt) |
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
# This code generates however many bingo sheets you need | |
# It requires you to have "squares.csv", a single column csv file with | |
# name "square" and a row for the text in each square. | |
# | |
# You also need to install wkhtmltopdf https://wkhtmltopdf.org/ and | |
# add it to your system path. This converts the html to a pdf page | |
# libraries: tidyverse, glue, rmarkdown | |
# | |
# Also make a folder "output" to store them to |
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(ggplot2) | |
library(ggirl) | |
# create the plot | |
plot <- ggplot() + | |
geom_polygon( data=map_data("state"), aes(x=long, y=lat, group=group), | |
fill="#cdddee", color="#7296bc" )+ | |
geom_point(data = data.frame(long = -77.01728, lat = 38.78125), | |
aes(x=long, y=lat), |
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
{ | |
"name": "usage-reporting-prod", | |
"image_uri": "saturncloud/saturn-rstudio:2022.01.06", | |
"description": "API endpoint for Saturn Cloud usage hosted with R and plumber", | |
"working_directory": "/home/jovyan/usage-reporting", | |
"start_script": "Rscript startup.R", | |
"git_repositories": [ | |
{ | |
"url": "[email protected]:saturncloud/usage-reporting.git", | |
"location": "/home/jovyan/usage-reporting", |
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
{ | |
"name": "nvidia-usage-alerting", | |
"image_uri": "saturncloud/saturn-r:2021.11.10-2", | |
"description": "", | |
"environment_variables": {}, | |
"working_directory": "/home/jovyan/git-repos/nvidia-reporting", | |
"start_script": "Rscript reports/alerts.R", | |
"git_repositories": [ | |
{ | |
"url": "[email protected]:saturncloud/nvidia-reporting.git", |
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
{ | |
"name": "nvidia-reporting-test", | |
"image_uri": "saturncloud/saturn-r:2021.11.10-2", | |
"description": "", | |
"environment_variables": {}, | |
"working_directory": "/home/jovyan/git-repos/nvidia-reporting", | |
"extra_packages": { | |
"apt": "unixodbc unixodbc-dev", | |
"conda": "", | |
"pip": "", |
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(tidyverse) | |
data <- | |
read_lines("07/input.txt") %>% | |
str_split(",") %>% | |
.[[1]] %>% | |
as.integer() | |
# part 1 | |
# the optimal location to meet is exactly the median (think L1 space if you're mathy) |
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
{ | |
"name": "embed-recipe-site", | |
"image_uri": "saturncloud/saturn-r:2021.11.10-2", | |
"description": "A simple website with R and Shiny for embedding recipe links", | |
"environment_variables": {}, | |
"working_directory": "/home/jovyan/git-repos/embed-recipes-site", | |
"extra_packages": { | |
"use_mamba": true, | |
"conda": "", | |
"apt": "libv8-dev", |
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(furrr) | |
library(dplyr) | |
future::plan(future::multisession()) # This is for windows, might want something else for Linux | |
data <- data.frame(letter = sample(letters,num_samples, replace = TRUE), | |
value = runif(num_samples)) | |
data %>% | |
group_by(letter) %>% |
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(tidyverse) | |
library(jsonlite) | |
x <- tribble( | |
~name, ~city, ~age, | |
"Heather", "Renton", 31, | |
"Jacqueline", "Issaquah", 34 | |
) | |
# BAD WAY |
NewerOlder