python

Back Open Paginator
03.01.2026 20:21
treyhunner (@treyhunner@mastodon.social)

Python Tip #3 (of 365):

Learn about the common string formatting specifications. No need to memorize them, but learn which ones exist as it'll help you remember to look them up when you need them.

F-strings allow using a `:` to specify a format specification within their replacement fields (the `{`...`}` parts).

For example, you can format a number to show as thousands separators:

>>> amount = 3280
>>> f"{amount:,}"
'3,280'

(1/4) 🧡




Show Original Post


03.01.2026 20:20
nostarch (@nostarch@mastodon.social)

Many of the small, repetitive tasks we do on our computers every day can be automated once you understand the underlying patterns.

Automate the Boring Stuff with Python Workbook reinforces those patterns through guided practice, projects, and full solutions so you can confidently build your own scripts. Available now at major retailers.

nostarch.com/automate-workbook





Show Original Post


03.01.2026 19:53
grant_h (@grant_h@mastodon.social)

After about 4 months of sporadic work, and a good focus now in the summer holiday, I have a new pre-release of a editor for nodes and edges s, which support multi-point edges, both rectilinear and curved, as well as managing metadata on the nodes.
A blog post will follow.

github.com/ghillebrand/qtPyGra




Show Original Post


03.01.2026 19:07
NatuRandom (@NatuRandom@mastodon.social)

Oudemansiella mucida
PH Stefano Menchetti

Toscana, Italy

2016-10-01 09:03:00 UTC
inaturalist.org/observations/4

@Aleartory @PropPosters





Show Original Post


03.01.2026 18:32
habr (@habr@zhub.link)

Π‘ΠΎΠ·Π΄Π°Π΅ΠΌ свой ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π½Ρ‹ΠΉ Ρ„Ρ€Π΅ΠΉΠΌΠ²ΠΎΡ€ΠΊ автотСстирования API [Π§Π°ΡΡ‚ΡŒ 1/3]

