My Advent of Code solutions in Python. kevinyap.ca/2019/12/going-fast-in-advent-of-code/
advent-of-code python
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove year from runner output

+2 -3
+2 -3
advent.py
··· 44 44 45 45 46 46 def check_solution(program, day, input_file, output_file): 47 - with Halo(text='2017 Day {:02}'.format(day)): 47 + with Halo(text='Day {:02}'.format(day)): 48 48 cmd = ['python', program, input_file] 49 49 start = clock() 50 50 proc = subprocess.Popen(cmd, stdout=subprocess.PIPE) ··· 81 81 82 82 if os.path.exists(output_file): 83 83 valid, stdout, cpu_usr = check_solution(program, day, input_file, output_file) 84 - print '{}{}{} {} Day {:02} ({})'.format( 84 + print '{}{}{} Day {:02} ({})'.format( 85 85 bcolors.OKGREEN if valid else bcolors.FAIL, 86 86 '✓' if valid else '✗', 87 87 bcolors.ENDC, 88 - year, 89 88 day, 90 89 format_time(cpu_usr), 91 90 )