python

Back Open Paginator
01.08.2025 23:53
treyhunner (@treyhunner@mastodon.social)

The next time you find yourself using a break statement in a for loop ask: "what is the purpose of this break" and "is there a looping helper in Python that could help me accomplish this?"

Read more 👉 trey.io/xtql6h




Show Original Post


01.08.2025 23:45
meejah (@meejah@mastodon.social)

Announcing "SHWIM": Shell With Me, easy to use, end-to-end encrypted terminal sharing via tty-share and

meejah.ca/blog/initial-shwim-r

github.com/meejah/shwim
pypi.org/project/shwim/




Show Original Post


01.08.2025 23:27
wollman (@wollman@mastodon.social)

Hi, experts...

Whenever we clean up our scratch filesystems, some users' environments break (emitting the usual confusing stack spew). The users swear these environments were "being used" recently (certainly much more recently than 366 days, our cutoff for atime, and yes we have atime enabled on these filesystems, for this specific reason). Is conda and/or python doing something weird such that it depends on files existing but never actually reads or writes them?




Show Original Post


01.08.2025 22:19
GripNews (@GripNews@mastodon.social)

🌘 建置支援來電及去電的 AI 電話代理人
➤ 打造您的智慧化 VoIP 通訊解決方案
github.com/videosdk-community/
這份 GitHub 儲存庫提供了一個開源範例,教你如何使用 VideoSDK 和 Python 建置一個能夠處理來電與去電的 AI 電話代理人。它支援多種 SIP 提供者和 AI 模型,並具備可擴充的架構,方便整合新的服務。文件詳細說明瞭安裝、設定、API 端點以及如何新增 SIP 提供者與 AI 代理人。
+ 這個專案看起來很有潛力,可以大幅簡化 AI 電話系統的建置流程。
+ 感謝作者提供瞭如此詳盡的步驟和擴充指南,讓新手也能輕鬆上手。




Show Original Post


01.08.2025 22:12
jrovu (@jrovu@mastodon.social)

What's the best way to write / deploy a local criss-platform webapp. Here's what I want: (1) Web app backend - FastAPI/Python connects to local SQLite database, local voice synth server etc. (2) Static HTML front end interface, used the local API, (3) All of this runs in a Docker container, (4) On the operating system - MacOS & Linux - the user clicks the app,
launches the Docker container, starts the server, opens the web app (5) User doesnt need to have Docker installed




Show Original Post


01.08.2025 22:06
SnoopJ (@SnoopJ@hachyderm.io)

Achievement unlocked:

✅ Correctly identify a bug caused by string hash randomization, by guessing

#Python




Show Original Post


01.08.2025 21:35
treyhunner (@treyhunner@mastodon.social)

In case you didn't know: I share a Python tip via email every Wednesday. 🐍💡

In July, the tips were about:

• When functions are preferable to classes & methods
• How I use the Python documentation
• Why I use trailing commas in Python
• Why I avoid calling dunder methods
• The importance of measuring branch coverage when testing

If you'd like to read a tip every week, subscribe here: pym.dev/newsletter 💌




Show Original Post


01.08.2025 21:14
post (@post@lemmy.world)

Python's asyncio: A Hands-On Walkthrough

lemmy.world/post/33824270




Show Original Post


01.08.2025 21:02
mahryekuh (@mahryekuh@hachyderm.io)

Due to administrative reasons, I'm running a few minutes late, but you can catch me soon during the Python Office Hours.

Not hosted by Jeff tonight, but by the ShitPost Working Group.

Ask us for a gist if you haven't attended before!

#Python #ShitPostWG




Show Original Post


01.08.2025 20:39
zwol (@zwol@masto.hackers.town)

For the kind of code I tend to write, multiprocessing.Pool is such an effective antidote to the infamous Global Interpreter Lock that I haven't had to think about using anything else in years and years ...

... but today I want to generate *two* large output files concurrently from the results of a parallelized computation and suddenly it's not good enough and the alternatives are much, much less ergonomic. Bleh.

#python




Show Original Post


01.08.2025 19:55
hn50 (@hn50@social.lansky.name)

Design patterns you should unlearn in Python

Link: lihil.cc/blog/design-patterns-
Discussion: news.ycombinator.com/item?id=4

#python




Show Original Post


01.08.2025 19:54
treyhunner (@treyhunner@mastodon.social)

It looks like I'll be attending @pybeach 2025! Who's joining me?




Show Original Post


1 ...1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 ...1614
UP