A tool that removes the backgrounds from arbitrary images, leaving a particular part on a transparent layer. onnxruntime enabled, otherwise it has to be installed with CPU support, GPU support, and/or CLI support explicitly. Can also be used as a Python module.
A lightweight, object-oriented state machine implementation in Python with many extensions. Compatible with Python 2.7+ and 3.0+.
PyWayland provides a wrapper to the libwayland library using the CFFI library to provide access to the Wayland library calls and written in pure Python. Requires the cffi package. In order to run from source, you will need to generate the interfaces to the Wayland protocol objects as defined in the wayland.xml file. By default, this file will be located in /usr/share/wayland/wayland.xml.
I'm still not sure what it's good for, though.
pyMC_Core is a Python reimplementation of MeshCore — a lightweight, portable C++ library for multi-hop packet routing using LoRa radios. Designed for Raspberry Pi and similar hardware, pyMC_Core communicates with LoRa modules over SPI.
A library for building powerful interactive command line and terminal applications in Python. It can be a very advanced pure Python replacement for GNU readline, but it can also be used for building full screen applications.
Syntax highlighting of the input while typing. (For instance, with a Pygments lexer.) Multi-line input editing. Advanced code completion. Select text for copy/paste. Has both Emacs and Vi style keybindings. Mouse support for cursor positioning and scrolling. Auto suggestions. Carries no global state. Forward and reverse incremental search. Works well with Unicode double width characters.
Whisper is a general-purpose speech recognition model. It is trained on a large dataset of diverse audio and is also a multitasking model that can perform multilingual speech recognition, speech translation, and language identification. A Transformer sequence-to-sequence model is trained on various speech processing tasks, including multilingual speech recognition, speech translation, spoken language identification, and voice activity detection. These tasks are jointly represented as a sequence of tokens to be predicted by the decoder, allowing a single model to replace many stages of a traditional speech-processing pipeline. The multitask training format uses a set of special tokens that serve as task specifiers or classification targets. Multiple models are available. CLI tool, can be used as a Python module.
A relational database for Micropython using btrees. Queries are represented as hash tables in your code. Databases are written out as btree files. Has a server component.
A utility which, when given a number of adjacent subnets figures out how to gather them into a larger one to make management easier. Can also be used as a Python module.
Coffy is a lightweight, local-first embedded database engine supporting NoSQL, SQL, and Graph models — all in pure Python. Designed for fast prototyping, scripting, and local apps. Local persistence - possible back ends are JSON documents and SQLite databases. Has an in-memory only mode. No server needed. Supports logic and comparison operators. Unified query interface.
Ever used asyncio and wished you hadn't? tinyio is a dead-simple event loop for Python, born out of my frustration with trying to get robust error handling with asyncio. This is an alternative for the simple use-cases, where you just need an event loop and want to crash the whole thing if anything goes wrong. (Raising an exception in every coroutine so it can clean up its resources.)
An error in one coroutine will cancel all coroutines across the entire event loop. Can nest tinyio loops inside each other, none of this one-per-thread business. Ludicrously simple. No need for futures, tasks, etc. Super simple API.
Telert is a lightweight utility for multi-channel notifications for alerting when terminal commands or Python code completes. It also extends this notification capability to easily monitor processes, log files, and HTTP endpoints uptime. The tool supports multiple notification channels:
Use it as a CLI tool, Python library, or a notification API.
PyGAD is an open-source easy-to-use Python 3 library for building the genetic algorithm and optimizing machine learning algorithms. It supports Keras and PyTorch. PyGAD supports optimizing both single-objective and multi-objective problems.
Automat is a library for concise, idiomatic Python expression of finite-state automata (particularly deterministic finite-state transducers).
Rather than adding tedious if checks to every single method to make sure that each of these flags are exactly what you expect, you can use a state machine to ensure that if your code runs at all, it will be run with all the required values initialized, because they have to be called in the order you declare them.
Automat is designed around this principle: while organizing your code around state machines is a good idea, your callers don't, and shouldn't have to, care that you've done so. In Python, the "input" to a stateful system is a method call; the "output" may be a method call, if you need to invoke a side effect, or a return value, if you are just performing a computation in memory. Most other state-machine libraries require you to explicitly create an input object, provide that object to a generic "input" method, and then receive results, sometimes in terms of that library's interfaces and sometimes in terms of classes you define yourself.
PursuedPyBear, also known as ppb, exists to be an educational resource. Most obviously used to teach computer science, it can be a useful tool for any topic that a simulation can be helpful.
At its core, ppb provides a number of features that make it perfect for video games. The GameEngine itself provides a pluggable subsystem architecture where adding new features is as simple as subclassing and extending System. Additionally, it contains a state stack of Scenes simple containers that let you organize game scenes and UI screens in a simple way.
The entire system uses an event system which is as extensible as the rest of the system. Register new values to existing event types, and even overwrite the defaults. Adding a new event type to the system is as simple as firing an instance of your new event class with signal. Instead of a publisher system, the engine knows everything in its own scope and only calls objects with appropriate callbacks. The most basic event is Update and your handlers should match the signature on_update(self, update_event, signal).
This project presents and utilizes YAML Paths, which are a powerful, intuitive means of identifying one or more nodes within YAML, EYAML, or compatible data structures like JSON. Both dot-notation (inspired by Hiera) and forward-slash-notation (influenced by XPath) are supported. The libraries (modules) and several command-line tool implementations are provided. With these, you can build YAML Path support right into your own application or easily use its capabilities right away from the command-line to retrieve, update, merge, validate, and scan YAML/JSON/Compatible data.
This implementation of YAML Path is a query language in addition to a node descriptor. With it, you can describe or select a single precise node or search for any number of nodes that match some criteria. Keys, values, elements, anchors, and aliases can all be searched at any number of levels within the data structure using the same query. Collectors can also be used to gather and further select from otherwise disparate parts of the source data.
Basically, it's like JSONpath, but for YAML.
While the MicroPython community is amazing at making powerful packages that make embedded development a dream, historically it has been painful to actually find what has previously been made. This has lead to a lot of re-created wheels.
mim aims to solve this problem by providing a singular place to find all MicroPython packages that can be installed with mip, making the process for installation consistent and providing a clear command to follow to get running with the package you need.
mim contains both "Official" MicroPython packages (from the micropython-lib repo) and "Community" packages, open-source packages submitted by the users of mim.
A single file library for easily adding evaluatable expressions into python projects. Say you want to allow a user to set an alarm volume, which could depend on the time of day, alarm level, how many previous alarms had gone off, and if there is music playing at the time. Or if you want to allow simple formulae in a web application, but don't want to give full eval() access, or don't want to run in javascript on the client side. It's deliberately trying to stay simple to use and not have millions of features, pull it in from PyPI, or even just a single file you can pull into a project.
Internally, it's using the amazing python ast module to parse the expression, which allows very fine control of what is and isn't allowed. It should be completely safe in terms of what operations can be performed by the expression.
The only issue I know to be aware of is that you can create an expression which takes a long time to evaluate, or which evaluating requires an awful lot of memory, which leaves the potential for DOS attacks. There is basic protection against this, and you can lock it down further if you desire.
Torrent file parsing and creation with pydantic (and models for other bittorrent things too). Can create and parse v1, v2, hybrid, and other BEPs. Is focused on library usage (but does cli things too). Validates torrent files. Treats .torrent files as an extensible rather than fixed format.
This retro-computing project restores support for x87 floating-point unit (FPU) emulation in the NetBSD kernel, targeting legacy 486SX-class processors without hardware FPUs. It brings back the original MATH_EMULATE option into NetBSD 10.x and beyond, as well as reverts and reworks the changes introduced in commit dfe83e0, which removed FPU emulation support from the kernel.
A pure Python implementation of the MySQL client protocol. Does not require the presence of the MySQL or MariaDB development libraries to install.