semvec/pypi-packages huggingface dataset:
rustpam 0.2.1
High-performance PAM (k-medoids) clustering implemented in Rust with Python bindings
Requires Python: >=3.10
Keywords: clustering, k-medoids, PAM, machine-learning, rust, parallel

# RustPAM

High-performance k-medoids (based on OneBatchPAM) clustering with a Rust core.

[![PyPI version](https://badge.fury.io/py/rustpam.svg)](https://badge.fury.io/py/rustpam)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![CI](https://github.com/Hanziwww/rustpam/workflows/CI/badge.svg)](https://github.com/yourusername/rustpam/actions)
[![Rust](https://img.shields.io/badge/rust-1.75+-orange.svg)](https://www.rust-lang.org/)
[![PyO3](https://img.shields.io/badge/PyO3-0.23-blue.svg)](https://pyo3.rs/)
[![Rayon](https://img.shields.io/badge/Rayon-parallel-green.svg)](https://github.com/rayon-rs/rayon)
[![NumPy](https://img.shields.io/badge/NumPy-compatible-blue.svg)](https://numpy.org/)
[![Maturin](https://img.shields.io/badge/built%20with-maturin-orange.svg)](https://www.maturin.rs/)


## Installation

Install from PyPI:

```bash
pip install rustpam
```

For development installation:

```bash
# Clone the repository
git clone https://github.com/yourusername/rustpam.git
cd rustpam

# Install in development mode
pip install maturin
maturin develop --release
```

## Quick Start

```python
import numpy as np
from rustpam import OneBatchPAM

# Sample data
X = np.random.randn(1000, 10).astype(np.float32)

# Create and fit model
model = OneBatchPAM(
    n_medoids=3,
    distance="euclidean",
    max_iter=50,
    random_state=42,
    n_threads=2,
)
model.fit(X)

# Results
print("Medoid indices:", model.medoid_indices_)
print("Inertia:", model.inertia_)
print("Iterations:", model.n_iter_)

# Predict new samples
X_new = np.random.randn(20, X.shape[1]).astype(np.float32)
labels = model.predict(X_new)
print("Predicted labels:", labels)
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgments

- **[Rust](https://www.rust-lang.org/)** 🦀 - Memory-safe systems programming language
- **[PyO3](https://pyo3.rs/)** 🐍 - Rust bindings for Python
- **[Maturin](https://www.maturin.rs/)** 📦 - Build and publish Rust-based Python packages
- **[Rayon](https://github.com/rayon-rs/rayon)** ⚡ - Data parallelism library for fearless concurrency
- **[ndarray](https://github.com/rust-ndarray/ndarray)** 🔢 - N-dimensional arrays for numerical computing
jh2 5.0.10
HTTP/2 State-Machine based protocol implementation
Requires Python: >=3.7
Keywords: http2, hpack, h2

==========================
jh2: HTTP/2 Protocol Stack
==========================

This repository is a fork of the well known hyper/h2 package. We want to provide a cleaner and faster HTTP/2
state machine while keeping a pure Python implementation. We decided to embed the leaf dependencies as we want
a neater dependency tree and along with that a easier maintenance burden. We believe it was a mistake to ship
three packages (h2, hpack, and hyperframe).

Analysis shown that h2 spend a lot of time doing hpack encode and decode operations, this is why we decided to offer
a complementary optimized build. The pure Python version will still be available.

This repository contains a pure-Python implementation of a HTTP/2 protocol
stack. It's written from the ground up to be embeddable in whatever program you
choose to use, ensuring that you can speak HTTP/2 regardless of your
programming paradigm.

You use it like this:

.. code-block:: python

    import jh2.connection
    import jh2.config

    config = jh2.config.H2Configuration()
    conn = jh2.connection.H2Connection(config=config)
    conn.send_headers(stream_id=stream_id, headers=headers)
    conn.send_data(stream_id, data)
    socket.sendall(conn.data_to_send())
    events = conn.receive_data(socket_data)

This repository does not provide a parsing layer, a network layer, or any rules
about concurrency. Instead, it's a purely in-memory solution, defined in terms
of data actions and HTTP/2 frames. This is one building block of a full Python
HTTP implementation.

To install it, just run:

.. code-block:: console

    $ python -m pip install jh2

Documentation
=============

Documentation is available at https://h2.readthedocs.io .

Contributing
============

``jh2`` welcomes contributions from anyone! Unlike many other projects we
are happy to accept cosmetic contributions and small contributions, in addition
to large feature requests and changes.

Before you contribute (either by opening an issue or filing a pull request),
please `read the contribution guidelines`_.

.. _read the contribution guidelines: http://python-hyper.org/en/latest/contributing.html

License
=======

``jh2`` is made available under the MIT License. For more details, see the
``LICENSE`` file in the repository.

Authors
=======

``h2`` was authored by Cory Benfield and is maintained by the Jawah OSS organization under the ``jh2`` name.