Day 5
Ah - a slightly easier one, but still harder than it may seem at first!
I choked a bit for part 1 (I woke up late!) and by the time I waited my [many] timeouts, I was a lot of points down. On the plus side, these [many] timeouts let me guess part 2 and put together snippets of code that may be useful (namely, the w/q direction chunk).
Part 1 wasn't too hard - I just kept a dictionary of the number of times each co-ordinate was visited and figured out the direction of travel each time. Just some speedy logic here would have helped because there are a few minor things to consider such as line direction! An arguably faster solution to find out the direction of travel would have been to use a for loop and iterate through that instead of a while loop.
for r in range(min(a,aa),max(a,aa)+1):
for rr in range(min(b,bb),max(b,bb)+1):
y[(r,rr)]+=1
Part 2 was a matter of shifting some code around for me, deleting the line with a comment after it (this code checks to see if the line is not diagonal).
Now, I remember Day 7 from last year (a Monday) was a bit of a pain...
PS: my site is now dark mode cos looking at a bright white monitor at 6 hurts my eyes :)