semvec/pypi-packages huggingface dataset:
raphson-music-headless 1.5.0
Headless music player server for the Raphson music player
Requires Python: >=3.11

# Headless playback client for Raphson Music

Client for the [Raphson Music server](https://codeberg.org/raphson/music-server) that can be controlled remotely via a simple web interface or [Home Assistant](https://codeberg.org/raphson/music-headless-ha/).

## Choose a player backend

* `mpv` (recommended): requires libmpv
  * Debian: `apt install libmpv2`
  * Fedora: `dnf install mpv-libs`
* `vlc`: requires libvlc
  * Debian: `apt install vlc`
  * Fedora: `dnf install vlc-libs`

## Installation

Install pipx using your system package manager.

```
pipx install --global raphson-music-headless[mpv]
```
or
```
pipx install --global raphson-music-headless[vlc]
```
or, for the latest development version:
```
pipx install --global "raphson_music_headless[mpv] @ git+https://codeberg.org/raphson/music-headless.git"
```

Run: `raphson-music-headless`

## Usage

1. Create a `config.json` file with credentials (see `config.json.example`).
2. Run `raphson-music-headless --config config.json`

By default, the program looks for a configuration file at `/etc/raphson-music-headless.json`.

See [config.md](./docs/config.md) for a list of options.

## API

See [API.md](./docs/API.md)

## Temporary files (VLC backend only)

The server writes music to temporary files so VLC can access them. On Linux, the `/tmp` directory is used for this purpose. It is strongly recommended to mount `tmpfs` on `/tmp` to avoid unnecessary writes to your disk, especially when using a Raspberry Pi with sd card.

Check if it is the case by running `mount | grep /tmp`. It should show something like: `tmpfs on /tmp type tmpfs ...`

## Cache size

The `cache_size` setting determines the number of cached tracks for each playlist. These tracks are kept in memory, consuming roughly 3 - 6MB per track including cover image. Say `cache_size` is set to 4 and you use a maximum of 10 playlists, you will need around 200MiB of memory.

## Bugs

When playing mono audio (like news), sound may only be played on the left channel. This appears to be an issue with PipeWire.
permem 0.1.0
Persistent memory for AI - add memory to any LLM in one line
Requires Python: >=3.9
Keywords: ai, anthropic, embeddings, llm, memory, openai, rag, vector

# Permem Python SDK

Persistent memory for AI - add memory to any LLM in one line.

## Installation

```bash
pip install permem
```

## Quick Start

```python
import asyncio
import permem

async def main():
    # Store a memory
    await permem.memorize("User's name is Ashish")

    # Recall memories
    result = await permem.recall("What is the user's name?")
    for memory in result.memories:
        print(memory["summary"])

asyncio.run(main())
```

## Usage Modes

### Tools Mode (Manual Control)

```python
from permem import Permem

async def main():
    mem = Permem(user_id="user-123")

    # Store memories
    await mem.memorize("User prefers dark mode")

    # Search memories
    result = await mem.recall("user preferences", limit=5)
```

### Auto Mode (Automatic Memory Management)

```python
from permem import Permem

async def chat_with_memory(user_message: str, user_id: str):
    async with Permem(api_key="pk_your_api_key") as mem:
        # Before LLM call - inject relevant memories
        context = await mem.inject(user_message, user_id=user_id)

        system_prompt = "You are a helpful assistant."
        if context.should_inject:
            system_prompt += f"\n\n{context.injection_text}"

        # ... call your LLM ...
        assistant_response = "Nice to meet you!"

        # After LLM response - extract new memories
        messages = [
            {"role": "user", "content": user_message},
            {"role": "assistant", "content": assistant_response}
        ]
        await mem.extract(messages, user_id=user_id)
```

## Configuration

### Environment Variables

```bash
export PERMEM_URL="http://localhost:3333"
export PERMEM_USER_ID="default"
export PERMEM_API_KEY="your-api-key"
```

### Programmatic Configuration

```python
from permem import Permem, configure

# Configure singleton
configure(
    url="http://localhost:3333",
    user_id="user-123",
    api_key="your-api-key"
)

# Or create instance
mem = Permem(
    url="http://localhost:3333",
    user_id="user-123",
    api_key="your-api-key",
    max_context_length=8000
)
```

## API Reference

### memorize(content, conversation_id=None, async_mode=False)

Store a memory.

### recall(query, limit=5, mode="balanced", conversation_id=None)

Search memories by semantic similarity.

Modes:
- `"focused"` - Higher precision, fewer results
- `"balanced"` - Default balance
- `"creative"` - Broader matches

### inject(message, user_id, context_length=0, conversation_id=None)

Get relevant memories before LLM call. Returns `InjectResponse` with `memories`, `injection_text`, and `should_inject`.

### extract(messages, user_id, context_length=None, conversation_id=None, extract_threshold=None, async_mode=False)

Extract memories from conversation after LLM response. Returns `ExtractResponse` with `should_extract`, `extracted`, and `skipped_duplicates`.

### health()

Check if the Permem server is healthy.

## License

MIT
hangman-tools 0.1.7
Tools for playing and running hangman-like word games
Requires Python: >=3.13

# hangman-tools

There are two tools here to help with running or playing Hangman style
games online.

  * [hangman-regexp.py](https://github.com/davemq/hangman-tools/blob/main/hangman-regexp.py) creates a regular expression from a hangman
    style expression, which allows searching with tools like `grep`
  * [make-hangman-phrase.py](https://github.com/davemq/hangman-tools/blob/main/make-hangman-phrase.py) creates a hangman style expression from
    plain text. It also has an option to add guesses. It provides the
    hangman style expression, the number of occurrences of guesses
    letters, and a list of wrong guesses.
fw-gear-file-metadata-importer 1.7.2
Extract metadata of input file to Flywheel.
Requires Python: ~=3.11

# File metadata importer

file-metadata-importer is a Flywheel Gear that imports metadata header of file and
indexes them in Flywheel.

## Documentation

The documentation of the gear can be found
[at this link](https://flywheel-io.gitlab.io/scientific-solutions/gears/file-metadata-importer/index.html).

## Contributing

Please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) file for information on how to
contribute to the gear.
modu 0.1.1
Modular arithmetic in Python
Requires Python: >=3.9

**Modu** is a mathematical module for doing modular arithmetic in Python. 

**In a nutshell**, Modu allows you defining sets of residue classes for given moduli. These are displayed with usual notations of modular arithmetic like `n ≡ {0, ±2, +3} (mod 6)` or, in Jupyter Notebooks, with instantaneous LaTeX formula rendering. New sets can be computed from existing ones using set operations (union, intersection, complement), as well as  arithmetic operations (addition, negation, multiplication, division, exponentiation). Samples of integers can be obtained, displayed as tables (aligning same residues in same columns) and possibly transforming the elements by user-defined functions. Several fundamental results of number theory can be easily illustrated, like the sieve of Eratosthenes, Fermat's little theorem, Chinese remainder theorem and Dirichlet's theorem on arithmetic progressions.

Thanks to Python's operator overloading, Modu allows expressing advanced operations in very few keystrokes, often as one-liners. Here are few examples.
* integers having residue 0 modulo 2 (the even numbers):
```
>>> from modu import O
>>> O % 2
0 (mod 2)
```
* integers multiples of 2 or 3, defined by set union:  
```
>>> O%2 | O%3
{0, ±2, +3} (mod 6)
```
* integers not multiples of 2 or 3, defined by complement of the previous set:
```
>>> ~(O%2 | O%3)
±1 (mod 6)
```
* testing whether 15 and 23 belong to the previous set (note: any prime number greater or equal to 5 belongs to this set!):
```
>>> 15 in ~(O%2 | O%3)
False
>>> 23 in ~(O%2 | O%3)
True
```
* integers multiples of 2 and 3 altogether, defined by set intersection--see Chinese remainder theorem:
```
>>> O%2 & O%3
0 (mod 6)
```
* checking whether two sets are equivalent or not:
```
>>> O%2 | O%3 == (0, 2, 3, 4) + O%6
True
>>> O%2 & O%3 == O%6
True
>>> O%2 | O%3 != O%6
True
```
Modu provides much more functions, like changing the display format or extracting / transforming samples using a table layout. Modu is best used as an interactive calculator in Python terminal sessions (REPL) or in Jupyter Notebooks with instantaneous LaTeX rendering. The prime target domain is research and education in **number theory**.

All those features are demonstrated in an interactive tutorial, the **"_Modutorial_" Jupyter Notebook** (modutorial.ipynb). This can be opened directly online by clicking here (binder): [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/piedenis/Modu/HEAD?urlpath=%2Fdoc%2Ftree%2Fsrc%2Fmodutorial.ipynb) (be patient: you have to wait a bit...)

Modu is an open-source module distributed under the **MIT license**.