File tree 2 files changed +22
-5
lines changed
2 files changed +22
-5
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
+
2
3
days=($( ls " src/" ) )
3
4
let last=0
4
5
for i in " ${days[@]} "
9
10
fi
10
11
done
11
12
12
- echo " The last day was $last "
13
-
14
13
next_day=$(( last + 1 ))
15
- echo " Create files for the day $next_day "
16
14
17
- echo > " src/day$next_day .py"
18
- echo > " input/day$next_day .txt"
15
+ echo " - create src/day$next_day .py"
16
+ sed " s/{placeholder}/day$next_day .txt/g" " template.txt" > " src/day$next_day .py"
17
+
18
+ echo " - create input/day$next_day .txt"
19
+ touch " input/day$next_day .txt"
Original file line number Diff line number Diff line change
1
+ import time
2
+
3
+ def part_1():
4
+ pass
5
+
6
+ def part_2():
7
+ pass
8
+
9
+ with open("../input/{placeholder}") as istream:
10
+ for line in istream:
11
+ pass
12
+
13
+ begin = time.time()
14
+ print('Part_1: {}, takes {}s'.format(part_1(), time.time() - begin))
15
+ begin = time.time()
16
+ print('Part_2: {}, takes {}s'.format(part_2(), time.time() - begin))
You can’t perform that action at this time.
0 commit comments