python

Back Open Paginator
09.12.2025 14:15
pythonrennes (@pythonrennes@social.breizhcamp.org)

la bibliothèque #diskcache est intéressante pour plusieurs raisons (github.com/grantjenks/python-d) :
- écrite en pur #Python
- persistance du cache sur disque avec #SQLite
- fonctionnalités avancées, comme locking (cf. grantjenks.com/docs/diskcache/)

Et bien d'autres choses.




Show Original Post


09.12.2025 14:12
pythonrennes (@pythonrennes@social.breizhcamp.org)

🥁🐼 la version 3.0 de #pandas arrive bientôt
Découvrez les nouvelles fonctionnalités et les améliorations qui arrivent dans cette nouvelle édition de la bibliothèque de #dataframe #python : pandas.pydata.org/docs/dev/wha
- type string dédié (ça n'est plus un "object")
- copy-on-write : l'échantillonnage d'un dataframe crée désormais une copie et préserve l'original
- utilisation plus généralisée de la syntaxe pd.col pour faire de l'algèbre de colonnes




Show Original Post


09.12.2025 14:08
objects (@objects@genserver.social)
News includes cutting-edge type system research from @josevalim , @elixirphoenix LiveView v1.1.18 with view transition support, LiveDebugger’s biggest release, Nx #Python-Elixir integration, and more! #ElixirLang @elixirlang https://www.youtube.com/watch?v=IDvGr73TofA


Show Original Post


09.12.2025 14:02
PythonPeak (@PythonPeak@mastodon.social)

Calculate Average via 3 Methods

Calculate Average via 3 Methods This content explores interesting aspects of this topic. The information provided offers valuable insights and perspectives. Understanding this reveals how everyday things are more thoughtful than they appear. Next time you'll notice this detail. This fascinating detail shows how much thought goes into things we take for granted.

...

youtube.com/watch?v=uGqTL__K-sg




Show Original Post


09.12.2025 14:01
post (@post@programming.dev)

Go proposal: Secret mode

programming.dev/post/42082205




Show Original Post


09.12.2025 13:43
neutrinoceros (@neutrinoceros@ieji.de)

Proof-reading myself, I'm also seeing the influence of @itamarst's #SoftwareClown newsletter on my prose.

If you enjoyed this story, go check it out ! That stuff is solid gold.
#typechecking #python #typedPython #softwaredevelopment #testing




Show Original Post


09.12.2025 13:38
neutrinoceros (@neutrinoceros@ieji.de)

These days I'm working on some high level function one of my researcher friends wrote. As per tradition, the function has a gazillion parameters and does way too much to be thoroughly tested within a reasonable amount of time. This worked somewhat correctly but was basically impossible to change; anytime we tried to add functionality we'd create 5 new bugs and spent days figuring them out. Clearly something had to be done.

So I *did* add decent test coverage for the naive (monolithic) implementation and got myself ...
(checks notes)
... 120k (!!!) test cases, that take a full minute to run on the my development powerhouse, and don't actually check much beyond output types (which a is the job of a type checker).

Then I broke it apart, and added tests for all well-isolated chunks of code as I went.
I now have 202 test cases, covering the *entire* parameter space of the function, *including* any (previously uncovered) predictable failure modes, checking for nice and informative error messages.

The new test suite runs in 300ms (that's a 200x gain, a game changer).
As a bonus, type checking has become actually *useful* in about 99% of the new code, whereas it was basically clueless about the monolithic implementation.

The method I followed is heavily inspired by the legendary talk "Integrated Tests Are A Scam" by J.B. Rainsberger (linked). I cannot overstate how mind changing this talk was. I highly recommend you give it a watch.
youtu.be/VDfX44fZoMc

#typechecking #python #typedPython #softwaredevelopment #testing




Show Original Post


09.12.2025 13:11
michalfita (@michalfita@mastodon.social)

@solon Conceptually primitivism of is nowhere near flexibility of .




Show Original Post


09.12.2025 12:54
papajohn (@papajohn@sfba.social)

Content warning:Advent of Code 2025 Day 9 Spoilers


These solutions are getting too long for screenshots. 😅

I started off thinking that I'd be able to re-use spatial hashing for this problem, so I bucketed all the points into a 4x4 grid and only compared the points in opposing corner buckets.

This worked for Part 1, but then in Part 2 I think you have to brute force check all the squares anyway so I threw it away. My initial solution worked, but was dreadfully slow, ~5s on my Macbook. So I've spent the last hour speeding it up, and have gotten it down to ~0.25 seconds, where I'm going to leave it.

`rect_valid` does the heavy lifting, checking that the two non-red corners are inside the polygon, and that no polygon edge cuts through the rectangle's interior (which would mean part of it is outside). Most of the optimization work was making the lookups for this faster.

#adventofcode #adventofcode2025 #python





Show Original Post


09.12.2025 12:52
ThePSF (@ThePSF@fosstodon.org)

To wrap up: again, thank YOU. Our heartfelt gratitude to everyone supporting this campaign- even your re-posts help! It means so much to all of us at the PSF. We're incredibly grateful to be in community with you and to stand together behind this message: Python is for everyone.

#PythonForEveryone #Python




Show Original Post


09.12.2025 12:52
ThePSF (@ThePSF@fosstodon.org)

Share your #Python story! If Python has impacted your life, join our year-end fundraiser by sharing your story & linking to our donation page: donate.python.org/

Every story matters—whether it simply brightens someone’s day or inspires a donation. Your story strengthens our community 💖

#PythonForEveryone




Show Original Post


09.12.2025 12:52
ThePSF (@ThePSF@fosstodon.org)

Donate to one of our incredible Fiscal Sponsorees! Your support helps keep these groups and #Python open and thriving for everyone.

Donate today 👉 linktr.ee/thepsf

#PythonForEveryone




Show Original Post


1 ...849 850 851 852 853 854 855 856 857 858 859 ...1572
UP