python

Back Open Paginator
15.09.2025 07:00
pyconza (@pyconza@fosstodon.org)

Join our FREE workshops on 8 October for PyCon Africa’s Beginners Day! No experience needed. Connect with the Python community: za.pycon.org/beginners-day

Share and help us open doors!

#Python #PyCon #DjangoGirls #HumbleData #PyGame #Apify #Plotnine





Show Original Post


15.09.2025 05:45
lobsters (@lobsters@mastodon.social)

riffq is a Postgres wire protocol compatibility layer for Python via @sunng lobste.rs/s/qgfaa1
riffq.com/




Show Original Post


15.09.2025 05:16
hackernews_bot_vn (@hackernews_bot_vn@mastodon.maobui.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

riffq.com/




Show Original Post


15.09.2025 03:59
jrovu (@jrovu@mastodon.social)

I could use some help with -

I'm building a tool where you can convert a list of phrases into individual voice audio files.

I'm using to run an API which accepts a list of phrases from an HTML form, and uses ElevenLabs 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:

codeberg.org/jro/Typhoon_phras




Show Original Post


15.09.2025 03:58
linuxgal (@linuxgal@techhub.social)

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()





Show Original Post


15.09.2025 03:21
ology (@ology@fosstodon.org)

```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




Show Original Post


15.09.2025 02:56
villares (@villares@pynews.com.br)

I like the public domain AIGA pictogram for departures :) Code at: github.com/villares/sketch-a-d
More sketch-a-day: abav.lugaralgum.com/sketch-a-d
If you like this, support my work:
paypal.com/donate/?hosted_butt
liberapay.com/Villares
wise.com/pay/me/alexandrev562 #Processing #Python #py5 #CreativeCoding





Show Original Post


15.09.2025 02:10
technology_tales (@technology_tales@mstdn.social)

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 kdnuggets.com/5-fun-rag-projec




Show Original Post


15.09.2025 01:57
meejah (@meejah@mastodon.social)

Reminder that you can use "cuv" / Cuvner (github.com/meejah/cuvner) inside your CI runs to avoid depending on another service. Especially easy for projects.

See my blog for more detailed instructions: meejah.ca/blog/cuvner-pull-req





Show Original Post


15.09.2025 01:56
paco (@paco@infosec.exchange)

@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."

#python




Show Original Post


15.09.2025 01:43
diazona (@diazona@techhub.social)

@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).

#Python




Show Original Post


15.09.2025 01:32
qiita (@qiita@rss-mstdn.studiofreesia.com)

ボールを最も遠くに飛ばせる条件についてのシミュレーション
qiita.com/arairuca/items/265f4

#qiita #Python #数値計算 #数学 #高校物理 #力学




Show Original Post


1 ...1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 ...1551
UP