python

Back Open Paginator
25.11.2025 20:47
sudonem (@sudonem@infosec.exchange)

Random interesting thing I just learned.

In Python, a for loop can take an else keyword. It fires on successful completion of the loop.

for i in dataset:
print(i)
else:
print(“Your loop has completed)

I don’t find myself using for loops a ton but that’s kinda neat, albeit unintuitive.
#Python #TIL #SomethingNewEveryDay




Show Original Post


25.11.2025 20:20
reddit_tech_vn_bot (@reddit_tech_vn_bot@mastodon.maobui.com)

Tự tạo trợ lý AI J.A.R.V.I.S. nội địa/ngoại tuyến hoàn toàn dùng Python & Ollama, kín đáo & không bị kiểm duyệt. Tích hợp HUD Sci-Fi, điều khiển giọng nói, tự động hóa hệ thống và 2 bản sắc AI (Jarvis-Friday). #AI #TríTuệNhânTạo #Python #Ollama #TựĐộngHóa #CôngNghệ

reddit.com/r/SideProject/comme




Show Original Post


25.11.2025 20:01
riverfount (@riverfount@bolha.us)

No desenvolvimento de APIs REST em Python, evitar números mágicos nos status codes HTTP é essencial para legibilidade, manutenção e padrão de projeto. Frameworks como FastAPI já oferecem constantes, mas se o seu não tem, crie um módulo como helper/status_code.py para melhorar seu código! Veja um artigo completo com exemplos e motivos práticos:

bolha.blog/riverfount/por-que-

#Python #APIs #FastAPI #CleanCode




Show Original Post


25.11.2025 19:54
revisto (@revisto@mastodon.social)

I added a new CI check to Drum Machine, it now automatically checks if the .pot translation template file is up to date. If I forget to regenerate it after adding/changing translatable strings (which I usually do), it reminds me :D

You can add it to your own projects as well, just copy the translation-check job from the workflow file and change the paths!
github.com/Revisto/drum-machine




Show Original Post


25.11.2025 19:25
mrswats (@mrswats@fosstodon.org)

Lectura divertida:

susam.net/fizz-buzz-with-cosin

#Python #FizzBuzz #Fourier




Show Original Post


25.11.2025 19:21
TechKeysX (@TechKeysX@mastodon.social)

V - S1 EP9 T2 - Machine Learning in Python - Cyber Punk Sytle Graphs - with Matplotlib





Show Original Post


25.11.2025 19:19
GripNews (@GripNews@mastodon.social)

🌘 Python 並非數據科學的絕佳語言:第一部曲 - 實際體驗
➤ 數據科學領域的工具選擇與實際痛點
blog.genesmindsmachines.com/p/
作者認為 Python 雖然廣泛用於數據科學,但並非最適合的語言。他以自身經驗和觀察,指出 Python 在執行數據分析的常見任務時,常顯得繁瑣、效率不高,導致使用者花費額外時間。作者區分了數據科學(數據整理、探索性分析、視覺化、統計建模等)與深度學習,並強調 R 語言在前者任務上更為直觀和高效。他認為 Python 的普及主要歸因於歷史因素和其「尚可」的泛用性,而非其在數據科學領域的內在優勢。
+ 這篇文章確實點出了很多我也有過的困擾。R 在數據處理和視覺化上的確有其獨到之處,Python 雖然方便,但有時操作起來就是比較繞。
+ 身為 Python 開發者,我不全然同意。或許是缺乏深入瞭解 Python 生態系中更進階的庫,或是對 R 的最佳實踐不熟悉,才會有這種感覺。但確實,有些簡




Show Original Post


25.11.2025 19:16
reddit_tech_vn_bot (@reddit_tech_vn_bot@mastodon.maobui.com)

🚀 Mình tự tạo engine định programming Python tự-hosted để thay thế TikTok scheduler $50/tháng chỉ $18/tháng! ⬇️
Stack: Python script + Selenium Grid (tự động hóa trình duyệt) → Render video bằng MoviePy. Chốt khéo tránh bot TikTok với force-click + cookie injection. 💻
V proie: VAur $18/tháng + bản quyền phần mềm. 100% tự chủ!
#TikTokAutomation #Python #SelfHosted #Vultr #TechStack #ContentCreation #NoMoreSaaS
🇻🇳 #AutomationVietnam #PythonVietnam #VultrVietnam #

reddit.co




Show Original Post


25.11.2025 19:05
CuratedHackerNews (@CuratedHackerNews@mastodon.social)

Python is not a great language for data science. Part 1: The experience

blog.genesmindsmachines.com/p/




Show Original Post


25.11.2025 19:04
driscollis (@driscollis@mastodon.social)

Did you know you can create a class in without using the `class` directive?

See the following example to learn how:





Show Original Post


25.11.2025 19:01
s4mdf0o1 (@s4mdf0o1@piaille.fr)

Idée véner :
le #C #C++ #JSON et d'autres ...
y'en a marre des ';' en fin de ligne
alors que pour la lisibilité, on fait juste des retours à la ligne, et on ajoute une tabulation dans les blocs (if/for...)
c'est juste con, stupide, etc !
Qui lit du #JS en bloc ?
- Personne !
Bon alors, quand on organise le code en mode lisible/dev, y'a qu'à juste OUBLIER, ce p*tain de ';'
comme en #Python , quitte à faire un
sed 's/$/;/g'
si y'a pas moyen que le compilateur sache corriger, mais :
FOUTEZ-NOUS LA PAIX AVEC VOS ';' !!!
ouala, c'était 30 ans de colère en un seul message LOL 😋 🤣




Show Original Post


25.11.2025 18:50
talkpython (@talkpython@fosstodon.org)

We are live on YouTube in 30 minutes. Join us and be part of the show with @mkennedy and Trevor Manz. #python #podcast

Topic: anywidget: Jupyter Widgets made easy

youtube.com/watch?v=qcxgukkmJjg




Show Original Post


1 ...932 933 934 935 936 937 938 939 940 941 942 ...1569
UP