Camillo
Joined 14 years ago
Joined 14 years ago
> - There aren't good boundaries between Jupyter's own Python environment, and that of your notebooks— if you have a dependency which conflicts with one of Jupyter's dependencies, then good luck.
The best Jupyter UX for me now is VSCode. Just put an .ipynb file in your workspace and you get the notebook interface inside VSCode. Put `%load_ext autoreload` and `%autoreload 2` in the first cell, and use the same python environment you're using in your workspace for the Jupyter kernel. Then you can import libraries from your project, use them, and it's very easy to promote code from the notebook into a library. You can just cut a function from the notebook, paste it into a library, add an import, and rerun the subsequent cells to verify it still works as expected.
1. You're using a slow algorithm. This is almost certainly the case, looking at how slowly it run and at the order in which pixels get painted. The Wikipedia page on flood fill is enough to find a good algorithm.
2. Possibly, the overhead of individual canvas operations is high, so setting each pixel at once is slow. If this is the case, it would be partially ameliorated by using a span-based algorithm, but you could also run the algorithm on an offscreen byte array and then blit the result to canvas.
I would bet money that a 90s state-of-the-art algorithm running in JavaScript on an offscreen array will be perceived as instantaneous on a modern computer.
The alternative would have been to run the new east span south of the old one, instead of north. Apparently San Francisco preferred that option, but Oakland wanted the north alignment. I'm not sure why, all I've seen mentioned so far is that they chose that particular alignment to ensure drivers would get a good view of San Francisco while driving west...
I think there's also a cost-benefit evaluation when it comes to deciding where to make use of those laws. I've heard that there are tenant screening services that will report whether you have previously sued a landlord. Is it even worth it to sue if it's going to make it more difficult to find a better place later?
Now, if you wrote absl::string_view foo2 = etc., you'd have a dangling view for sure. In practical industrial usage, you'd build with an address sanitizer (it's built into clang: -fsanitize=address), which should catch that issue.
Let's say you finally manage to impound his car. Now there's an article about how people's lives are being ruined because of fines and mere misdemeanors. We're back to square one.