@piRSquared I know we have discussed the inherent challenge with canonicals, but I still want to keep writing more. This time, I am thinking of writing a post on MultiIndex operations (such as addition, deletion, slicing, and reindexing). I think I've learned from past mistakes, so I'm going to CW if I decide to write one.
the hats that you get for outscoring accepted answers, or getting votes on negatively scored answers... I don't see that happening in the tags I contribute to, but people seem to have done it anyway
The first thing I'd do is to switch to Python 3 right now, if it fixes your error, uninstall Python 2.7. If it doesn't, uninstall Python 2.7 anyway... — Antti Haapala9 secs ago
I fixed that issue. I shifted x's by the min in order to render better. I shouldn't have done that for y's. It only affected the image. Still looking )-:
I'll look at the stream
/facepalm To prevent counting forever, ignore tiles with a y coordinate smaller than the smallest y coordinate in your scan data or larger than the largest one.
Hi, how do you append to a json object? i.e. I need a list and in that list I will have a bunch of {} objects. so far I end up with [{}][{}]... And that breaks a json file
Hey, I have a flask project using sqlalchemy with max concurrency = 400 using sqlalchemy sessionmaker. I want to keep a global variable for app state and I don't want to do what I usually do for it (read from redis etc).
Is there an idiomatic way to do this with sqlalchemy? I currently do this with a global variable which doesn't work (obviously) since I want to be able to deploy multiple instances
since the tap was at 0, and the test case had an otherwise useless block on row 1, it would seem he put it in for no other reason than to trap people who speed-read the problem statement! :(
One of my favorite professors offered up extra credit every week for finding the closed form solution to our weekly modeling assignment. Problem was that some of them didn't have closed form solutions and he didn't tell us which ones did or did not. He was happy to let us spin our wheels. I loved it.
@wim
You are being rate-limited.
Sleeping 3.993379592895508 seconds...
Done.
I also cycled through actual browser page refreshes... maybe. I've got data either way. If I figure anything out for certain that wasn't me being a doofus, I'll say so
When I originally made the app (2016), Eric (the AoC author/maintainer) asked me to rate limit the requests. This was to prevent people calling get_data in a loop shortly before midnight.
It was unambiguous, sure, but unexpected and unreasonable. Since the justification for the restriction was "To prevent counting forever" you would not expect to have to exclude a handful of tiles from the top.
Silver linings, i found a bug where i added water sources on top of each other an would end up with thousands of identical flows at the bottom. That will have to console me about the wasted time
"To prevent counting forever, ignore tiles with a y coordinate smaller than the smallest y coordinate in your scan data or larger than the largest one. Any x coordinate is valid."
@AndrasDeak OK I understand the issue now - since you only have a 2D slice for the data you have to make an assumption about what the clay looks like just outside of your 2D slice
don't really see how that could lose half an hour (or more) though? there's only one reasonable assumption possible to use (empty squares)
I consider it mental brute force. Throwing numpy at something defined on a grid is my knee-jerk reaction, and leads to the least cogntive effort for me.
Hi. I'd like to know, when you fiddle with data in jupyter and get the desired result/algorithm, do you still use python to assemble a pipeline, or do you rewrite the stuff in a more enterprise like language?
I typed in 7 witty responses and deleted them all. Just wanted to let you know how smart I am. Not because I had witty responses but because I deleted them.