semvec/pypi-packages huggingface dataset:
aspire-inference 0.1.0a16
Accelerate Sequential Posterior Inference via REuse
License: MIT
Requires Python: >=3.10

# aspire: Accelerated Sequential Posterior Inference via REuse

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15658747.svg)](https://doi.org/10.5281/zenodo.15658747)
[![PyPI](https://img.shields.io/pypi/v/aspire-inference)](https://pypi.org/project/aspire-inference/)
[![Documentation Status](https://readthedocs.org/projects/aspire/badge/?version=latest)](https://aspire.readthedocs.io/en/latest/?badge=latest)
![tests](https://github.com/mj-will/aspire/actions/workflows/tests.yml/badge.svg)


aspire is a framework for reusing existing posterior samples to obtain new results at a reduced cost.

## Installation

aspire can be installed from PyPI using `pip`. By default, you need to install
one of the backends for the normalizing flows, either `torch` or `jax`.
We also recommend installing `minipcn` if using the `smc` sampler:


**Torch**

We recommend installing `torch` manually to ensure correct CPU/CUDA versions are
 installed. See the [PyTorch installation instructions](https://pytorch.org/)
 for more details.

```
pip install aspire-inference[torch,minipcn]
```

**Jax**:

We recommend install `jax` manually to ensure the correct GPU/CUDA versions
are installed. See the [jax documentation for details](https://docs.jax.dev/en/latest/installation.html)

```
pip install aspire-inference[jax,minipcn]
```

**Important:** the name of `aspire` on PyPI is `aspire-inference` but once installed
the package can be imported and used as `aspire`.

## Quickstart

```python
import numpy as np
from aspire import Aspire, Samples

# Define a log-likelihood and log-prior
def log_likelihood(samples):
    x = samples.x
    return -0.5 * np.sum(x**2, axis=-1)

def log_prior(samples):
    return -0.5 * np.sum(samples.x**2, axis=-1)

# Create the initial samples
init = Samples(np.random.normal(size=(2_000, 4)))

# Define the aspire object
aspire = Aspire(
    log_likelihood=log_likelihood,
    log_prior=log_prior,
    dims=4,
    parameters=[f"x{i}" for i in range(4)],
)

# Fit the normalizing flow
aspire.fit(init, n_epochs=20)

# Sample the posterior
posterior = aspire.sample_posterior(
    sampler="smc",
    n_samples=500,
    sampler_kwargs=dict(n_steps=100),
)

# Plot the posterior distribution
posterior.plot_corner()
```

## Documentation

See the [documentation on ReadTheDocs][docs].

## Citation

If you use `aspire` in your work please cite the [DOI][DOI] and [paper][paper].


[docs]: https://aspire.readthedocs.io/
[DOI]: https://doi.org/10.5281/zenodo.15658747
[paper]: https://arxiv.org/abs/2511.04218
music-genie 0.1.2
Search YouTube for music, identify songs, download as tagged MP3s
License: MIT
Requires Python: >=3.11

# music-genie

Search YouTube for music, identify songs from mic recordings, and download them as tagged MP3s.

Invoked as `mg` or `music-genie`.

## Installation

Requires Python 3.11+ and [uv](https://docs.astral.sh/uv/).

```
uv tool install music-genie        # from PyPI
uv tool install .                  # local dev
```

Recording also requires a system `ffmpeg` (the bundled download binary cannot access audio devices):

```
sudo apt install ffmpeg   # Debian/Ubuntu
brew install ffmpeg       # macOS
sudo dnf install ffmpeg   # Fedora
```

## Usage

**Search and download by query:**
```
mg search "tame impala let it happen"
```
Presents up to 10 YouTube results, prompts for a selection, downloads as MP3, and embeds metadata (artist, album, year, cover art) sourced from MusicBrainz.

**Identify a song from the microphone:**
```
mg listen
```
Records an 8-second snippet, identifies it via Shazam, then flows into search and download. Pass `--save` to queue the snippet for later identification instead.

**List unidentified snippets:**
```
mg pending
```

**Process queued snippets:**
```
mg process
```
Attempts to identify each pending snippet and prompts to search and download. Unidentifiable snippets can be deleted.

## Output layout

Files are saved to `~/Music/<artist>/<title>.mp3` by default.

## Configuration

Settings can be overridden via environment variables or a TOML file at `~/.config/music-genie/config.toml`.

| Key | Default | Description |
|---|---|---|
| `output_dir` | `~/Music` | Download destination |
| `audio_format` | `mp3` | Output format (mp3, m4a, opus, …) |
| `audio_quality` | `192` | Bitrate in kbps |
| `record_duration` | `8` | Snippet length in seconds |

Environment variables use the prefix `MUSIC_GENIE_`, e.g. `MUSIC_GENIE_OUTPUT_DIR=/tmp/music`.

Example config file:

```toml
output_dir = "/home/user/Music"
audio_format = "mp3"
audio_quality = 320
record_duration = 10
```

## Data storage

Snippets and their metadata are stored in `~/.local/share/music-genie/snippets/` as `.wav` + `.json` pairs.

## AI disclaimer

This tool was built with Claude Code, following [my AI policy](https://j23n.com/public/posts/2026/my-ai-policy).

### Tools
- Claude Code (Anthropic) — primary development assistant

### Usage
- **Architecture & design**: Human-driven
- **Implementation**: AI-collaborative (human-directed, AI-written, human-reviewed)
- **Tests**: N/A
- **Documentation**: AI-generated with human review

### Process
AI agents propose changes as a PR, which are reviewed and merged by me. I try to make interactions transparent in the relevant issues or proposed patches. AI-authored commits are tagged with `Co-Authored-By` in the git history.
spendguard-engine 0.1.0
Shared SpendGuard engine for provider adapters, pricing primitives, and billing math
License: MIT
Requires Python: >=3.10

# SpendGuard Engine

Open-source shared engine for SpendGuard wrappers.

Contains:
- Provider adapters (`spendguard_engine.providers`)
- Billing math (`spendguard_engine.billing`)
- Pricing types/defaults (`spendguard_engine.pricing`)
- Shared schemas (`spendguard_engine.schemas`)

Wrapper services (`spendguard-sidecar`, `spendguard-cloud`) should own pricing-source fetching,
auth, storage, and commercial concerns.

## License

MIT. See `LICENSE`.