python

Back Open Paginator
08.03.2026 07:38
mopicmp (@mopicmp@mastodon.social)

Python Tip: functools.lru_cache

from functools import lru_cache

@lru_cache(maxsize=128)
def fib(n):
if n < 2: return n
return fib(n-1) + fib(n-2)

fib(100) # instant, not billions of calls

lru_cache memoizes function results. Recursive Fibonacci goes from O(2^n) to O(n) with one...

raccoonette.gumroad.com/l/Pyth




Show Original Post


08.03.2026 06:18
GripNews (@GripNews@mastodon.social)

🌗 針對 PyPy 專案維護狀態於 uv 文件中加入警告資訊
➤ 透過文檔更新引導開發者避開已逐漸過時的技術方案
github.com/astral-sh/uv/pull/1
由於跡象顯示 PyPy 專案已逐漸停止活躍開發(例如 NumPy 已停止支援),為了避免開發者誤以為該 Python 發行版仍獲得良好維護與支援,`uv` 工具的開發者 konstin 決定在官方文件中加入明確的警示備註。此 Pull Request 最終將原本重複的警告訊息精簡為單一條目,並已順利合併至 `uv` 主分支,提醒使用者 PyPy 目前僅支援至 Python 3.11 版本,後續將透過 `uv` 的更新版本發布此資訊。
+ 雖然 PyPy 曾經紅極一時,但看到社羣開始明確標註其維護狀態,對維護專案的穩定性來說確實是負責任的做法。
+ 贊同這項變更。很多開發者可能沒注意到 NumPy 那邊的動態,及早透過 `uv` 這類現代化工具發出提醒可以少掉很多除錯的麻煩。
(Developer Tools) 生態系統




Show Original Post


08.03.2026 06:09
247CodeGirl (@247CodeGirl@mastodon.social)

Season 1 Lesson 7 Part 5 - Your First Steps - File Paths and the Annoying - Escape Characters in Pythons





Show Original Post


08.03.2026 05:05
jobsfordevelopers (@jobsfordevelopers@mastodon.world)

Aurora is hiring Senior Software Engineer - Compute

🔧 #golang #python #typescript #react #node #api #aws #kubernetes #awss3 #seniorengineer
🌎 Mountain View, California
⏰ Full-time
🏢 Aurora

Job details jobsfordevelopers.com/jobs/sen
#jobalert #jobsearch #hiring




Show Original Post


08.03.2026 03:42
villares (@villares@pynews.com.br)

Find the sketch-a-day archives and tip jar at: abav.lugaralgum.com/sketch-a-d
Code for this sketch at: github.com/villares/sketch-a-d #Processing #Python #py5 #CreativeCoding





Show Original Post


08.03.2026 02:14
smach (@smach@masto.machlis.com)

Semantra is an open-source tool for searching documents by meaning, not keywords. It aims "to make running a specialized semantic search engine easy, friendly, configurable, and private/secure." Developed by @dylan [NYTimes]
github.com/freedmand/semantra
(Needs #Python installed)
#NICAR26




Show Original Post


08.03.2026 01:05
jobsfordevelopers (@jobsfordevelopers@mastodon.world)

Bitpanda is hiring Data Engineer, Python

🔧 #python #aws #azure #cicd #gcp #kafka #kubernetes #sql #terraform
🌎 Barcelona, Spain
⏰ Full-time
🏢 Bitpanda

Job details jobsfordevelopers.com/jobs/dat
#jobalert #jobsearch #hiring




Show Original Post


08.03.2026 00:58
ptmcg (@ptmcg@fosstodon.org)

I saw a TIL post on bsky today about using '/' with pathlib.Path's. Some other neat things recently added to #python
- itertools.batched (3.12)
- accessing re.Match groups using [] notation (faster than calling group()) (3.6)
- 1_000_000 is a legal syntax for 1000000 (3.6)
- command-line access to stdlib modules (python -m <name>)
- uuid (3.12)
- json (3.14)
- random (3.13)
- sqlite3 (3.12)
- http.server (3.4)
- f-strings (3.6)
- true multithreading (3.14)
- contextlib.chdir (3.11)




Show Original Post


07.03.2026 23:20
tikhonov_a (@tikhonov_a@mastodon.social)

These days writing a new library is sometimes faster than finding existing ones. So, I wrote a tiny cool sentinel Maybe[T] in

github.com/Fatal1ty/maybe-miss




Show Original Post


07.03.2026 23:01
PythonPeak (@PythonPeak@mastodon.social)

Python vs JS Receipt Replay Vault: Double-Charge Shield

Repeat receipts get blocked before refunds explode.

#python #javascript #viralcoding #codecomparison #idempotency #retries #payments #backendsafety #doublecharges #refundstorms #fintech

youtube.com/watch?v=50QdJQB2724




Show Original Post


07.03.2026 23:00
deshipu (@deshipu@fosstodon.org)

I remember being once asked, in good faith, what dependency injection frameworks are the most popular in #python. A decade later, I still don't know the answer.




Show Original Post


07.03.2026 22:58
coresec (@coresec@mastodon.social)

Ich habe dieses einmal ausprobiert und habe eine messy script da rein geworfen und verlangt das einmal ordentlich und mit logging zu überarbeiten...

Das ich es danach nicht mehr verstanden habe mag an meinem Skill issue liegen aber das es nicht mehr funktioniert hat fand ich schon unfair




Show Original Post


1 ...362 363 364 365 366 367 368 369 370 371 372 ...1592
UP