python

Back Open Paginator
04.03.2026 18:00
Reuven (@Reuven@fosstodon.org)

Writing #Python and #Pandas by hand? That's so 2025!

More and more developers 10x their productivity with Claude Code. You can, too!

Join the 2nd round of my AI practice workshops. Learn what to do (and not to do) the hard way, getting your hands dirty with hands-on labs.

More info: lernerpython.com/code-with-cla





Show Original Post


04.03.2026 17:30
Reuven (@Reuven@fosstodon.org)

#Python #Pandas astype() returns a NEW series — it doesn't modify in place:

s = s.astype('int8')
s = s.astype('float64')
s = s.astype(str)

Watch out: You'll get a TypeError if any value can't be converted.





Show Original Post


04.03.2026 17:30
vossisboss (@vossisboss@fosstodon.org)

Content warning:Spoilered for photo of a 🐍.


Apparently I have a new neighbor in my crawlspace. Must have sensed that a #Python person lives here. Funny that it showed up while I was watching Python Unplugged too. 😂





Show Original Post


04.03.2026 17:01
PythonPeak (@PythonPeak@mastodon.social)

Python vs JS Signed URLs: Hotlink Pirates Blocked

Short-lived links that die before they go viral.

#python #javascript #signedurls #expiry #hotlinking #hmac #viralcoding #codecomparison #media #security

youtube.com/watch?v=sr5LSgTfZbE




Show Original Post


04.03.2026 16:29
treyhunner (@treyhunner@mastodon.social)

Generator expressions can be used as an "invent your own comprehension" tool.

They don't *actually* invent a custom comprehension, but they can be used for effectively that purpose.

I just published a new article on this:
pym.dev/custom-comprehensions/




Show Original Post


04.03.2026 16:22
habr (@habr@zhub.link)

Как я определял дистрибутивы Linux по установленным пакетам, и при чем тут KUMA?

Как определить дистрибутив Linux? А что, если имеется только информация о пакетах, установленных на устройстве? История одного «велосипеда» или мы не нашли готового решения. Представьте, что вам нужно определить дистрибутивы, опираясь исключительно на установленные пакеты. Инвентаризация есть, но данные неполные — часто известно только имя хоста, IP и список установленных пакетов. Операционная система может быть указана как «Linux» без уточнения дистрибутива и версии. О создании алгоритма, работе с KUMA и написании код в данной статье.

habr.com/ru/articles/1006546/

#python #kuma #linux




Show Original Post


04.03.2026 15:34
ubuntu_touch (@ubuntu_touch@mstdn.social)

De la física determinista a la física de campos

#python @Python_cursos Tutor
Explicacion Comparacion Orden





Show Original Post


04.03.2026 15:04
feed (@feed@igeek.gamer-geek-news.com)

📊 Project Tutorial: Exploring Financial Data Using the Nasdaq Data Link API

Working with financial data used to mean downloading spreadsheets or paying for expensive data subscriptions. APIs have changed that. With a few lines of Python, we can now pull structured financia...

📰 Source: Dataquest
🔗 Link: https://www.dataquest.io/blog/exploring-financial-data-using-the-nasdaq-data-link-api/

#Python #DataScience




Show Original Post


04.03.2026 15:04
ct_Magazin (@ct_Magazin@social.heise.de)

heise+ | Sortieralgorithmen ohne Zweck: Schnarchlahm bis super performant

Der Humor von Informatikern rühmt sich, unkonventionell zu sein. Zeugen dafür sind Internetforen und unsere Auswahl an sinnbefreiten Sortieralgorithmen.

heise.de/hintergrund/Sortieral

#IT #Programmierung #Python #Wissenschaft #news




Show Original Post


04.03.2026 14:59
mopicmp (@mopicmp@mastodon.social)

Python Tip: Dictionary Merge (|)

defaults = {'color': 'blue', 'size': 10}
user = {'color': 'red'}
final = defaults | user
# {'color': 'red', 'size': 10}

Python 3.9+ lets you merge dictionaries with the | operator. Clean, readable, Pythonic.

raccoonette.gumroad.com/l/Pyth




Show Original Post


04.03.2026 14:59
mopicmp (@mopicmp@mastodon.social)

Python Tip: Context Managers

from contextlib import contextmanager

@contextmanager
def timer():
start = time.time()
yield
print(f'Took {time.time()-start:.2f}s')

with timer():
heavy_computation()

Create your own context managers with @contextmanager. Clean resource management and timing.

raccoonette.gumroad.com/l/Pyth




Show Original Post


04.03.2026 14:36
brodriguesco (@brodriguesco@fosstodon.org)

rix, my package that leverages #Nix to provide reproducible data science environments for #RStats (and #python and #julia) is in the top 10 starred ropensci packages!

that’s pretty cool





Show Original Post


1 ...383 384 385 386 387 388 389 390 391 392 393 ...1592
UP