The common python pattern
def foo():
tmp = []
class Turtle: | |
directions = [( 0, 1), | |
(-1, 0), | |
( 0, -1), | |
( 1, 0)] | |
def __init__(self, x=0, y=0, d=0, boundary=lambda x, y: True): | |
self.x = x | |
self.y = y | |
self.d = d |
CFLAGS += -Ofast | |
.PHONY: default | |
default: refactor | |
.PHONY: refactor | |
refactor: out.pbm | |
sha256sum $< | diff -q goal.sum - | |
refactor-set: out.pbm |
.PHONY: test | |
test: seppuku | |
./seppuku < example.txt | |
seppuku: seppuku.c | |
gcc -std=c99 -o $@ $< |
import re | |
from lexer import lex, LexError | |
def readlines_iter(f): | |
while (line := f.readline()): | |
yield line[:-1] | |
def main(lines): | |
tok_patterns = {} |
#!/bin/sh | |
git ls-tree -r --name-only ${1:-master} |
posts | |
threads | |
www |
CC = gcc | |
CFLAGS = -fopenmp -lm -std=c99 -pedantic -Wall | |
TARGETS = abstract.ff | |
.PHONY: default | |
default: $(TARGETS) $(TARGETS:.ff=.png) | |
%.png: %.ff | |
ff2png < $< > $@ |
from collections import namedtuple | |
from enum import Enum | |
import random | |
compose = lambda f: lambda g: lambda *a, **k: f(g(*a, **k)) | |
class Face(Enum): | |
ACE = 'A' | |
TWO = '2' |
I often want to do something that I believe is non-trivial in ffmpeg, only to discover that it is actually very simple, if only I had known how to do it. I even end up writing wrappers to do simple things, because I keep forgetting what to do. However, this file is my new solution: simply write my own documentation for things I would occasionally like to do.