-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstandalone_template.py
43 lines (37 loc) · 1.21 KB
/
standalone_template.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
DAY = '../full'
#DAY = '../mini'
# pylint: disable=unused-import,wrong-import-position,multiple-imports,line-too-long
import functools as ft, itertools as it, operator as op
import heapq, math, re, sys
#import igraph as ig, networkx as nx, numpy as np, z3
from collections import Counter, defaultdict, deque
from api import Cube, CubeSet, file, graph, io, parse, P, PSet, PDict, RDict, RSet, search, xmath, z3result
N, S, W, E = NSWE = P.NSWE()
NW = N + W
NE = N + E
SW = S + W
SE = S + E
O = P.O()
########### HERE ##############
def line_parse(line: str):
#return [int(e) for e in re.findall(r'\d', line)]
#return [e for e in re.findall(r'\w+', line)]
return line
result = 0
#inp = file.readall(DAY)
#segs = file.segments(DAY, line_parse)
lines = file.lines(DAY, line_parse)
#lines = file.lines(DAY, parse.uints)
#lines = file.lines(DAY, parse.ints)
#g = PDict.from_lines(lines)
#numbers = file.lines(DAY, int)
#for lines in segs:
#for n in nums:
#for i, l in enumerate(lines):
#result += 1
io.print_clip(result)
#sys.exit()
#line = '24-71 J: James\n0-2 B: Brat'
#tuple_matches = re.findall(r'(\d+)-(\d+) (\w): (\w+)', line):
#for match in re.finditer(r'(\d+)-(\d+) (\w): (\w+)', line):
# lo, hi, ch, word = match.groups()