예제 #1
0
파일: day06_test.py 프로젝트: dstine/aoc
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
예제 #2
0
파일: day08_test.py 프로젝트: dstine/aoc
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]
예제 #3
0
파일: day02_test.py 프로젝트: dstine/aoc
def get_my_input():
    path = test_utils.get_path('day02_input.txt')
    with open(path) as file:
        return [line.rstrip() for line in file]
예제 #4
0
파일: day10_test.py 프로젝트: dstine/aoc
def get_example_result():
    path = test_utils.get_path('day10_example_result.txt')
    return get_result(path)
예제 #5
0
파일: day10_test.py 프로젝트: dstine/aoc
def get_my_result():
    path = test_utils.get_path('day10_result.txt')
    return get_result(path)
예제 #6
0
파일: day10_test.py 프로젝트: dstine/aoc
def get_example_input():
    path = test_utils.get_path('day10_example.txt')
    return get_input(path)
예제 #7
0
파일: day10_test.py 프로젝트: dstine/aoc
def get_my_input():
    path = test_utils.get_path('day10_input.txt')
    return get_input(path)
예제 #8
0
파일: day04_test.py 프로젝트: dstine/aoc
def get_input(filename):
    path = test_utils.get_path(filename)
    with open(path) as file:
        return [line.rstrip() for line in file]
예제 #9
0
def get_my_input_reacted():
    path = test_utils.get_path('day05_input_reacted.txt')
    return get_one_liner(path)