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
GroupAdd, NoMod , ahk_exe VirtualBoxVM.exe ;Desktop | |
#IfWinNotActive, ahk_group NoMod | |
#Persistent | |
SetCapsLockState, AlwaysOff | |
; Capslock alone should send Esc | |
; Capslock::Send {esc} | |
Capslock::SendInput {Blind}{Esc} |
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
# ------------------------------------------------------------------------------------------ | |
# Solution with Reduce | |
# Challenge 1 | |
find_increase <- function(accumulated, next_val) { | |
is_increase = !is.na(accumulated$previous) && accumulated$previous < next_val | |
list( | |
previous = next_val, | |
count = accumulated$count + ifelse(is_increase, 1, 0) | |
) | |
} |
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) | |
input <- readr::read_lines("days/d02/data.txt") %>% | |
stringr::str_split(" ") | |
# Challenge 1 | |
hor <- input %>% | |
purrr::keep(~ .[1] == "forward") %>% | |
purrr::map_dbl(~as.numeric(.[2])) %>% | |
sum |
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) | |
binary_flip <- function(x) ifelse(x=="1","0","1") | |
bits_seq_to_decimal <- function(x) strtoi(paste0(x, collapse = ""), base=2) | |
# Challenge 1 | |
bits <- readr::read_lines("days/d03/data.txt") %>% | |
stringr::str_split("") |
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) | |
raw_data <- readr::read_lines("days/d04/data.txt") %>% | |
stringr::str_trim() | |
BOARD_SIZE <- 5 | |
draws <- raw_data[1] %>% | |
stringr::str_split(",") %>% | |
.[[1]] %>% |
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 file has been auto-generated by i3-config-wizard(1). | |
# It will not be overwritten, so edit it as you like. | |
# | |
# Should you change your keyboard layout somewhen, delete | |
# this file and re-run i3-config-wizard(1). | |
# | |
# i3 config file (v4) | |
# | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! |
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
# extracted from http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip | |
# under public domain terms | |
country_bounding_boxes = { | |
'AF': ('Afghanistan', (60.5284298033, 29.318572496, 75.1580277851, 38.4862816432)), | |
'AO': ('Angola', (11.6400960629, -17.9306364885, 24.0799052263, -4.43802336998)), | |
'AL': ('Albania', (19.3044861183, 39.624997667, 21.0200403175, 42.6882473822)), | |
'AE': ('United Arab Emirates', (51.5795186705, 22.4969475367, 56.3968473651, 26.055464179)), | |
'AR': ('Argentina', (-73.4154357571, -55.25, -53.628348965, -21.8323104794)), | |
'AM': ('Armenia', (43.5827458026, 38.7412014837, 46.5057198423, 41.2481285671)), |
OlderNewer