# usage:
# otool -tv program | python3 | dot -Tsvg -o program.svg; open program.svg
# (objdump will need a slightly different parser)
import sys
def split(items, before=None, after=None):
result = []
for item in items:
if before and before(item):
set -ex
ffmpeg -y -i "$1" -f u8 -ac 1 all-star.pcm
size=`wc -c all-star.pcm | tr -s ' ' | cut -d' ' -f2`
size=`python3 -c "M = $size//3; N=int(M**0.5); print(f'{N}x{M//N}')"`
convert -size "$size" -depth 8 rgb:all-star.pcm -quality 0% "$2"
View 01-tasks
// this is the embedded DSL
tasks! {
heap h;
task {
loop {
wait for AbsDiff(1, 2);
[3] = h[&1] - h[&2];
if (h[&3] > 0) {
View codl-pep.rst

PEP: 9999 Title: Add Lab to colorsys Author: C Jones <>


Status: Draft Type: Standards Track Content-Type: text/x-rst Created: 28-Nov-2017 Python-Version: 3.7 Post-History: 30-Aug-2002

from collections import defaultdict
class Table:
def __init__(self):
self.items = []
self.indices = {}
def _get_key(item, key):
View bytecode
def fib(n):
a, b = 0, 1
for _ in range(n):
a, b = b, a + b
return a
Then, using dis.dis(fib)
CPython bytecode:
2 0 LOAD_CONST 3 ((0, 1))
import itertools
import time
COUNTS_SUMMING = {0: [[]]}
def counts_summing(n):
if n not in COUNTS_SUMMING:
sums = []
for first in range(1, n+1):
for rest in counts_summing(n - first):
sums.append([first] + rest)
View kanye-anime.csv
User Kanye Anime Comment
SufjanStevens Late Registration good
joaquin 808s bad
pedroteixeira MBDTF good
Tahloolah MBDTF good
ligeti MBDTF N/A Q2) My Beautiful Dark Twisted Fantasy
Ziven001 Yeezus good
CrimeFuck College Dropout good
shaded_fox Late Registration good
Cian 808s good
View philosophers.c
/* Compile as gcc philosophers.c -pthread */
#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
pthread_mutex_t fork_ = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t knife = PTHREAD_MUTEX_INITIALIZER;
void *socrates(void *nothing) {
View driverstation.html
<meta charset="utf8"/>
<title>Driver Station</title>
<img src="" width="480" height="360" class="flip"/>
<img src="" width="480" height="360" class="flip"/>
<style>.flip { transform: rotate(180deg); }</style>