Skip to content

Instantly share code, notes, and snippets.

@luka-mikec
luka-mikec / task10.py
Created December 16, 2025 22:23
AoC 2025, Task 10
from functools import cmp_to_key
from typing import Optional
# `inp` should be set to actual task input (a multiline string)
lines = [line.split(" ") for line in inp.split("\n")]
test_cases = []
for line in lines:
test_cases.append({
"goal": [let == "#" for let in line[0][1:-1]],
"buttons": [[int(val) for val in prnt[1:-1].split(",")] for prnt in line[1:-1]],
@luka-mikec
luka-mikec / vue3_spreadsheet.vue
Last active February 12, 2022 09:18
Vue 3 blog post code (spreadsheet example)
<template>
<div>
<div style="margin: 1ex;">Calculations: {{ calculations }}</div>
<table class="table" border="0">
<tr class="row">
<td id="empty_first_cell"></td>
<td class="column"
v-for="(_, j) in cols" :key="'header' + j"
>