Skip to content

Instantly share code, notes, and snippets.

View olliemath's full-sized avatar
🐍

Oliver Margetts olliemath

🐍
  • Suade Labs
  • London
View GitHub Profile
@olliemath
olliemath / race.py
Created October 25, 2021 14:14
Race condition
# The following almost immediately raises an assertion error under nogil
# Under cpython it completes all 1000 iterations no problem
from threading import Thread
import time
positions = []
def race(n):
@olliemath
olliemath / .flake8
Created October 18, 2021 15:12
rpython flake8 config
[flake8]
select =
# pycodestyle
E, W
# pyflakes
# F
ignore =
E501 # line length
E502 # redundant backslashes
E111, E114, E115, E116, E117, E121, E122, E124, E125, E126, E127, E128, E129, E131 # indents
@olliemath
olliemath / input.txt
Created December 8, 2020 15:02
Day 08 - benchmark file
nop +0
nop +79
jmp +41
acc +6307
acc +9565
acc +14967
jmp +9530
nop +12397
jmp +6843
jmp +7400