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 datetime import datetime, time, timedelta, timezone | |
import json | |
import operator | |
import sys | |
try: | |
parse = datetime.fromisoformat |
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
# compile: gcc -o beep.o -c beep.s ; ld -o beep beep.o | |
# run: sudo ./beep, non-root userspace code is not allowed to use port IO | |
.global _start | |
.text | |
_start: | |
# ioperm(0x42, 32, 1) | |
mov $173, %rax # ioperm() == 173 in x86_64 | |
mov $0x42, %rdi # from port 0x42 |
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
from __future__ import print_function | |
from persistent import Persistent | |
from threading import current_thread, Event, local, Lock, Thread | |
import sys | |
import transaction | |
from ZODB import DB | |
from ZODB.DemoStorage import DemoStorage | |
from ZODB.POSException import ConflictError |