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
# use this code to turn the LED on | |
from gpiozero import LED() | |
LED(3).on() |
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
;; naming conventions: | |
;; bitstring = "01001" a string of bits | |
;; binary = (#\0 #\1 #\1) a list of chars representing bits | |
;; x-list = (x x x) a list of whatever | |
;; bit = generally just one item, like #\0 | |
(defun transpose (list-of-list) | |
"matrix transpose" | |
(apply #'mapcar #'list list-of-list)) |
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
""" | |
Pytest reloader: | |
author: Dre | |
place this file in your source directory (ie: src/confteset.py) which will auto-load by pytest. | |
when running pytests with the --pdb option, when leaving the debugger from test-failure, this plugin will re-load the | |
test and run it to see if any code changes have improved. | |
currently only reloads the test. |
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
#!/usr/bin/env python3 | |
from __future__ import annotations | |
import aocd | |
test_data = """ | |
addx 15 | |
addx -11 | |
addx 6 | |
addx -3 |
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
#!/usr/bin/env python3 | |
from __future__ import annotations | |
import dataclasses | |
from textwrap import dedent | |
from typing import Callable | |
import aocd | |
import parse |
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
#!/usr/bin/env python3 | |
from __future__ import annotations | |
import dataclasses | |
import math | |
import os | |
import time | |
from typing import Callable | |
import aocd |
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
#!/usr/bin/env python3 | |
from __future__ import annotations | |
import dataclasses | |
import math | |
import os | |
import time | |
from functools import cmp_to_key | |
from typing import Callable |
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
#!/usr/bin/env python3 | |
from __future__ import annotations | |
import dataclasses | |
import itertools | |
import math | |
import os | |
import time | |
from functools import cmp_to_key | |
from typing import Callable |
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
#!/usr/bin/env python3 | |
from __future__ import annotations | |
import dataclasses | |
import itertools | |
import math | |
import os | |
import time | |
from functools import cmp_to_key | |
from typing import Callable |