Skip to content

Instantly share code, notes, and snippets.

View ivelasq's full-sized avatar

Isabella Velásquez ivelasq

View GitHub Profile
rotations = scan("input.txt", character())
counter = 0
new_starting_position = 50
max_dial = 99
pattern = "\\d+"
# Part 1 ---
for (rotation in rotations){
{
"rstudio.keymap.enable": true,
"application.experimental.positronPlotsInEditorTab": true,
"positron.appLauncher.showShellIntegrationNotSupportedMessage": false,
"positron.assistant.testModels": true,
"positron.assistant.enable": true,
"positron.assistant.consoleActions.enable": true,
"quarto.cells.background.color": "useTheme",
"notebook.defaultFormatter": "ms-python.black-formatter",
"editor.defaultFormatter": "ms-python.black-formatter",
@ivelasq
ivelasq / show-results.Rmd
Created July 28, 2025 17:47
R Markdown Results Fold
---
title: R Markdown Results Fold
---
```{r}
#| eval: false
plot(mtcars$mpg, mtcars$hp)
```
@ivelasq
ivelasq / resize.R
Created July 30, 2024 17:14
Resizing images using R
library(magick)
input_folder <- "test/"
output_folder <- "resized/"
if (!dir.exists(output_folder)) {
dir.create(output_folder)
}
image_files <- list.files(input_folder, full.names = TRUE, pattern = "\\.(jpg|jpeg|png)$")
library(shiny)
library(plotly)
library(gridlayout)
library(bslib)
ui <- grid_page(
layout = c("header header ",
"sidebar plot "),
row_sizes = c("100px",
"1fr"),
library(charlatan)
set.seed(1234)
(z <- AddressProvider$new('nl_NL'))
address_list <- purrr::map(1:5, function(x) {
dplyr::bind_cols(
building = z$building_number(),
street = z$street_address(),
@ivelasq
ivelasq / file-sizes.R
Created February 14, 2023 11:50
Find file sizes in directory
all_files <- fs::dir_ls(".", recurse = TRUE)
files_info <-
dplyr::bind_cols(all_files, fs::file_size(all_files))
@ivelasq
ivelasq / wp.html
Last active February 21, 2023 19:25
WordPress HTML
<!-- Code block -->
<pre class="sourceCode r code-with-copy" style="background-color: rgba(221,225,228,.2);"><span id="cb1-1" style="font-size: medium;">
</span></code></pre>
<!-- Quote block -->
<blockquote style="margin: 20px 0 30px; padding-left: 20px; border-left: 2px solid #7494B1;"><q class="body-md-regular">There are only two hard things in computer science: cache invalidation and naming things.</q></blockquote>
<!-- Indent bullet list -->
<ul style="padding-left: 30px;"></ul>
talks <-
tibble::tribble(
~ talks,
"{shinyslack}",
"{shinytest2}",
"A Journey to Data Science",
"A new way to build your Shiny app's UI",
"A Robust Framework for Automated Shiny App Testing",
"A touch of R in Robotics",
"Accelerating geospatial computing using Apache Arrow",
@ivelasq
ivelasq / queens.R
Created April 28, 2022 15:32
Silly plot of Henry VIII's wives
library(dplyr)
library(ggplot2)
library(emoGG)
library(MetBrewer)
dat <-
tibble::tribble(
~queen, ~marriage_start, ~marriage_end, ~reason, ~marriage_age,
"Catherine of Aragon", 1509, 1533L, "divorced", 23L,
"Anne Boleyn", 1533L, 1536L, "beheaded", 32L,