🟧 I just published `auserial` on PyPI — a truly async serial port for Linux/macOS in ~80 lines of standard library code. The problem: none of the existing libraries are satisfying for asyncio code. • `pyserial` blocks the entire thread on read() → freezes the event loop. • `aioserial` wraps pyserial in run_in_executor → one thread per I/O. • `pyserial-asyncio` forces Transport/Protocol → verbose, callback-driven. `auserial` plugs the file descriptor directly into the asyncio loop via add_reader / add_writer — which means epoll on Linux, kqueue on macOS. Zero threads, zero polling, just the kernel notifying when the fd is ready. async with AUSerial("/dev/ttyUSB0") as serial: await serial.write(b"AT\r\n") data = await serial.read() While one coroutine is parked on a read(), the others keep running normally — that's the whole point. No external dependencies. Just os, termios, asyncio. PEP 561 compliant (types propagate to consumers), tested via PTY. 🔗 PyPI: pypi.org/project/auserial 🔗 Code: https://lnkd.in/eFftFZdQ Feedback welcome — and if you have a use case where pyserial-asyncio made you grit your teeth, I'd love to hear about it. #Python #asyncio #OpenSource #SerialPort #Embedded #Linux #macOS
Olivier Monnom’s Post
More Relevant Posts
-
The Exploration project is a modular Command and Control framework designed for red team operations. It includes a C++ TeamServer, a Python client, and packaging for both Windows and Linux. The TeamServer oversees listeners and sessions, while the Python client communicates with it via gRPC, facilitating various listener channels and offering comprehensive documentation and tutorials. 🔗 https://lnkd.in/gYApCaWV
To view or add a comment, sign in
-
Most engineers use Linux every day. But only a few really understand what happens when a command is executed. For Example: uvicorn main:app --reload (A simple way to run a Python FastAPI app) Linux does much more than simply “run” it. Behind the scenes, it: → Creates a new process using fork() → Replaces it with your application using exec() → Optimizes memory using Copy-On-Write (COW) → Tracks everything using PID & PPID These are not just low-level OS concepts. They are the same foundations behind: → Docker containers → Kubernetes pods → Modern backend systems Once you understand this layer, debugging, performance tuning, and system design become much clearer. Sometimes, going deeper into the basics gives you the biggest advantage.
To view or add a comment, sign in
-
-
I needed speech-to-text on Linux. The options were: ❌ Cloud-based (privacy concern) ❌ GUI apps (I use i3 tiling WM, no floating windows) ❌ Fixed recording duration (awkward to use) ❌ GPU-locked (I need my GPU for ML training) So I built Voxd — a daemon-based, local-only dictation tool. How it works: 1. Background daemon loads Whisper model on first use 2. Hotkey triggers recording via Unix socket 3. WebRTC VAD detects when you stop speaking 4. faster-whisper transcribes locally on CPU 5. xdotool types the result into your focused window The entire thing is two files: a Python daemon and a bash trigger script. Shipped it, open-sourced it. GitHub: https://lnkd.in/dkUcPkDv #OpenSource #Linux #AI #SpeechToText #BuildInPublic
To view or add a comment, sign in
-
The problem was simple: I run a tiling window manager (i3) on Linux. Every dictation tool I found was either cloud-based, Mac/Windows only, or needed a full desktop environment. I wanted to press a key, speak, and have text appear. That's it. The hard part was accuracy. Whisper's small model kept hearing "according" when I said "recording." Indian English accent + a lightweight model = unusable output. So I ran a proper model comparison: → small: fast but butchered my accent → small.en: somehow worse → medium: better, but inconsistent → medium + language="en" + initial_prompt: almost perfect That initial_prompt trick was the unlock. You feed Whisper a prompt with your expected vocabulary — technical terms, domain-specific words — and it biases the decoder toward them. Massive accuracy jump for zero extra compute. Then came the fun bugs: 1. VAD (voice activity detection) never stopped recording. Every single audio frame showed maximum amplitude. Root cause? Mic gain was at 100%, causing constant clipping. Every frame looked like speech. Fix: set gain to 30%. 2. Python 3.14 broke everything. ctranslate2 (faster-whisper's backend) doesn't ship wheels for 3.14 yet. Had to fall back to a Python 3.12 venv. 3. setuptools 82+ silently removed pkg_resources — which webrtcvad depends on. Pin to <81. The architecture: a persistent daemon that lazy-loads the model on first use, auto-unloads after 5 minutes idle (frees ~5.7GB RAM), and communicates via Unix socket. The hotkey trigger is a one-liner shell script. Result: Mod+Shift+V → speak naturally → auto-stops on silence → transcribes → pastes into the focused window. Fully local. Fully offline. Built for how I actually work. #OpenSource #Linux #AI #Whisper #BuildInPublic #SpeechToText
I needed speech-to-text on Linux. The options were: ❌ Cloud-based (privacy concern) ❌ GUI apps (I use i3 tiling WM, no floating windows) ❌ Fixed recording duration (awkward to use) ❌ GPU-locked (I need my GPU for ML training) So I built Voxd — a daemon-based, local-only dictation tool. How it works: 1. Background daemon loads Whisper model on first use 2. Hotkey triggers recording via Unix socket 3. WebRTC VAD detects when you stop speaking 4. faster-whisper transcribes locally on CPU 5. xdotool types the result into your focused window The entire thing is two files: a Python daemon and a bash trigger script. Shipped it, open-sourced it. GitHub: https://lnkd.in/dkUcPkDv #OpenSource #Linux #AI #SpeechToText #BuildInPublic
To view or add a comment, sign in
-
Tired of setting up your dev machine every time? 🐧 BDH Linux is a custom Linux environment built for Backend Developers on Arch/Manjaro os One command. Everything ready. pipx install bdh-linux bdh-linux install all ✅ Python 3.12+ ✅ FastAPI + PostgreSQL ✅ ZSH + Oh My Zsh ✅ Cyberpunk terminal theme ✅ BDH aliases pre-configured No more wasting hours on setup. Just code. ⚡ Works on: Arch / Manjaro Linux 🔗 https://lnkd.in/gZJS29vZ BackendDeveloperHub #Linux #Manjaro #ArchLinux #BackendDevelopment #OpenSource #FastAPI #Python #DeveloperTools
To view or add a comment, sign in
-
Tired of setting up your dev machine every time? 🐧 BDH Linux is a custom Linux environment built for Backend Developers on Arch/Manjaro. One command. Everything ready. pipx install bdh-linux bdh-linux install all ✅ Python 3.12+ ✅ FastAPI + PostgreSQL ✅ ZSH + Oh My Zsh ✅ Cyberpunk terminal theme ✅ BDH aliases pre-configured No more wasting hours on setup. Just code. ⚡ Works on: Arch / Manjaro Linux 🔗 https://lnkd.in/gZJS29vZ #Linux #Manjaro #ArchLinux #BackendDevelopment #OpenSource #FastAPI #Python #DeveloperTools
To view or add a comment, sign in
-
𝐃𝐚𝐲 𝟐𝟗 = 𝐋𝐢𝐧𝐮𝐱 𝐒𝐞𝐫𝐢𝐞𝐬 = 𝐌𝐚𝐬𝐭𝐞𝐫 𝐋𝐢𝐧𝐮𝐱: 𝐔𝐧𝐝𝐞𝐫𝐬𝐭𝐚𝐧𝐝𝐢𝐧𝐠 𝐒𝐨𝐟𝐭 𝐋𝐢𝐧𝐤𝐬 𝐢𝐧 𝟔𝟎 𝐒𝐞𝐜𝐨𝐧𝐝𝐬! Ever wondered how to create shortcuts in Linux for those deeply nested files? 👉 Command: Use ln -s [target] [link_name] to create a link. 👉 The "Shortcut" Metaphor: Unlike hard links, a soft link is just a pointer. If the original file is gone, the link breaks. 👉 Efficiency: Perfect for simplifying long file paths. Instead of typing /temp/projects/logs/app.log, just link it to app_log and save time! Check out the full explanation here: 🔗 https://lnkd.in/guaPK9iE #Linux #DevOps #CodingTips #TechEducation #LinuxCommands #SoftLinks #Programming
To view or add a comment, sign in
-
-
As of yesterday's run on doesjitgobrrr.com, Python 3.15 with the JIT enabled made the FastAPI benchmark: - 1% faster on RPi (blueberry) - 2% faster on Windows (prometheus) - 6% faster on Ubuntu 24.04 (ripley) - 13% faster on macOS M3 Pro (jones)! https://lnkd.in/g5Xkwj4B
To view or add a comment, sign in
-
-
🚀 BDH Linux just hit 3,600+ downloads in its first week on PyPI! Honestly didn't expect this. I built BDH Linux to solve my own problem — wasting 3+ hours setting up a fresh Linux machine every time. Turns out, other developers had the same pain. 📦 What is BDH Linux? An automated setup script that transforms a fresh Manjaro/Arch system into a full backend workspace in under 10 minutes. ✨ Pre-configured with: 🐍 Python 3.12+ & FastAPI 🐘 PostgreSQL & Docker 🎨 Cyberpunk ZSH terminal theme ⚙️ bdh-fastapi-new CLI — instant FastAPI scaffolding ⚡ Philosophy: "Install once — start coding immediately." 3,600 downloads in week 1 is just the beginning. Phase 2 — standalone Arch ISO — is coming. 🔥 🔗 GitHub: https://lnkd.in/gtJMSRbQ Drop a ⭐ if this sounds useful! #OpenSource #Linux #Python #FastAPI #BackendDevelopment #ArchLinux #DeveloperTools
To view or add a comment, sign in
-
-
🚀 BrowserPod 2.0 is here — and it's a game-changer for in-browser development. Now you get a real bash shell, git, and Linux utilities running as WebAssembly sandboxes. Clone repos, run npm, execute Python scripts... all safely in the browser. Perfect for Web IDEs, AI agents, and live demos. No more hacks. Just Linux, in your browser. Try it: console.browserpod.io #WebAssembly #DevTools #WebDevelopment
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
You should put on crayes.io better than github