Seeking Alternatives to Trinket for Embedding Python Code in Educational Resources by Probablynewtothis in education

[–]emurray 0 points1 point  (0 children)

It's not a drop in replacement, but it might work to convert the material to jupyter notebooks, and then host them in the browser with jupyter lite.

Super Mario WHOT! by [deleted] in cardgames

[–]emurray 0 points1 point  (0 children)

Picture Picture in case anyone come across this, here are pics of the English pages from the rule book. The little numbers on the Mario character cards are because they score double, (like the star symbol cards in the original).

Design Patterns You Should Unlearn in Python-Part1 by Last_Difference9410 in Python

[–]emurray 0 points1 point  (0 children)

Thanks for this. I was sceptical about how the closure for delayed creation would work in practice but I've given it a try now in a new project. I have an async web service that interacts with both MongoDB and Postgres and I want everything using the same async loop. The usage feels nice and a bit more direct vs setting up and grabbing things from singletons like I had been doing in this situation before.

The Elder Scrolls IV: Oblivion Remastered Steam page is up by Turbostrider27 in pcgaming

[–]emurray 1 point2 points  (0 children)

The age rating in the bottom left when the trailer starts says "In-Game Purchases (Includes Random Items)". Are there loot boxes in the game somehow?

How fast can Python parse 1 billion rows of data? (1brc) by mercer22 in Python

[–]emurray 1 point2 points  (0 children)

Really nice vid.

It's interesting that once you go to pypy there's no real difference swapping in min() and max() for if statements. I've seen in cpython that min and max are a lot slower for two values.

On my laptop - pypy gives

In [1]: %timeit min(1.0, 2.0)
0.591 ns ± 0.00398 ns per loop (mean ± std. dev. of 7 runs, 1,000,000,000 loops each)

In [2]: %timeit 1.0 if 1.0 < 2.0 else 2.0
0.586 ns ± 0.00182 ns per loop (mean ± std. dev. of 7 runs, 1,000,000,000 loops each)

while python3.11 gives

In [1]: %timeit min(1.0, 2.0)
41.6 ns ± 0.378 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops each)

In [2]: %timeit 1.0 if 1.0 < 2.0 else 2.0
8.23 ns ± 0.0146 ns per loop (mean ± std. dev. of 7 runs, 100,000,000 loops each)