ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' WHITE_SQUARE = "█" WHITE_CIRCLE = "•" BLUE_CIRCLE = f"{bcolors.OKBLUE}{bcolors.BOLD}•{bcolors.ENDC}" RED_SMALL_SQUARE = f"{bcolors.FAIL}{bcolors.BOLD}■{bcolors.ENDC}" """ DAY 25 """ def day25_parse(data): return data def day25_1(data): # data = read_input(2020, 2401) return day25_parse(data) def day25_2(data): # data = read_input(2020, 2401) return day25_parse(data) """ MAIN FUNCTION """ if __name__ == "__main__": main(sys.argv, globals(), 2020)
i += 1 return code, mem def day8_1(data): total_code = 0 total_mem = 0 for line in data: code, mem = day8_count(line) total_code += code total_mem += mem return total_code - total_mem def day8_2(data): total_code = 0 total_mem = 0 for line in data: code, mem = day8_count_reverse(line) total_code += code total_mem += mem return total_mem - total_code """ MAIN FUNCTION """ if __name__ == "__main__": main(sys.argv, globals(), 2015)
EXPECTED_2 = None """ DAY 25 """ def day25_parse(data): return data def day25_1(data): data = day25_parse(data) return data def day25_2(data): data = day25_parse(data) return data """ MAIN FUNCTION """ if __name__ == "__main__": main( sys.argv, { f"day{DAY}_1": lambda data: day_with_validation(globals(), YEAR, DAY, EXPECTED_1, 1, data), f"day{DAY}_2": lambda data: day_with_validation(globals(), YEAR, DAY, EXPECTED_2, 2, data), }, YEAR)