semvec/pypi-packages huggingface dataset:
macs-cp 0.2.0
A short description of your package.
Requires Python: >=3.6

# Change Point Detection using Wasserstein Distance

macs-cp is a change point detection method based on 1-wasserstein distance and permutation test to detect changes in mean, variance, and both mean and variance. 
For more information see the paper .................

# 🧭 MACS — Wasserstein-Adaptive Change-Point Detection

**MACS** is a fast, non-parametric change-point detection framework that uses  
Wasserstein distances for screening and statistical refinement for mean, variance,  
or joint mean + variance shifts.

---

## 📦 Installation

```bash
pip install macs-cpd
```

(If the name `macs` is taken on PyPI, your package should be published under a unique
name such as `macs-cpd`.)

---

## 🔍 Overview

MACS detects change points in univariate time series using three refinement modes:

| Function | Detects | Refinement method |
|-----------|----------|------------------|
| `macs_cpd_mean()` | Mean shifts | CUSUM |
| `macs_cpd_var()` | Variance shifts | Pooled-mean NLL |
| `macs_cpd_meanvar()` | Mean + variance shifts | Segment-specific NLL |

Each function combines:
1. **Wasserstein screening** – compares adjacent windows via permutation bounds.  
2. **Refinement** – localizes the change point using CUSUM or NLL minimization.  
3. **Voting / aggregation** – merges results across window sizes and reports the
most significant (“leader”) change points.

---

## 🚀 Quick Start Example

Detect a **mean shift** in a univariate time series using `macs_cpd_mean()`.

```python
import numpy as np
from macs import macs_cpd_mean

# Generate synthetic data with a mean shift at t = 300
rng = np.random.default_rng(123)
n = 500
x = np.r_[rng.normal(0.0, 1.0, 300), rng.normal(2.0, 1.0, 200)]

# Run MACS Change Point Detection
cpts, elapsed = macs_cpd_mean(
    series=x,
    window_sizes=[30, 40, 50],
    n_perm=400,
    alpha_q=1.0,    # 1% two-sided tail (as percent)
    seed=7,
    threshold=0.5
)

print("Detected change points (1-based):", cpts)
print(f"Elapsed time: {elapsed:.3f} seconds")
```

**Output (approximate):**
```
Detected change points (1-based): [301]
Elapsed time: 0.82 seconds
```
mariax 1.1
Django ORM & Python library for MariaDB Vector support
Requires Python: <4.0,>=3.12

# mariax

## MariaDB extended helpers focused on Vector support.

### Architecture

                     ┌───────────────────────┐
                     │   Python App          │
                     │(Django / Raw Scripts) │
                     └─────────┬─────────────┘
                               │
                 ┌─────────────▼─────────────┐
                 │       Library Layer       │
                 │       (Mariax)            │
                 └─────────────┬─────────────┘
                               │
               ┌───────────────┴───────────────┐
               │                               │
        ┌──────▼──────┐                 ┌──────▼──────┐
        │ Django ORM  │                 │ SQL/CLI     │
        │ Integration │                 │ Utilities   │
        │ (VectorField│                 │ (DBClient,  │
        │ + Manager)  │                 │ DDL helpers │
        │ + QuerySet) │                 │ query.py)   │
        └──────┬──────┘                 └──────┬──────┘
               │                               │
               │                               │
               ▼                               ▼
        ┌───────────────┐                ┌───────────────┐
        │ Vector Utils  │                │ MariaDB 11.x  │
        │ (serialize /  │<──────────────>│ Vector Column │
        │ deserialize)  │                │ + Vector Index│
        └───────────────┘                └───────────────┘

### TL;DR
* Low-level DB client (client.py)
* Vector utilities (vector.py)
* DDL helpers (ddl.py)
* Raw vector query function (query.py)
* CLI tool for index management (cli.py)
* Django ORM integration (VectorField, VectorManager)
* SQLAlchemy integration (VectorType)

### Installation
```bash
pip install mariax
```