АвтоматизированноС тСстированиС API часто начинаСтся с простых Ρ€Π΅ΡˆΠ΅Π½ΠΈΠΉ Π² Π²ΠΈΠ΄Π΅ ΠΊΠΎΠ»Π»Π΅ΠΊΡ†ΠΈΠΉ Postman ΠΈΠ»ΠΈ скриптов Π½Π° ΠΊΠΎΠ»Π΅Π½ΠΊΠ΅. Π’Π°ΠΊΠΎΠΉ ΠΏΠΎΠ΄Ρ…ΠΎΠ΄ Ρ€Π°Π±ΠΎΡ‚Π°Π΅Ρ‚ Π½Π° стартС, Π½ΠΎ быстро исчСрпываСт сСбя. Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ собствСнного ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π½ΠΎΠ³ΠΎ Ρ„Ρ€Π΅ΠΉΠΌΠ²ΠΎΡ€ΠΊΠ° являСтся осознанным ΠΏΠ΅Ρ€Π΅Ρ…ΠΎΠ΄ΠΎΠΌ ΠΎΡ‚ Ρ…Π°ΠΎΡ‚ΠΈΡ‡Π½ΠΎΠΉ, Ρ„Ρ€Π°Π³ΠΌΠ΅Π½Ρ‚Π°Ρ€Π½ΠΎΠΉ Π°Π²Ρ‚ΠΎΠΌΠ°Ρ‚ΠΈΠ·Π°Ρ†ΠΈΠΈ ΠΊ устойчивой, Π³ΠΈΠ±ΠΊΠΎΠΉ прСдсказуСмой ΠΈ ΠΌΠ°ΡΡˆΡ‚Π°Π±ΠΈΡ€ΡƒΠ΅ΠΌΠΎΠΉ систСмС тСстирования. Π’Π°ΠΊΠΎΠΉ Ρ„Ρ€Π΅ΠΉΠΌΠ²ΠΎΡ€ΠΊ Π΄Π°Π΅Ρ‚ ΠΏΠΎΠ»Π½Ρ‹ΠΉ ΠΊΠΎΠ½Ρ‚Ρ€ΠΎΠ»ΡŒ Π½Π°Π΄ Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€ΠΎΠΉ, обСспСчиваСт ΡΡ‚Ρ€ΠΎΠ³ΡƒΡŽ Π²Π°Π»ΠΈΠ΄Π°Ρ†ΠΈΡŽ ΠΊΠΎΠ½Ρ‚Ρ€Π°ΠΊΡ‚ΠΎΠ² API, Π±Π΅Π·ΠΎΠΏΠ°ΡΠ½ΡƒΡŽ Ρ€Π°Π±ΠΎΡ‚Ρƒ с Π±Π°Π·ΠΎΠΉ Π΄Π°Π½Π½Ρ‹Ρ…, Π³Π΅Π½Π΅Ρ€Π°Ρ†ΠΈΡŽ осмыслСнных тСстовых Π΄Π°Π½Π½Ρ‹Ρ… ΠΈ ΠΏΡ€ΠΎΡΡ‚ΡƒΡŽ ΠΈΠ½Ρ‚Π΅Π³Ρ€Π°Ρ†ΠΈΡŽ Π² инфраструктуру Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠΈ. Π‘Ρ‚Π°Ρ‚ΡŒΡ ΠΏΠΎΠ΄Π΅Π»Π΅Π½Π° Π½Π° Ρ‚Ρ€ΠΈ части. Π’ ΠΏΠ΅Ρ€Π²ΠΎΠΉ части даСтся обоснованиС прСимущСств создания ΠΏΠΎΠ»Π½ΠΎΡ†Π΅Π½Π½ΠΎΠ³ΠΎ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π½ΠΎΠ³ΠΎ Ρ„Ρ€Π΅ΠΉΠΌΠ²ΠΎΡ€ΠΊΠ° ΠΏΠΎ ΡΡ€Π°Π²Π½Π΅Π½ΠΈΡŽ с использованиСм Π³ΠΎΡ‚ΠΎΠ²Ρ‹Ρ… ΡƒΠ½ΠΈΠ²Π΅Ρ€ΡΠ°Π»ΡŒΠ½Ρ‹Ρ… инструмСнтов ΠΏΠΎ Ρ‚ΠΈΠΏΡƒ Postman. Π’Ρ‹ ΡƒΠ·Π½Π°Π΅Ρ‚Π΅, ΠΊΠ°ΠΊΠΈΠ΅ ΠΏΡ€ΠΈΠ½Ρ†ΠΈΠΏΡ‹ Π»Π΅Π³Π»ΠΈ Π² основу Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Ρ‹ Ρ„Ρ€Π΅ΠΉΠΌΠ²ΠΎΡ€ΠΊΠ° ΠΈ ΠΊΠ°ΠΊΠΎΠΉ Π±Ρ‹Π» ΠΏΠΎΠ΄ΠΎΠ±Ρ€Π°Π½ тСхнологичСский стСк для ΠΈΡ… Ρ€Π΅Π°Π»ΠΈΠ·Π°Ρ†ΠΈΠΈ Π½Π° ΠΏΡ€Π°ΠΊΡ‚ΠΈΠΊΠ΅. Π‘Ρ‚Π°Ρ‚ΡŒΡ тСхничСская ΠΈ адрСсована ΠΈΠ½ΠΆΠ΅Π½Π΅Ρ€Π°ΠΌ-программистам Π² тСстировании (SDET) ΠΈ ΠΈΠ½ΠΆΠ΅Π½Π΅Ρ€Π°ΠΌ ΠΏΠΎ Π°Π²Ρ‚ΠΎΠΌΠ°Ρ‚ΠΈΠ·Π°Ρ†ΠΈΠΈ тСстирования, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ ΠΏΠ΅Ρ€Π΅ΡˆΠ»ΠΈ ΠΎΡ‚ написания обособлСнных тСстов ΠΊ осознанному ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ΠΈΡ€ΠΎΠ²Π°Π½ΠΈΡŽ тСстового Ρ„Ρ€Π΅ΠΉΠΌΠ²ΠΎΡ€ΠΊΠ° ΠΈΠ»ΠΈ Ρ‚ΠΎΠ»ΡŒΠΊΠΎ Π½Π°Ρ‡ΠΈΠ½Π°ΡŽΡ‚ этот ΠΏΠ΅Ρ€Π΅Ρ…ΠΎΠ΄.

