Skip to content

Instantly share code, notes, and snippets.

View prophile's full-sized avatar

Alistair Lynn prophile

View GitHub Profile
@prophile
prophile / dependabot-auto-merge.yaml
Created April 21, 2026 10:35
GitHub Actions workflow which automatically merges dependabot PRs
name: Dependabot auto-merge
on: pull_request
permissions:
contents: write
pull-requests: write
jobs:
dependabot:
Dutch lights on sticks
Flashing aspects indicated by *
R: Red
Y: Yellow
G: Green
Main signals may or may not be fitted with a number display.
Main signals without numbers:
# /// script
# dependencies = [
# "z3-solver",
# "tqdm",
# "pyeda",
# "sympy",
# ]
# ///
states = [
import math
import pickle
import random
import tqdm
known_adjacent = set()
known_non_adjacent = set()
try:
with open('/tmp/adjacencies.pkl', 'rb') as f:
"""
RLE extractor for EV Nova resource files.
Usage information available through python3 parserle.py --help
Requires both `pillow` and `rsrcfork` from PyPI. Alas this is unlikely to
work on non-Darwin platforms.
"""
import os.path
function drive() {
var getSquare = function(i, j) {
return $('#' + i + '_' + j);
}
// detect extents
var W, H;
for (var i = 1; i <= 100; ++i) {
if (getSquare(i, 1).length == 0) {
W = i - 2;
break;
try:
from collections.abc import Iterable
except ImportError:
from collections import Iterable
import heapq
class AStar(Iterable):
def __init__(self, transition, heuristic, start, zero_score=0, pure_heuristic=False):
self.transition = transition
self.heuristic = heuristic
class TraceIO(object):
def __init__(self, stream, log=print):
self.stream = stream
self.log = log
def __enter__(self):
return self.stream.__enter__()
def __exit__(self, *args):
@prophile
prophile / scheme.py
Last active August 29, 2015 14:19
A quick Scheme implementation in Python, as a programming exercise
from functools import wraps
from collections import namedtuple
from collections.abc import MutableMapping
import string
import operator
import sys
import numbers
class Parser(object):
__slots__ = ('parse',)
@prophile
prophile / equine.awk
Created March 5, 2015 20:47
Quine in Awk
awk: cmd. line:1: equine.awk
awk: cmd. line:1: ^ syntax error