Example #1
0
def get_my_input():
    path = test_utils.get_path('day06_input.txt')
    with open(path) as file:
        lines = [line.rstrip() for line in file]
    coords = [(line.split(', ')) for line in lines]
    coords = [(int(c[0]), int(c[1])) for c in coords]
    return coords
Example #2
0
def get_my_input():
    path = test_utils.get_path('day08_input.txt')
    with open(path) as file:
        # only one line in file
        for line in file:
            numbers = line.rstrip().split(' ')
    return [int(n) for n in numbers]
Example #3
0
def get_my_input():
    path = test_utils.get_path('day02_input.txt')
    with open(path) as file:
        return [line.rstrip() for line in file]
Example #4
0
def get_example_result():
    path = test_utils.get_path('day10_example_result.txt')
    return get_result(path)
Example #5
0
def get_my_result():
    path = test_utils.get_path('day10_result.txt')
    return get_result(path)
Example #6
0
def get_example_input():
    path = test_utils.get_path('day10_example.txt')
    return get_input(path)
Example #7
0
def get_my_input():
    path = test_utils.get_path('day10_input.txt')
    return get_input(path)
Example #8
0
def get_input(filename):
    path = test_utils.get_path(filename)
    with open(path) as file:
        return [line.rstrip() for line in file]
Example #9
0
def get_my_input_reacted():
    path = test_utils.get_path('day05_input_reacted.txt')
    return get_one_liner(path)