habr.com/ru/articles/982624/

#python #Ρ„Ρ€Π΅ΠΉΠΌΠ²ΠΎΡ€ΠΊΠΈ_для_тСстирования #Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Π°_систСмы #ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠ΅ #ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠ΅_систСм #автоматизация_тСстирования #apiтСстированиС #слоистая_Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Π° #сбор_Ρ‚Ρ€Π΅Π±ΠΎΠ²Π°Π½ΠΈΠΉ #ΠΏΡ€ΠΈΠ½Ρ†ΠΈΠΏΡ‹_проСктирования




Show Original Post


03.01.2026 18:24
frankel (@frankel@mastodon.top)

When NOT to use #Pydantic

ossa-ma.github.io/blog/when-no

#python




Show Original Post


03.01.2026 18:22
objects (@objects@agora.echelon.pl)

#Python #quantum computing - interesting

https://realpython.com/quantum-computing-basics/




Show Original Post


03.01.2026 18:15
RomanOnARiver (@RomanOnARiver@mastodon.social)

Source code should be full of puns/references. Am I dealing with json? Method is called derulo(). Flipping & reversing an array? missy_elliot(). In my PDF manipulation software, there's three resize methods - fit, fill, and stretch, if you want to do all of them - that's called tpain_maino(). Sometimes I need to re-rasterize a PDF, that's bob_ziggy_damian() and if I have to really aggressively fix it (basically burn it down and redo all of it) that's seth_rollins().




Show Original Post


03.01.2026 18:12
RodStephens (@RodStephens@hachyderm.io)

Use Pygame to visualize bubble sort in Python, Part 1
rodstephensbooks.com/bubble_so
#Python #Algorithms #Pygame #Animation





Show Original Post


03.01.2026 17:54
TechKeysX (@TechKeysX@mastodon.social)

V - S1 EP14 Lab 9 - Machine Learning in Python - Introduction to Inheritance - Calling Parent Behaviour





Show Original Post


03.01.2026 17:39
csepp (@csepp@merveilles.town)

#iwlwifi broke after a recent NixOS upgrade (firmware/kernel issue, not really distro-specific), but being forced #offline finally got me to work on my #OrgRoam memex. :neofox_uwu:
Linked a bunch of lonely nodes together.
Once I got the network back online I even wrote some #Elisp to replace old link that point to files with UUID ones.
And yeah, I needed a search engine for that, because the built-in docs for #Emacs - while often handy - are lacking in examples and assume a bit too much up-front knowledge. I'm still not sure what the heck org-element-context returns and why I should need a special function to index it. Say what you will about the complexity of #JavaScript or #Python, having built-in data types for lists, sets, and maps makes it a lot easier to poke at data.
But at least I could hack together about half of it from offline sources.

One issue that surprised me is that default setup for editing ELisp in #DoomEmacs is still not entirely user friendly. Lots of things work out of the box, which is really cool, but some simple things like automatic indentation are not really consistent.
When I saved the file, it got reformatted in a way that broke its structure.
When I tried to de-indent a line, it deleted too much whitespace, instead of just going back a single level, so I had to use C-x TAB, which is unnecessarily many keystrokes for such a common operation.

All in all, I'm impressed at how productive I can be with it and I hope that the jankiness will be less of an issue once I've gained some Elisp experience.




Show Original Post


03.01.2026 17:38
rye (@rye@ioc.exchange)

Got an interesting comment from someone they are writing something to detect vibrations in machinery to reduce long term cost for rotating parts.

Pretty cool!

What are you working on in your communities?

#python #programming #engineering #SytemThinks




Show Original Post


1 ...716 717 718 719 720 721 722 723 724 725 726 ...1582
UP