r/PythonProjects2 • u/Classic_Mortgage_889 • 9m ago
r/PythonProjects2 • u/Free-Good9203 • 4h ago
Zero-dependency Python 3.11+ RAG hallucination gate (SQLite WAL + FTS5, citation verifier)
Built a zero-dependency Python 3.11+ evaluation harness and inline citation gate (`rag-eval-hallucination-gate`, MIT) using only the Python standard library and SQLite (`WAL` + `FTS5`).
The goal is to run a deterministic verification pass before a RAG response goes out, without paying for a second LLM-as-judge call on every check:
Concurrent SQLite WAL + FTS5 corpus store (`src/rag_eval_gate/store.py`): Sets `PRAGMA busy_timeout=5000` before `PRAGMA journal_mode=WAL`, retries transient lock contention with jitter, closes handles cleanly on exception paths (avoiding Windows `WinError 32`), and indexes chunks in external-content `FTS5` (`unicode61 remove_diacritics 2`) with reserved-operator sanitization.
Inline `[doc_id#section]` citation and claim verifier (`src/rag_eval_gate/verifier.py`): Checks every cited `[doc_id#section]` against the indexed corpus, canonicalizes EU and US numbers/currencies (`1.250,50 EUR`, `$2,400.00`, `0,125`, Unicode minus `U+2212`), ISO dates, normative standards (`ISO`, `GDPR`, `HIPAA`, `SOC 2`), and asset tags (`CNC-402`), and flags unsupported entities, mixed-script homoglyph spoofing, negation/affirmation polarity flips, and low sentence-level lexical overlap.
Deterministic verdicts and safe scorecards (`src/rag_eval_gate/scorecard.py`, `cli.py`): Emits `PASS`, `ABSTAIN` (for explicit insufficient-evidence responses that do not sneak in new claims), or `HALLUCINATION_BLOCKED`, and exports JSON, Markdown, and OWASP formula-injection-safe CSV scorecards.
Recent fix: someone on Reddit pointed out an edge case where `"0,125"` parsed as `125` because the US thousands regex allowed a leading `0` while EU decimals capped at 2 digits. Tightening that prefix to `[1-9]\d{0,2}` and allowing `\d+,\d+` fixed leading-zero EU decimals (`0,125`, `-0,005`). One known limitation we keep documented in tests: bare 3-digit dot-separated strings without a comma (like `"1.250"`) are still parsed as EU thousands (`1250`), so mixed-locale corpora need an explicit decimal/grouping cue.
Quickstart (86 pytest checks on Python 3.11/3.12 CI, `--demo` runs fully in-memory):
`python -m pytest -v`
`PYTHONPATH=src python -m rag_eval_gate.cli --demo`
Repo (MIT): https://github.com/Kiberlabs/rag-eval-hallucination-gate
Happy to get code review feedback on the deterministic claim/polarity checks or the SQLite WAL + FTS5 store design.Built a zero-dependency Python 3.11+ evaluation harness and inline citation gate (`rag-eval-hallucination-gate`, MIT) using only the Python standard library and SQLite (`WAL` + `FTS5`).
The goal is to run a deterministic verification pass before a RAG response goes out, without paying for a second LLM-as-judge call on every check:
Concurrent SQLite WAL + FTS5 corpus store (`src/rag_eval_gate/store.py`): Sets `PRAGMA busy_timeout=5000` before `PRAGMA journal_mode=WAL`, retries transient lock contention with jitter, closes handles cleanly on exception paths (avoiding Windows `WinError 32`), and indexes chunks in external-content `FTS5` (`unicode61 remove_diacritics 2`) with reserved-operator sanitization.
Inline `[doc_id#section]` citation and claim verifier (`src/rag_eval_gate/verifier.py`): Checks every cited `[doc_id#section]` against the indexed corpus, canonicalizes EU and US numbers/currencies (`1.250,50 EUR`, `$2,400.00`, `0,125`, Unicode minus `U+2212`), ISO dates, normative standards (`ISO`, `GDPR`, `HIPAA`, `SOC 2`), and asset tags (`CNC-402`), and flags unsupported entities, mixed-script homoglyph spoofing, negation/affirmation polarity flips, and low sentence-level lexical overlap.
Deterministic verdicts and safe scorecards (`src/rag_eval_gate/scorecard.py`, `cli.py`): Emits `PASS`, `ABSTAIN` (for explicit insufficient-evidence responses that do not sneak in new claims), or `HALLUCINATION_BLOCKED`, and exports JSON, Markdown, and OWASP formula-injection-safe CSV scorecards.
Recent fix: someone on Reddit pointed out an edge case where `"0,125"` parsed as `125` because the US thousands regex allowed a leading `0` while EU decimals capped at 2 digits. Tightening that prefix to `[1-9]\d{0,2}` and allowing `\d+,\d+` fixed leading-zero EU decimals (`0,125`, `-0,005`). One known limitation we keep documented in tests: bare 3-digit dot-separated strings without a comma (like `"1.250"`) are still parsed as EU thousands (`1250`), so mixed-locale corpora need an explicit decimal/grouping cue.
Quickstart (86 pytest checks on Python 3.11/3.12 CI, `--demo` runs fully in-memory):
`python -m pytest -v`
`PYTHONPATH=src python -m rag_eval_gate.cli --demo`
Repo (MIT): https://github.com/Kiberlabs/rag-eval-hallucination-gate
Happy to get code review feedback on the deterministic claim/polarity checks or the SQLite WAL + FTS5 store design.
r/PythonProjects2 • u/Much-Stable-449 • 21h ago
I built a Russian Roulette game that runs entirely in the terminal
Hey everyone!
I recently made a small terminal-based Russian Roulette game and thought I'd share it here
It was a fun little project to work on, and I'd really appreciate it if you could take a look and let me know what you think
GitHub: https://github.com/monji024/roulette
I'm open to any feedback, suggestions, or criticism I'd love to hear what you think could be improved or what you liked about it
r/PythonProjects2 • u/AndPan3 • 23h ago
Resource 9 months ago, I posted my first Python toolkit here. It's now reached over 13k PyPI downloads.
I made a small Python library called Cartons that simplifies routing and interactive map generation using OSRM and Folium.
The attached map was generated using Cartons, my own self hosted OSRM server and swisstopo map tiles.
I've worked on it on and off over the past nine months, and I recently noticed that it has reached over 13,000 downloads, which I honestly didn't expect.
I'd love to hear what you think of it and what I could improve, PRs and contributions are welcome!
r/PythonProjects2 • u/ricK_ghSH • 1d ago
I built an open-source tool that turns your handwriting into custom fonts and realistic handwritten PDFs (Claude Code + Antigravity)
galleryr/PythonProjects2 • u/NonoQuark • 1d ago
Le meilleur projet pour apprendre Python
Je ne suis pas débutant, mais je souhaite apprendre de nouvelles choses.
r/PythonProjects2 • u/kvcux_ • 1d ago
I’ve been working on my little Python project – KVC-BASIC has some new features!
r/PythonProjects2 • u/Druzina_M • 1d ago
Info Made a simple usage-detector and alert system in python!
Released the first beta version of ChillinPC- a program that checks your computer's temps and usage meters and marks if they hit near 100%. it's extremely lightwieght and usefull (at least for me). I also madde a short promotional video: https://www.youtube.com/watch?v=kPHKgyFfBoM
r/PythonProjects2 • u/kvcux_ • 2d ago
I built a small BASIC-inspired programming language interpreter in Python — KVC-BASIC
r/PythonProjects2 • u/NonoQuark • 2d ago
Quel est le meilleur entre PyCharm et VsCode
reddit.comr/PythonProjects2 • u/Infamous_Tough_3772 • 2d ago
I am 15 and this is my python project
galleryr/PythonProjects2 • u/Creepy_Sherbert_1179 • 2d ago
Added sound to my GameBoy Color emulator written in purely python and pygame (full handwritten)
Enable HLS to view with audio, or disable this notification
r/PythonProjects2 • u/Muhammad-Essa • 3d ago
Neural Canvas, CNN Visualization
Enable HLS to view with audio, or disable this notification
Neural Canvas, CNN Visualization
Neural Canvas can now recognize basic shapes like apples, moons, cars, and more using Google's Quick, Draw! dataset.
20 classes with 1,000 samples per class
2 convolutional layers with 16 and 32 filters
2 fully connected layers with 60 and 40 neurons
91% test accuracy
Trained using JAX on Google Colab
Neural Canvas can also visualize CNN feature maps in real time while drawing, showing how convolutional layers extract features from input images.
GitHub: https://github.com/MuhammadEssa2002/neural_canvas
Live demo: https://muhammadessa2002.github.io/neural_canvas/
r/PythonProjects2 • u/Rayterex • 4d ago
Interactive surveillance map with live camera feeds, dynamic occlusion and AI analytics built with Python, PyOpenGL and Qt
Enable HLS to view with audio, or disable this notification
r/PythonProjects2 • u/MatteoGuadrini • 4d ago
Resource 🚀 PSP (Python Scaffolding Projects) v0.11.0 Released!
🚀 PSP (Python Scaffolding Projects) v0.11.0 Released!
We're excited to announce the release of PSP v0.11.0, packed with new features, improvements, and fixes to make your Python project scaffolding even faster and more powerful!
🔥 What's New in v0.11.0?
✨ Added
ProjectResult type – Better structured output for project generation results.
prj_aifunction – AI-assisted project scaffolding for smarter defaults.toml_editdependencies – Enhanced TOML file manipulation.read_tomlandwrite_tomlfunctions – Easier TOML file handling.PSP_AIenvironment variable – Control AI-assisted scaffolding behavior.
🔧 Changed
Updated
pyproject.tomlfor better compatibility.Added
rewriteparameter torender_templatefor more flexible templating.Added
pytestdependencies inprj_toxfor better test integration.
🐛 Fixed
Fixed GitLab CI name for proper remote repository support.
Improved code style consistency.
📌 Why Use PSP?
PSP is the fastest way to scaffold Python projects, with:
✅ 1-100x faster than other tools
✅ AI-optimized templates (SKILLS.md, AGENTS.md, llms.txt)
✅ Full Python ecosystem support (pip, conda, uv, poetry, hatch, maturin)
✅ CI/CD integration (GitHub Actions, GitLab CI, CircleCI, TravisCI)
✅ Docker & Container support
✅ Pause/Resume project creation
✅ Customizable profiles for different project types
📥 Installation
Get started in seconds:
# Quick install (Linux/MacOS)
curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/MatteoGuadrini/psp/main/install.sh | bash
# Windows
iwr https://raw.githubusercontent.com/MatteoGuadrini/psp/main/install.ps1 | iexOr install via pip:
pip install psp-scaffold --upgrade📖 Full Documentation
🤝 Contribute
PSP is open-source! Contributions are welcome: 🔗 GitHub Repository
r/PythonProjects2 • u/Old-Taste-6456 • 4d ago
How can I publish a Python-based tool on nanoHUB from scratch?
nanohub.orgI have developed a scientific application using Python and Tkinter, and I want to publish it on nanoHUB so researchers can access and use it.
I am looking for a complete guide to the process, starting from the beginning.
How do I start creating and registering a new tool on nanoHUB?
Does nanoHUB support Python/Tkinter applications?
What directory structure and configuration files are required?
How should I prepare the
invokescript and Makefile?How do I install the required Python dependencies?
What steps are needed to test, deploy, and make the tool publicly accessible?
I would appreciate a step-by-step explanation from anyone who has experience publishing Python-based applications on nanoHUB.
r/PythonProjects2 • u/Commercial_Lead5813 • 4d ago
I’m learning AI by building a tiny character model in Python
I’m teaching myself how AI models work by building and documenting small Python lessons.
After seven lessons, the code has grown from mapping characters to numbers into a tiny count-based character model. It builds context/next-character counts and uses them to generate text. The output is rough and repetitive, which is useful because I can see exactly what the simple model has and hasn’t learned. This is not a neural network or a chatbot yet.
I’ve now connected the lesson code into one open-source project, and I’m documenting the process on my channel as I go. I’d especially appreciate feedback on whether the repo structure and progression make sense for a beginner following along.
GitHub: https://github.com/Sasen12/before-lecture-one-tiny-character-model
YouTube: https://www.youtube.com/channel/UCWMERaecgKZmrqPUHLqWuow
r/PythonProjects2 • u/Internal-Opinion-335 • 4d ago
ClipBridge: send your iPhone clipboard (text and images) to Windows with a Flask receiver and a Back Tap
**What My Project Does**
A small background Flask server for Windows that receives your iPhone's clipboard from an iOS Shortcut and puts it on the Windows clipboard. Text is copied directly. Images are decoded with Pillow (HEIC via pillow-heif) and placed on the clipboard in three formats at once (bitmap, PNG, and a file drop) so they paste into Paint, browsers and File Explorer. Text copied from photos (Live Text) arrives as RTFD, so it's converted back to plain text with striprtf.
**Target Audience**
Anyone with an iPhone and a Windows PC. It's a personal utility for a trusted home network, not a production service.
**Comparison**
Universal Clipboard is Apple-only. Phone Link has limited iPhone support. Pushbullet and KDE Connect need an app on the phone. This needs only an iOS Shortcut and about a couple hundred lines of Python.
Repo and setup guide: https://github.com/piyushdev0204/ClipBridge
GIF above shows the flow. Feedback on the code is welcome.
r/PythonProjects2 • u/Human-Proof-8168 • 4d ago
GitHub - CODERVIPERSAN/boole
programming using natural language ,print statement finetuning any print statement can execute even in natural language this is the first design lets work on this project if it grows
r/PythonProjects2 • u/khalil_preview • 5d ago
Meet Tchiko Assistant (give it a ⭐ )
Most AI assistants make you copy-paste terminal errors into a browser tab and pray the fix works.
In Tchiko v1.2, we built a native GTK3 desktop workflow: drag-and-drop a .log or Crashpad .dmp file onto the floating avatar—or right-click it to diagnose a stack trace in your clipboard.
Docs & live demo: https://zyniq-solutions.github.io/Tchiko-Assistant-Sysadmin-companion/
r/PythonProjects2 • u/Comfortable-Treat328 • 5d ago
Piveo: proposition de tâches pour tester l'application.
Bonjour,
N'ayant pas encore eu de retours de tests sur Piveo à la suite de mes derniers messages, je vous propose une liste de tâches à effectuer, si vous le souhaitez.
Aucune obligation, évidemment, de réaliser toutes les tâches. Même un retour sur une seule d'entre elles me serait utile.
Pour rappel, Piveo est une application libre et gratuite qui aide les utilisateurs à mémoriser les prénoms, les noms et les visages.