### Example DDL
```python
from mariax.django_integration.fields import VectorField
from mariax.django_integration.managers import VectorManager

class Document(models.Model):
    title = models.CharField(max_length=255)
    embedding = VectorField(dim=768)

    objects = VectorManager()
```

### Example Query
```python
similarity_search(db_client, table="docs", embedding_field="embedding", vector=[...], top_k=5)
# OR
top_docs = Document.objects.similarity_search(query_vector, top_k=5)
```

### Example CLI
```bash
mariax create-index --table docs --name idx_docs_embedding --fields embedding --distance cosine
```
tgup 0.1.8
Upload files to Telegram using your account
Requires Python: >=3.11
Keywords: telegram-upload, telethon, telegram, upload

# tgup

![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tgup?link=https%3A%2F%2Fpypi.org%2Fproject%2Ftgup%2F)
![PyPI - Status](https://img.shields.io/pypi/status/tgup?link=https%3A%2F%2Fpypi.org%2Fproject%2Ftgup%2F)
![PyPI - Version](https://img.shields.io/pypi/v/tgup?link=https%3A%2F%2Fpypi.org%2Fproject%2Ftgup%2F)

Upload files to Telegram using your account.

This project is partially based on [telegram-upload](https://github.com/Nekmo/telegram-upload) by [Nekmo](https://github.com/Nekmo),
it was recreated because the original project seems abandoned.

[PyPI page](https://pypi.org/project/tgup/)

## Installation

With pipx (**preferred method**):
```bash
pipx install tgup
```

With pip:
```bash
pip install tgup
```

## Usage

To use this program you need an Telegram account and your **App api_id & api_hash** (get it in
[my.telegram.org](https://my.telegram.org)). The first time you use tgup it requests your
**telephone number**, **api_id** and **api_hash**. Bot tokens can not be used with this program (bot uploads are limited to
50MB).

To send files:
```bash
tgup dir1/ file1 dir2/abc/
```
It will send the files to your personal chat.

To see all the options, run: `tgup --help`

## Acknowledgements

- Based on [telegram-upload](https://github.com/Nekmo/telegram-upload)

## License

This project is released under the [GPL 3.0 or later](LICENSE) license.
dexact 1.2.0
A very simple Python package which provides the necessary tools to interact with dexetera
Requires Python: >=3.6

# dexAct

This Python package provides the necessary tools to interact with [dexetera](https://github.com/umbralcalc/dexetera). The two key imports are the `ActionTaker` protocol and the `launch_websocket_server` function.

## Overview

dexAct enables Python code to interact with a dexetera simulation via WebSocket. The simulation sends partitioned state data, and your Python code responds with actions to take.

## How It Works

- A WebSocket server is launched on `ws://localhost:2112`
- The simulation sends `PartitionState` messages containing:
  - `cumulative_timesteps`: the current simulation time
  - `partition_name`: the name of the partition (used as a key)
  - `state`: a list of float values for that partition
- When all expected partitions are received (based on the number of partition keys), your `take_next_action` method is called
- Your method returns a list of floats representing the action to take
- The action is sent back to the simulation via WebSocket

## Usage

Create a class that implements the `ActionTaker` protocol:

```python
from dexact.server import ActionTaker, launch_websocket_server

class ExampleActionTaker(ActionTaker):
    def take_next_action(
        self, 
        time: float, 
        states: dict[str, list[float]]
    ) -> list[float]:
        """
        Args:
            time: The current simulation time (cumulative timesteps)
            states: Dictionary mapping partition names to their state values
        
        Returns:
            A list of floats representing the action to take
        """
        # Example: extract and use some state values
        some_partition_state = states.get("some_partition", [])
        
        # Your control logic here
        action = [1.0, 2.0, 3.0]  # Example action
        
        return action

if __name__ == "__main__":
    # Launch the server and wait for the expected number of partition states
    # In this example, we expect 3 partition states before calling take_next_action
    launch_websocket_server(ExampleActionTaker(), num_state_keys=3)
```