Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add advent of code 2020 files #98

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chrisdoc
Copy link

This PR adds advent of code 2020 files based on my users sessions to the repository to fix a FileNotFoundError when running the advent of code 2020 notebook https://github.com/norvig/pytudes/blob/master/ipynb/Advent-2020.ipynb

FileNotFoundError                         Traceback (most recent call last)
<ipython-input-4-f1ec783705fc> in <module>
----> 1 in1: Set[int] = set(data(1, int))

<ipython-input-2-8ad9be6051d4> in data(day, parser, sep)
      1 def data(day: int, parser=str, sep='\n') -> list:
      2     "Split the day's input file into sections separated by `sep`, and apply `parser` to each."
----> 3     with open(f'data/advent2020/input{day}.txt') as f:
      4         sections = f.read().rstrip().split(sep)
      5         return list(map(parser, sections))

FileNotFoundError: [Errno 2] No such file or directory: 'data/advent2020/input1.txt'

Copy link

@Adam-Katz Adam-Katz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

input1.txt is not equal to the data provided by AoC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants