-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinput_node_ar.py
More file actions
35 lines (32 loc) · 1.01 KB
/
input_node_ar.py
File metadata and controls
35 lines (32 loc) · 1.01 KB
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
import os
import json
from objects import ApplicativeResult, NodeResult
INPUT_FOLDER = "inputs"
NODE1_AR_PROGRAM_INPUT_FILE = "node1_ar.input.json"
NODE2_AR_PROGRAM_INPUT_FILE = "node2_ar.input.json"
with open(os.path.join(INPUT_FOLDER, NODE1_AR_PROGRAM_INPUT_FILE), "w") as f:
f.write(
json.dumps(
ApplicativeResult.Schema().dump(
ApplicativeResult(
path_hash=0,
node_result=NodeResult(
a_start=1, b_start=1, n=10, a_end=89, b_end=144
),
)
)
)
)
with open(os.path.join(INPUT_FOLDER, NODE2_AR_PROGRAM_INPUT_FILE), "w") as f:
f.write(
json.dumps(
ApplicativeResult.Schema().dump(
ApplicativeResult(
path_hash=0,
node_result=NodeResult(
a_start=89, b_start=144, n=10, a_end=10946, b_end=17711
),
)
)
)
)