Join our FREE workshops on 8 October for PyCon Africa’s Beginners Day! No experience needed. Connect with the Python community: https://za.pycon.org/beginners-day
Share and help us open doors!
#Python #PyCon #DjangoGirls #HumbleData #PyGame #Apify #Plotnine

riffq is a Postgres wire protocol compatibility layer for Python via @sunng https://lobste.rs/s/qgfaa1 #databases #python
https://riffq.com/
Riffq: Lớp tương thích giao thức Postgres cho Python! 🐍💽 Dành cho các lập trình viên Python làm việc với cơ sở dữ liệu Postgres.
#Python #Postgres #Database #LậpTrình #CơSởDữLiệu
I could use some help with #Python #async -
I'm building a #LanguageLearning tool where you can convert a list of phrases into individual voice audio files.
I'm using #FastAPI to run an API which accepts a list of phrases from an HTML form, and uses ElevenLabs #TextToSpeech to make audio files, bundle them into a Zip file for the browser to download.
The problem is sequential API calls are slow - would love to request them ASync.
Suggestions?
Code:
Using #Python to graph relativistic apparent speed as a starship approaches c #62
#!/usr/bin/python3
import matplotlib.pyplot as plt
import numpy as np
fig, ax = plt.subplots(figsize=(8,6))
major_ticks = np.arange(0, 101, 5)
unit_ticks = np.arange(0, 101, 1)
minor_ticks = np.arange(0, 101, 0.2)
ax.set_xticks(major_ticks)
ax.set_yticks(major_ticks)
ax.set_xticks(unit_ticks, minor=True)
ax.set_yticks(unit_ticks, minor=True)
ax.grid(which='major', color='gray', linestyle='-', linewidth=0.8, alpha=0.8)
ax.grid(which='minor', color='black', linestyle='-', linewidth=0.5, alpha=0.7)
x = np.arange(0.7, 0.999, 0.0001)
y = x / np.sqrt(1 - x**2)
plt.plot(x * 100, y, color='blue', linewidth=2)
ax.set_xlim(70, 100)
ax.set_ylim(0, max(y)*1.1)
plt.xlabel("Real speed (percentage of c)")
plt.ylabel("Apparent speed (multiple of c)")
plt.tight_layout()
plt.show()

```python
from music_creatingrhythms import Rhythms
from music_drummer import Drummer
r = Rhythms()
beats = 16
kick = ''.join([str(n) for n in r.euclid(2, beats)])
snare = ''.join([str(n) for n in r.rotate_n(4, r.euclid(2, beats))])
hihat = ''.join([str(n) for n in r.euclid(11, beats)])
d = Drummer()
d.set_bpm(100)
d.set_ts()
for _ in range(8):
d.pattern(patterns={ 'kick': kick, 'snare': snare, 'hihat': hihat })
d.sync_parts()
d.show(format='midi')
```
#Python #MIDI Euclidean #drums
I like the public domain AIGA pictogram for departures :) Code at: https://github.com/villares/sketch-a-day/tree/main/2025/sketch_2025_09_14
More sketch-a-day: https://abav.lugaralgum.com/sketch-a-day
If you like this, support my work:
https://www.paypal.com/donate/?hosted_button_id=5B4MZ78C9J724
https://liberapay.com/Villares
https://wise.com/pay/me/alexandrev562 #Processing #Python #py5 #CreativeCoding

5 creative RAG projects for beginners: Build with open-source models, create multimodal systems for PDFs with images/tables, develop on-device RAG with ObjectBox, construct real-time pipelines using Neo4j knowledge graphs, and implement agentic RAG with Llama-Index for multi-step reasoning. #RAG #MachineLearning #AI #LLM #DataScience #Python #BeginnerProjects #TechTutorials https://www.kdnuggets.com/5-fun-rag-projects-for-absolute-beginners
Reminder that you can use "cuv" / Cuvner (https://github.com/meejah/cuvner) inside your CI runs to avoid depending on another service. Especially easy for #python projects.
See my blog for more detailed instructions: https://meejah.ca/blog/cuvner-pull-requests

@glyph Same laptop, same version of cpython (3.13), same requirements.txt file with pip:
real 2m5.404s
user 0m42.650s
sys 0m5.081s
So 125 seconds versus 14 seconds. Pip and uv calculate dependencies differently, though uv tries to be compatible. Pip did 253 packages and uv did 250. But pip works sequentially, one package at a time. One download at a time. Like many #rust programs, uv is "embarrassingly parallel."
@geraldew Ah, I see, thanks for explaining.
So, the problem with that particular example is that the package doesn't explain how to run the example app. It absolutely should say so in the README file or at least in the documentation somewhere. (It looks like you have to install the package in a virtual environment and run `tablesapp`.) Also, App.py should not include an `if __name__ == "__main__"` block, which is something that should only exist in files which are runnable as standalone scripts, and App.py most certainly is not. Not that that should have been obvious to you - it's not obvious to a reader of the code unless they know what to look for - but the package author definitely should have figured it out.
That being said, I don't think it's fair to blame the packaging system as a whole for things that go wrong when someone didn't use it properly (or when someone didn't use it at all and was supposed to).
ボールを最も遠くに飛ばせる条件についてのシミュレーション
https://qiita.com/arairuca/items/265f4008e2a5899d6eae?utm_campaign=popular_items&utm_medium=feed&utm_source=popular_items
#qiita #Python #数値計算 #数学 #高校物理 #力学