python

Back Open Paginator
06.03.2026 17:49
xahteiwi (@xahteiwi@fedifreu.de)

Servicetröt: pycon.at-CFP endet um Mitternacht.

sessionize.com/pycon-austria-2

#Python #PyConAT




Show Original Post


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

#Python trick: 0 is falsy, 1 is truthy.

Use this for even/odd checks:

if n % 2:
print('Odd!') # remainder is 1 (truthy)
else:
print('Even!') # remainder is 0 (falsy)

No need for "if n % 2 == 0" — just use the truthiness!





Show Original Post


06.03.2026 17:28
mopicmp (@mopicmp@mastodon.social)

Python Tip: match/case (Structural Pattern Matching)

match command.split():
case ['go', direction]:
move(direction)
case ['pick', 'up', item]:
grab(item)
case _:
print('Unknown command')

Python 3.10 match/case goes beyond switch statements. It destructures and binds variables.

raccoonette.gumroad.com/l/Pyth




Show Original Post


06.03.2026 17:28
mopicmp (@mopicmp@mastodon.social)

Python Tip: subprocess.run()

import subprocess
result = subprocess.run(
['git', 'status', '--short'],
capture_output=True, text=True, check=True
)
print(result.stdout)

subprocess.run() is the modern way to call external commands. capture_output + text=True gives...

raccoonette.gumroad.com/l/Pyth




Show Original Post


06.03.2026 17:18
zopyx (@zopyx@mastodon.world)

I release

pypi.org/project/chardet-rust/

An AI-backed reimplementation of the original Python chardet module for #Python but implemented in Rust.

Full API compability, full support for all tests.




Show Original Post


06.03.2026 17:15
smach (@smach@masto.machlis.com)

Analyzing Images & Video with AI - Jonathan Soma's #NICAR26 session presentation
Links to lots of great Colab notebooks!
jsoma.github.io/workshop-ai-im
#GenAI #Python




Show Original Post


06.03.2026 17:00
PythonPeak (@PythonPeak@mastodon.social)

Never Struggle With Thumbnail Score Loop Sum Again

Never Struggle With Thumbnail Score Loop Sum Again 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.

#python #coding ...

youtube.com/watch?v=RMjy9a900UI




Show Original Post


06.03.2026 16:52
michalfita (@michalfita@mastodon.social)

@tomekw I'm more productive in than in . The consistent nature of the standard library makes conversion of thoughts into code easier and less prone to stupid flops, that Python then throws at you during run time.

I didn't program in , I read about it, run some example and talked to some people using it. The opinion circulating about it is that it can be tedious to write large Ada applications or even systems.




Show Original Post


06.03.2026 16:43
aidailypost (@aidailypost@mastodon.social)

Speed up costly LLM API calls with a tiny in‑memory cache using Python’s functools.lru_cache. Learn how a simple decorator can slash latency, reduce token costs, and keep your workflow pure Python—no extra services needed. Code snippets, performance graphs, and tips for swapping in diskcache when memory runs low.

🔗 aidailypost.com/news/python-fu





Show Original Post


06.03.2026 16:37
johnnyd (@johnnyd@techhub.social)

Tired of missing GitHub PR reviews? I built github-monitor -- a lightweight Linux daemon that watches for PRs assigned to you and sends desktop notifications the moment they land.

Features:
- Desktop notifications with author avatars via notify-send
- System tray indicator with live PR count and clickable PR list
- Runs quietly as a systemd user service -- set it and forget it
- Config reload on SIGHUP, graceful shutdown on SIGTERM

Under the hood:
- Pure async Python (asyncio) -- no threads, no blocking I/O
- aiohttp for GitHub API, dbus-next for session bus IPC
- Daemon exposes live state over D-Bus, indicator connects as a separate process
- Frozen dataclasses, strict mypy, full test coverage

Built with Python 3.13+, packaged with hatchling, managed with uv.

It's open source and I'd love feedback -- whether it's bug reports, feature ideas, or contributions!

github.com/dvoraj75/github-mon

#Python #Linux #OpenSource #GitHub #AsyncPython #DBus #Systemd




Show Original Post


06.03.2026 16:26
dvoraj75 (@dvoraj75@mastodon.social)

Tired of missing GitHub PR reviews? I built github-monitor -- a lightweight Linux daemon that watches for PRs assigned to you and sends desktop notifications the moment they land.

Features:
- System tray icon with live PR count
- Runs quietly as systemd user service
- Pure async Python -- no threads, no blocking

It's open source and I'd love feedback!

github.com/dvoraj75/github-mon




Show Original Post


06.03.2026 16:17
victorhck (@victorhck@mastodon.social)

Un par de «huevos de pascua» en

victorhckinthefreeworld.com/20




Show Original Post


1 ...369 370 371 372 373 374 375 376 377 378 379 ...1592
UP