More generally speaking, since regular expressions effectively define a parse tree on their matches, being able to perform more general transformations of those trees would be useful.
":'(':(\\')|[^"'])*":'What would help is if engaged community members can collaboratively list events that event organisers have posted elsewhere, so that community members can find all the community's events in one place (here) even if the event organisers don't bother to post them here themselves. This raises a few auth complications, e.g. if the event organiser wants to post their event ideally they'd be able to take ownership of the placeholder event uploaded by the community member. But if you can solve those, seeing all their events in one place might be a compelling reason for communities to organically switch over to your platform (at which point event organisers might well also follow).
That doesn't work on a phone. I hoped they added an event handler for touching the animations. Instead they forgot they have a mobile OS and that they sell phones.
The scope problems are more fundamental:
The pdb REPL calls[1] the exec builtin as `exec(code, frame.f_globals, frame.f_locals)`, which https://docs.python.org/3/library/functions.html#exec documents as:
"If exec gets two separate objects as globals and locals, the code will be executed as if it were embedded in a class definition."
And https://docs.python.org/3/reference/executionmodel.html#reso... documents that:
"The scope of names defined in a class block is limited to the class block; it does not extend to the code blocks of methods - this includes comprehensions and generator expressions since they are implemented using a function scope."
This is a fundamental limitation of `exec`. You can workaround it by only passing a single namespace dictionary to exec instead of passing separate globals and locals, which is what pdb's interact command does[2], but then it's ambiguous how to map changes to that dictionary back to the separate globals and locals dictionaries (pdb's interact command just discards any changes you make to the namespace). This too could be solved, but requires either brittle ast parsing or probably a PEP to add new functionality to exec. I'll file a bug against Python soon.
[1]: https://github.com/python/cpython/blob/25a64fd28aaaaf2d21fae...
[2]: https://github.com/python/cpython/blob/25a64fd28aaaaf2d21fae...
Multiline statements are not accepted, nor things like if/for
Even list comprehensions and lambda expressions have trouble loading local variables defined via the REPL
Are there workarounds? It would reduce the need for using IDEs. People who have experience with Julia and Matlab are very used to a trial and error programming style in a console and bare python does not address this need
The scope problems are more fundamental:
The pdb REPL calls[1] the exec builtin as `exec(code, frame.f_globals, frame.f_locals)`, which https://docs.python.org/3/library/functions.html#exec documents as:
"If exec gets two separate objects as globals and locals, the code will be executed as if it were embedded in a class definition."
And https://docs.python.org/3/reference/executionmodel.html#reso... documents that:
"The scope of names defined in a class block is limited to the class block; it does not extend to the code blocks of methods - this includes comprehensions and generator expressions since they are implemented using a function scope."
This is a fundamental limitation of `exec`. You can workaround it by only passing a single namespace dictionary to exec instead of passing separate globals and locals, which is what pdb's interact command does[2], but then it's ambiguous how to map changes to that dictionary back to the separate globals and locals dictionaries (pdb's interact command just discards any changes you make to the namespace). This too could be solved, but requires either brittle ast parsing or probably a PEP to add new functionality to exec. I'll file a bug against Python soon.
[1]: https://github.com/python/cpython/blob/25a64fd28aaaaf2d21fae...
[2]: https://github.com/python/cpython/blob/25a64fd28aaaaf2d21fae...
Bacon-Wrapped Mozzarella Sticks
Ingredients:
- 12 slices of bacon
- 12 mozzarella sticks
- 1/2 cup all-purpose flour
- 2 eggs, beaten
- 1 cup breadcrumbs
- 1/2 teaspoon garlic powder
- 1/2 teaspoon paprika
- Vegetable oil, for frying
- Marinara sauce, for serving
Instructions:Preheat your oven to 400°F (200°C). Line a baking sheet with parchment paper.
Wrap each mozzarella stick with a slice of bacon, starting from one end and wrapping it tightly. Place the bacon-wrapped mozzarella sticks on the prepared baking sheet.
Bake the bacon-wrapped mozzarella sticks in the preheated oven for about 12-15 minutes, or until the bacon is crispy and the cheese is melted. Remove from the oven and set aside.
In three separate shallow bowls, set up a breading station. Place flour in the first bowl, beaten eggs in the second bowl, and breadcrumbs mixed with garlic powder and paprika in the third bowl.
Heat vegetable oil in a deep skillet or pot over medium heat until it reaches 350°F (180°C).
Take each bacon-wrapped mozzarella stick and dredge it in flour, then dip it into the beaten eggs, and finally coat it with the breadcrumb mixture, pressing gently to adhere. Repeat this process for each mozzarella stick.
Carefully place the coated mozzarella sticks into the hot oil, a few at a time, and fry for about 2-3 minutes, or until golden brown and crispy. Use a slotted spoon to transfer the fried mozzarella sticks to a paper towel-lined plate to drain excess oil.
Serve the bacon-wrapped mozzarella sticks warm with marinara sauce for dipping. Enjoy!
These bacon-wrapped mozzarella sticks make for a delicious appetizer or snack that combines the gooeyness of melted mozzarella with the savory crunch of bacon.
Looking forward to the Stable Diffusion based Illustration.
Quasi-Monte Carlo has a rate of convergence close to O(1/N), whereas the rate for the Monte Carlo method is O(N^(−0.5))
For such applications it's best to use quasi-random numbers (a.k.a. low-discrepancy sequences) such as the Halton sequence or the Sobol sequence instead of pseudorandom numbers.
https://einops.rocks/pytorch-examples.html shows how it can be used to implement various neural network architectures in a more simplified manor.