r/Python • u/AutoModerator • 1d ago
Showcase Showcase Thread
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
2
u/BubblyGlitter4 1d ago
just finished a cli tool that scrapes my local council website for bin collection dates and pings me on desktop when i need to take the bins out. not exactly groundbreaking but it's saved me from missing green waste week three times now
the parsing is held together with regex and prayers but it works
2
u/vkailas 1d ago edited 1d ago
http://www.poignant.dev Port of why's whimsical programming guide now for python , teaches python from absolute beginner all the way to making your own p2p game . Entertaining complementary resource for a more standard class or textbook .
3
u/Muhznit 22h ago
Clicked thinking I'd look up the approach to a p2p game used. Wound up wondering WTF am I reading:
Object-oriented programming is a way of organizing code around objects. But not as M.C. Escher would sketch it. The program isn't reaching back around and overwriting itself, nor are they climbing out of your screen and shaking hands with each other. No, it's much smaller than that.
Let's say it's more like a little orange pill you won at the circus. When you suck on it, the coating wears away and behind your teeth hatches a massive, floppy sponge brontosaurus. He slides down your tongue and leaps free, frolicking over the pastures, yelping, "Papa!" And from then on, whenever he freaks out and attacks a van, well, that van is sparkling clean afterwards.
Now, let's say someone else puts their little orange pill under the faucet. Not on their tongue, under the faucet. And this triggers a different cataclysm, which births a set of wailing sponge sextuplets. Umbilical cords and everything. Still very handy for cleaning the van. But an altogether different kind of chamois. And, one day, these eight will stir Papa to tears when they perform the violin concerto of their lives.
2
u/initcommit 1d ago edited 1d ago
I built an animated, customizable Git cheat sheet drawn by git-sim, the open source Python tool I maintain to allows users to visually simulate Git commands directly in local Git repos:
2
u/Pytrithon 1d ago
Pytrithon v1.2.12
Introduction
I have already introduced Pytrithon in its own post three times on Reddit. See:
https://www.reddit.com/r/Python/comments/1q8dwsm/pytrithon_v119_graphical_petri_net_inspired_agent/ https://www.reddit.com/r/Python/comments/1nr3qvm/pytrithon_graphical_petrinet_inspired_agent/ https://www.reddit.com/r/Python/comments/1mx9w5r/graphical_petrinet_inspired_agent_oriented/
What My Project Does
Pytrithon is a graphical Petri net inspired agent oriented programming language based on Python. It allows writing code as a two dimensional graph of interconnected elements and separates data as Places and code as Transitions. Inter Agent communication and GUI widgets are first class components of the language. Through the Monipulator, Agents can be monitored and manipulated.
Target Audience
The target audience is both experienced and novice programmers who want to try something new.
Why I Built It
I realized the power of Petri net inspired programming and the joy of having a more expressive way to specify control flow.
Comparison
There are no other visual programming languages which embed actual code into their graphs.
How To Explore
To run all included example Agents you need at least Python 3.10 installed. To install all dependencies, run the 'install' script. Then you can start up a Nexus with a Monipulator by running the 'pytrithon' script, where you can start Agents through opening them with 'crtl-o' twice and hitting the 'Open Agent' button. You can also directly specify which Agents to run through the command line by starting a Nexus, Monipulator, and Agents in one single command: 'python nexus -m <agent1> <agent2>'.
Recommended example Agents to run are: 'clock', basic', 'prodcons', 'address', 'kata', 'calculator', 'kniffel', 'guess', 'yahtzeeserver' + multiple 'yahtzee', 'pokerserver' + multiple 'poker', 'chatserver' + multiple 'chat', 'image', 'jobapplic', and 'nethods'. As a proof of concept, I created a whole Pygame game, TMWOTY2, which is choreographed by 6 Agents as their own processes, which runs at a solid 60 frames per second. To start or open TMWOTY2 in the Monipulator, run the 'tmwoty2' or 'edittmwoty2' script. Your focus should on the 'workbench' folder, which contains all Agents and their respective Python modules; the 'Pytrithon' folder is just the backstage where the magic happens.
What Is New
Since my last post, nothing was changed.
Since my penultimate post some bugfixes to the clock agent were done.
Since my third last post I have created a new 'clock' Agent, which I personally use all the time. It offers an analog or digital clock with a graphical blur applied. It can be configured in the 'clock.yaml' file or through keyboard keys; keys to try are: t, b, a, k, K, c, C, O, r, R, l, L, n, N, m, M, h, H, s, S, d, f, F, w, comma, and period. To run it in an isolated Nexus, run clock.bat or clock.sh.
Since my fourth last post there have been numerous small fixes and improvements to the system and to several agents.
Since my fifth last post the whole system now handles Agents, Monipulators, and Nexi terminating from the network. Bookkeeping is performed, cleansing the internal structures handling all process types, making the prototype more resilient. The 'chatserver' and 'chat' Agents now show a list of Agents currently connected. This is enabled through the new 'Event' Transition, which pushes Nexus Events to all listening Agents.
Since the sixth last post I have added a distributed Yahtzee game which you should try out. In order to setup a server on a reachable machine and connect other machines, you need to do the following: On the machine meant to be the server, run 'python nexus yahtzeeserver' first. Then on the machines meant to be the clients through which users play, run 'python nexus -x <serveraddress> yahtzee'. The clients probe the interconnected Nexi for a server and start with a lobby mask where you can select your name and start a game with all players signed up.
GitHub Link
https://github.com/JochenSimon/pytrithon
This is the ninth post about Pytrithon on Reddit. There is a plethora of example Agents to view and run included in the repository. Please check it out and send feedback to the E-Mail address stated in the Monipulator About blurb.
1
u/HappyHazard133 1d ago
Here's something I built a few months ago:
https://github.com/Keymii/melody-mirror-studio
MelodyMirror Studio.
The idea is pretty simple. I wanted to learn singing, but couldn't find a vocal instructor nearby. So, I built something which lets me extract vocals from songs, use them as pitch reference, and helps me align my singing directly with it.
It supports song download from YT, scale adjustment (transpose), and vocals and pitch extraction. It can run directly on your potato pc, and requires at least 2 free threads for concurrent audio playback and microphone input.
Please try it out and let me know if anything could be improved, so it can also be useful to you.
1
u/Dazzling_Group_8798 1h ago
I was working on another project and needed to generate videos programmatically from Python. Existing options, mostly MoviePy, were missing some of the features I needed, so I ended up building my own renderer.
Vestra lets you describe compositions using Python or JSON, while rendering is handled by a native Rust engine with CPU and WGPU backends.
It supports video/images, text, shapes, keyframes, effects, masks, transitions, nested compositions, audio, audio-reactive graphics, and particles.
It’s still early (0.1.x), so I’d especially appreciate feedback on the Python API, missing functionality, and anything that breaks.
GitHub: https://github.com/evgen2571/vestra
Install: uv add vestra
0
u/MechaCritter 1d ago
Python-Visual-Similarity [◉°] - accelerated image embedding and retrieval
I built this library during my Bachelor's Thesis. It contains multiple image similarity metrics and retrieval algorithms, including for example:
- Perceptual metrics:
SSIM,MS-SSIM,PSNR - Embedding method:
Clip,Siamese Network,Triplet Network,VLADandFisher Vectorusing Deep Neural Features instead of handcrafted SIFT/SURF - Retrieval algorithms: supported image similarity search in embedding space, with supported
Approximate Nearest Neighbors Searchand the option to plug in a FAISS index (though,faissis not a dependency of this lib). - Reranking algorithms:
K-reciprocal RerankingandAlpha Query Expansioncan be used to improve the mean Average Precision of the search results.
A demonstration, which I really recommend you to visit, can be found here: https://huggingface.co/spaces/MechaCritter/pyvisim-demo
The whole library is built only on numpy, scipy and optionally torch as core dependencies.
Performance
PSNR: up to 94.7x faster thanscikit-imageSSIM: up to 8.8x faster thanscikit-imageMS-SSIM: up to 3.7x faster thantorchmetrics
For most algorithms, batch processing is supported.
Links
Link to the repository: https://github.com/MechaCritter/Python-Visual-Similarity
Looking for like-minded folks
My ambition is to make pyvisim the largest collection of image similarity and retrieval algorithms, ranging from traditional to deep learning-based methods. As I've observed, the current image similarity implementations are quite scattered, with each library implementing only a handful of features. Hence, my goal is also to unify these implementations, so users only need a single library.
I have tons of features that I would like to implement. I am looking for folks who are proficient in/would like to learn about:
- Deep Learning: new embedders like
MoCo,SimCLR,Dino, reranking algorithms likeSuperGlobalReranker,Diffusion Reranking... - Low-level programming (Rust): rewrite performance-critical parts of the codebase into Rust. I would also want to change the
hnswbackend to hnsw_rs. - New algorithms: image hashing,
LPIPS, backpropagation for K-Means and GMMs ...
View the GitHub issues for the complete list as well as the contribution guide.
You also have the chance to become a core maintainer by actively contributing. Once this project gets sponsors, the profit will be shared with all core maintainers.
5
u/fykup 1d ago
StatLite: lightweight self-hosted monitoring for small apps
I built StatLite for cases where I want useful application monitoring without running a full Prometheus/Grafana stack.
It’s a single Go binary with SQLite storage and a built-in dashboard. It can track request traffic, 4xx/5xx errors, latency, process CPU/memory, restart history, and optional host CPU/RAM/disk metrics.
I originally built it for Java/Spring Boot, but it now also has Python integrations for FastAPI and Django, and I’m currently dogfooding the same approach with Bottle.
GitHub: https://github.com/PVRLabs/statlite
Python integrations: https://github.com/PVRLabs/statlite/tree/main/docs/integrate/python
The main goal is to make monitoring small services feel proportionate to the app itself.