-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit
More file actions
50 lines (36 loc) · 928 Bytes
/
init
File metadata and controls
50 lines (36 loc) · 928 Bytes
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
44
45
46
47
48
49
50
#!/bin/bash
filename=src/$(date +%y_%m_%d).py
if [ -f $filename ]; then
echo "File $filename already exists"
exit 1
fi
cat >$filename <<'EOF'
import os
import tempfile
from basic import Generator, Solution
import unittest
import cyaron
import argparse
class SingleInputCase(Solution):
def __init__(self):
super().__init__("SingleInputCase")
def read_input(self, input: str):
pass
def solve(self) -> str:
pass
class SampleTest(unittest.TestCase):
def test(self):
pass
class ProblemGenerator(Generator):
def generate_data(self, solution: Solution):
pass
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--test", action="store_true")
parser.add_argument("--generate", action="store_true")
args = parser.parse_args()
if args.test:
unittest.main()
elif args.generate:
pass
EOF