8 ms·
Lovely puzzles. Solved day 5 without resorting to regexes (which was kinda fun). Only gripe I have is that I can't use requests to get at the data.
by Beltiras 11y ago
Lovely puzzles. Solved day 5 without resorting to regexes (which was kinda fun). Only gripe I have is that I can't use requests to get at the data.
- jschulenklopper 11y ago> Only gripe I have is that I can't use requests to get at the data. The input.txt files, or the code to be used as input/starting point? I just download the file (or save the code) instead of re-downloading it over and over. (Is also handy if you're coding in the train or another place without internet connection.)
- aaronem 11y agoI'm having the same problem. Getting the session token from a request made via browser, and using that token in my programmatic requests, does work, but that feels like cheating. What I really want to do is authenticate to Advent of Code programmatically via Github, but I haven't found a way to get my code to authenticate to Github itself; I keep getting redirects to github.com/login.
- maxerickson 11y agoAnybody have a Python 3 approach to problem 4 that doesn't end up with the delightful: secret+str(n).encode() In it? That's plenty fast enough for the problem at hand, but it's somehow annoying.