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
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: |
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
states = [ | |
'Normal', | |
'Inbound', | |
'Unlocked', | |
] | |
transitions = [ | |
('Normal', 'Inbound', 'B_enter & correct'), | |
('Inbound', 'Unlocked', 'timeout'), | |
('Unlocked', 'Normal', 'B_arrived'), |
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
import math | |
import pickle | |
import random | |
import tqdm | |
known_adjacent = set() | |
known_non_adjacent = set() | |
try: | |
with open('/tmp/adjacencies.pkl', 'rb') as f: |
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
""" | |
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 |
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
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; |
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
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 |
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
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): |
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 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',) |
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
awk: cmd. line:1: equine.awk | |
awk: cmd. line:1: ^ syntax error |
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
String found where operator expected at equine.pl line 1, near "near "near "" | |
(Do you need to predeclare near?) | |
Bareword found where operator expected at equine.pl line 1, near ""near "near" | |
(Missing operator before near?) | |
String found where operator expected at equine.pl line 1, near "near """ | |
(Do you need to predeclare near?) | |
Use of ?PATTERN? without explicit operator is deprecated at equine.pl line 2. | |
Semicolon seems to be missing at equine.pl line 4. | |
String found where operator expected at equine.pl line 5, near "near "near "" | |
(Do you need to predeclare near?) |
NewerOlder