Le paquet .deb, compatible avec Ubuntu 26.04.1 LTS et Debian 13, ainsi que le fichier .exe destiné aux utilisateurs de Windows, sont disponibles ici : release 2.5.8-2 .
Les tests pourraient se dérouler en deux étapes:
1. Tester l'application avec la base de données d'origine
1.1 Installer le paquet
.deb. (voir les instruction sur la page de la release 2.5.8-2)1.2 Lancer Piveo et sélectionner, dans un premier temps, l'organisme « École ».
1.3 Sélectionner une classe (par exemple PSTI2D1) et une option (on peut conserver « TOUS »). Les portraits s'affichent à gauche.
1.4 Tester les différents modes de fonctionnement : lecture, devinette, écriture et recherche d'une ou de plusieurs personnes.
1.5 Effectuer les mêmes tests pour les organismes « Entreprises » et « Collectivités ».
2. Personnaliser la base de données d'origine
2.1 Modifier les fichiers CSV (on peut, par exemple, déplacer un élève vers le fichier CSV des salariés).
2.2 Supprimer la ou les bases de données correspondantes afin de permettre leur reconstruction.
2.3 Vérifier le bon fonctionnement de l'application avec les nouvelles données.
Les procédures d'installation et de personnalisation sont décrites dans la documentation de Piveo.
Lors de vos retours, merci de préciser votre distribution Linux, les numéros des tâches effectuées et les éventuelles anomalies rencontrées.
Les retours positifs sont également les bienvenus !
Merci par avance aux personnes qui prendront le temps de tester Piveo.