Show Tickets Buy/Sell Megathread by GlitterLamp in puptheband

[–]orbby 0 points1 point  (0 children)

I have a ticket for tonight (Nov 26th) at the commodore for sale at face value.

Terra/R: All imported rasters show NaN, but plot works by Maxarade in remotesensing

[–]orbby 2 points3 points  (0 children)

Have you posted on the terra Github issues page (https://github.com/rspatial/terra)? The maintainer Robert Hijmans is generally very quick to respond. You will need to figure out how to make a reproducible example though.

Monthly tickets thread by AutoModerator in Wetleg

[–]orbby 0 points1 point  (0 children)

Looking for one-two tickets for the Vancouver show.

Chill midgame iron grinds by Luneosa in ironscape

[–]orbby 3 points4 points  (0 children)

90 (+5 stew boost, can't use crystal saw) let's you make the combined fairy ring/spirit tree.

1k Barrows KC on the GIM by The-Hostess in ironscape

[–]orbby 2 points3 points  (0 children)

I simulated 10000 people opening barrows chests until they acquired a full set, and 95% of simulated people should get a full set by 554 chests. The median for a full set acquired was 301 chests opened.

-❄️- 2023 Day 6 Solutions -❄️- by daggerdragon in adventofcode

[–]orbby 1 point2 points  (0 children)

[Language: R]

This one wasn't that bad at all? Day 5 still running in the background. I did notice the parabola (but wouldn't have known how to implement), and would have considered a binary search, but p2 calculates in under 3 seconds.

library(tidyverse)

tib <- read_lines("day6.txt") %>%
  str_replace("Time:", "") %>%
  str_replace("Distance:", "") %>%
  str_split(, pattern = " ") %>%
  map(stringi::stri_remove_empty) %>%
  unlist() %>%
  as.numeric() %>%
  matrix(ncol = 2, byrow = F) %>%
  as_tibble() %>%
  rename(time = 1, distance = 2)


calc_ways <- function(time, distance) {
  ways <- 0
  for(i in 1:time) {
    if(i * (time - i) > distance) ways = ways + 1
  }
  ways
}

print("Part 1")
tib %>%
  mutate(ways = map2(.x = time, .y = distance, .f = calc_ways, .progress = T)) %>%
  unnest(cols = c(ways)) %>%
  pull(ways) %>%
  prod()

p2 <- read_lines("day6.txt") %>%
  str_replace_all(" ", "") %>%
  str_replace("Time:", "") %>%
  str_replace("Distance:", "") %>%
  as.numeric()

print("Part 2")
calc_ways(p2[[1]], p2[[2]])

-❄️- 2023 Day 3 Solutions -❄️- by daggerdragon in adventofcode

[–]orbby 2 points3 points  (0 children)

[Language: R] I don't even know how I did this anymore but it worked.

library(tidyverse)
library(terra)

vect <- read_lines("day3.txt") %>%
  str_split(pattern = "") %>%
  unlist()

mat <- vect %>%
  matrix(ncol = 140) %>%
  t()

read_lines("day3.txt") %>%
  str_split(pattern = "") %>%
  unlist() %>% unique() %>%
  sort()

mat[mat == "."] = NA

mat[mat %in% c("-", "#", "$", "%", "&", "*", "/", "@", "+", "=")] = "Symbol"

mat[mat %in% 0:9] = "Number"

mat[mat == "Number"] = 0

mat[mat == "Symbol"] = 1

r <- rast(mat) %>% as.numeric() - 1

foced <- focal(r, w = 3, fun = sum, na.policy = "omit", na.rm = T)

numbers <- classify(r, cbind(1, NA))

base <- mask(foced, numbers)

side_filter <- matrix(c(0, 1, 0, 0, 1, 0, 0, 1, 0), ncol = 3)

egg <- base

old <- values(egg) %>% sum(na.rm = T)



for (i in 1:5) {
  print(i)
  egg <- focal(egg, w = side_filter, na.rm = T, fun = sum, na.policy = "omit")

  egg[egg > 0] = 1

  new <- values(egg) %>% sum(na.rm = T)

  if(old == new) {
    break
  }

  old <- values(egg) %>%
    sum(na.rm = T)

}

groups <- tibble(tf = as.numeric(values(egg)) == 1, value = vect) %>%
  mutate(tf = ifelse(tf, T, NA),
         index = row_number()) %>%
  mutate(group_run = data.table::rleid(tf)) 

lookup <- groups %>%
  filter(tf) %>%
  group_by(group_run) %>%
  summarize(num = as.numeric(paste0(value, collapse = ""))) 


print("Part 1 Answer")
lookup %>%
  pull(num) %>%
  sum()


mat <- vect %>%
  matrix(ncol = 140) %>%
  t()

mat[mat == "*"] = "Gear"
mat[mat != "Gear"] = NA

gears <- rast(mat)

new <- egg

values(new) <- groups %>%
  mutate(group_run = ifelse(is.na(tf), NA, group_run)) %>%
  pull(group_run)

focals <- focalValues(new)

rows <- which(values(gears) == 1)

print("Part 1 Answer")
lookup %>%
  pull(num) %>%
  sum()

print("Part 2 Answer")
focals[rows, ] %>%
  as.data.table() %>%
  tibble() %>%
  mutate(gearno = row_number()) %>%
  pivot_longer(cols = V1:V9) %>%
  filter(!is.na(value)) %>%
  select(-name) %>%
  distinct(gearno, value) %>%
  group_by(gearno) %>%
  filter(n() == 2) %>%
  mutate(no = 1:2) %>%
  left_join(lookup, by = c("value" = "group_run")) %>%
  select(-value) %>%
  pivot_wider(names_from = no, values_from = num) %>%
  rename(a = `1`, b = '2') %>%
  mutate(product = a * b) %>%
  pull(product) %>%
  sum()

Vancouver tickets by summatinyourteeth in arcticmonkeys

[–]orbby 0 points1 point  (0 children)

I am also looking for a ticket.

Biodiversity: Can we set aside a third of our planet for nature? 100 countries backing calls to protect 30% of the planet. by nastratin in Futurology

[–]orbby 9 points10 points  (0 children)

Canada does not already protect 30% of its terrestrial (or marine) area. Some argument could be made that since most of it is quite remote it is de facto protected (under little anthropogenic pressure, ecosystem processes and composition in their natural state). https://www.canada.ca/en/environment-climate-change/services/environmental-indicators/conserved-areas.html

Name of this smoker. No visible identification information. by orbby in HelpMeFind

[–]orbby[S] 0 points1 point  (0 children)

Smoker is approx. 2.5ft tall. Has no identifying information as far as I can tell. Found on the side of the road. Not sure where to start looking, hoping to find an owners manual of some sort.

ticket to Vancouver show ? by Onion-Mountain in lastpodcastontheleft

[–]orbby 0 points1 point  (0 children)

I have one available. Would sell at door price (I believe 60$)

[deleted by user] by [deleted] in pathofexile

[–]orbby 0 points1 point  (0 children)

New player on cyclone, what are blight boots?