This file contains hidden or 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
| #!/usr/bin/python3 | |
| from __future__ import annotations | |
| import copy | |
| import string | |
| from collections.abc import Callable | |
| from enum import Enum, auto | |
| from functools import cached_property | |
| from types import MappingProxyType |
This file contains hidden or 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
| data a <-> b = Arp (a -> b) (b -> a) | |
| arp :: (a -> b) -> (b -> a) -> a <-> b | |
| arp = Arp | |
| (.>) :: (a <-> b) -> (a -> b) | |
| (.>) (Arp a _) = a | |
| (.<) :: (a <-> b) -> (b -> a) | |
| (.<) (Arp _ b) = b |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
| {"F":[[1,2,3,4,5,6],[2,1,4,3,6,5],[3,4,5,6,1,2],[4,3,6,5,2,1],[5,6,1,2,3,4],[6,5,2,1,4,3]],"G":[[1,2,3,4,5,6],[2,3,5,6,1,4],[3,6,1,2,4,5],[4,5,2,1,6,3],[5,4,6,3,2,1],[6,1,4,5,3,2]]} | |
| {"F":[[1,2,3,4,5,6],[2,1,4,3,6,5],[3,4,5,6,1,2],[4,3,6,5,2,1],[5,6,1,2,3,4],[6,5,2,1,4,3]],"G":[[1,2,3,4,5,6],[2,3,5,6,1,4],[3,6,2,1,4,5],[4,5,1,2,6,3],[5,4,6,3,2,1],[6,1,4,5,3,2]]} | |
| {"F":[[1,2,3,4,5,6],[2,1,4,3,6,5],[3,4,5,6,1,2],[4,3,6,5,2,1],[5,6,1,2,3,4],[6,5,2,1,4,3]],"G":[[1,2,3,4,5,6],[2,3,5,6,1,4],[3,6,2,5,4,1],[4,5,1,3,6,2],[5,4,6,1,2,3],[6,1,4,2,3,5]]} | |
| {"F":[[1,2,3,4,5,6],[2,1,4,3,6,5],[3,4,5,6,1,2],[4,3,6,5,2,1],[5,6,1,2,3,4],[6,5,2,1,4,3]],"G":[[1,2,3,4,5,6],[2,3,5,6,1,4],[3,6,4,5,2,1],[4,5,2,1,6,3],[5,1,6,3,4,2],[6,4,1,2,3,5]]} | |
| {"F":[[1,2,3,4,5,6],[2,1,4,3,6,5],[3,4,5,6,1,2],[4,3,6,5,2,1],[5,6,1,2,3,4],[6,5,2,1,4,3]],"G":[[1,2,3,4,5,6],[2,3,5,6,4,1],[3,5,1,2,6,4],[4,6,2,3,1,5],[5,4,6,1,2,3],[6,1,4,5,3,2]]} | |
| {"F":[[1,2,3,4,5,6],[2,1,4,3,6,5],[3,4,5,6,1,2],[4,3,6,5,2,1],[5,6,1,2,3,4],[6,5,2,1,4,3]],"G":[[1,2,3,4,5,6],[2,3 |
This file contains hidden or 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
| threads=1 | |
| task-workers=0 | |
| out-of-order-eval=false | |
| max-prefetch=0 | |
| minibatch-size=1 | |
| nncache=0 | |
| smart-pruning-factor=0 |
This file contains hidden or 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
| #include <complex.h> | |
| #include <stdbool.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <tgmath.h> | |
| #define SR 44100 | |
| #define SIMPLE_HARMONIC |
This file contains hidden or 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
| #include <stdbool.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| #define W (1080 / 2) | |
| #define H (1920 / 2) | |
| #define MAX_HEADER 128 |
This file contains hidden or 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
| #include <stdbool.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #ifdef __SIZEOF_INT128__ | |
| typedef __uint128_t block_t; | |
| #else | |
| #warning "128-bit integers not supported, using 64-bit blocks!" | |
| typedef uint64_t block_t; | |
| #endif |
This file contains hidden or 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
| #!/usr/bin/python3 | |
| from collections import defaultdict | |
| with open("input.txt", "r", encoding="utf8") as file: | |
| data = [[int(char) for char in line.strip()] for line in file.readlines()] | |
| S = 5 | |
| W, H = len(data), len(data[0]) |
This file contains hidden or 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
| #!/bin/sed -Enf | |
| # Note: this code is intended for GNU sed, other implementations of sed might have issues running it. | |
| # | |
| # Usage: | |
| # $ ./day_1.sed < ./input.txt | |
| G | |
| s/\n/;/m | |
| h |
This file contains hidden or 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
| #include <math.h> | |
| #include <stdbool.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #define W 1920 | |
| #define H 1080 | |
| const double start_x = 0.1; | |
| const double start_y = 0; |
NewerOlder