semvec/pypi-packages huggingface dataset:
cyqstats 0.1.0
Streaming statistics and grouped aggregations for large event streams
License: MIT
Requires Python: >=3.10

# Cyqstats

**Cyqstats** es una librería para cálculo de métricas en streaming orientada a datasets grandes.

## Estado actual (MVP)

Este repositorio ya incluye la base funcional para avanzar:

- `StreamStats` para agregaciones incrementales globales:
  - `count`, `sum`, `mean`, `min`, `max`, `var`, `std`.
- `GroupedStreamStats` para agregaciones por grupo (`int32` recomendado en tu pipeline):
  - `add(group_ids, values)`, `merge(...)`, `to_dict()`, `result_arrays()`.
- Merge estable por fórmula de momentos (Welford combinable), ideal para procesar por chunks.

## Quickstart

```python
from random import Random
from cyqstats import StreamStats, GroupedStreamStats

rng = Random(42)
values = [rng.gauss(0, 1) for _ in range(100_000)]

# Global
s = StreamStats()
s.add_values(values)
print(s.result())

# Grouped
gids = [i % 50 for i in range(len(values))]
g = GroupedStreamStats(n_groups=50)
g.add(gids, values)
print(g.result_arrays()["mean"][:5])
```

## Instalación local

```bash
pip install -U pip
pip install -e ".[dev]"
```

## Tests

```bash
PYTHONPATH=src pytest -q
```

## Próximos pasos recomendados

1. **Cythonizar el hot path** (`add_values` y `add`) manteniendo esta API.
2. Agregar percentiles streaming (P² como primera implementación).
3. Añadir benchmark CLI comparando contra `pandas.groupby`.
4. Publicar wheels (`manylinux`, `macOS`, `Windows`).

## Licencia

MIT.
pyairtouch 3.2.0
A fully typed asyncio API for the Polyaire AirTouch AC controllers
License: MIT
Requires Python: >=3.11

# pyairtouch

![PyPI - Version](https://img.shields.io/pypi/v/pyairtouch)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyairtouch)
![PyPI - License](https://img.shields.io/pypi/l/pyairtouch)
![Tests Status](https://img.shields.io/github/actions/workflow/status/TheNoctambulist/pyairtouch/test.yml?label=tests)


A fully typed asyncio API for the Polyaire AirTouch AC controllers.

The API supports the AirTouch 4 and AirTouch 5.

A unified public API is provided that encapsulates the underlying AirTouch version.

## Example

```python
import asyncio

import pyairtouch


async def main() -> None:
    # Automatically discover AirTouch devices on the network.
    discovered_airtouches = await pyairtouch.discover()
    if not discovered_airtouches:
        print("No AirTouch discovered")
        return

    for airtouch in discovered_airtouches:
        print(f"Discovered: {airtouch.name} ({airtouch.host})")

    # In this example we use the first discovered AirTouch (typically there is only one per network)
    airtouch = discovered_airtouches[0]

    # Connect to the AirTouch and read initial state.
    success = await airtouch.init()

    async def _on_ac_status_updated(ac_id: int) -> None:
        aircon = airtouch.air_conditioners[ac_id]
        print(
            f"AC Status  : {aircon.power_state.name} {aircon.mode.name}  "
            f"temp={aircon.current_temperature:.1f} set_point={aircon.target_temperature:.1f}"
        )

        for zone in aircon.zones:
            print(
                f"Zone Status: {zone.name:10} {zone.power_state.name:3}  "
                f"temp={zone.current_temperature:.1f} set_point={zone.target_temperature:.1f} "
                f"damper={zone.current_damper_percentage}"
            )

    # Subscribe to AC status updates:
    for aircon in airtouch.air_conditioners:
        aircon.subscribe(_on_ac_status_updated)

        # Print initial status
        await _on_ac_status_updated(aircon.ac_id)

    # Keep the demo running for a few minutes
    await asyncio.sleep(300)

    # Shutdown the connection
    await airtouch.shutdown()


if __name__ == "__main__":
    asyncio.run(main())
```

A more detailed example can be found in [examples/example.py](examples/example.py). The example can be run using the `pdm run example` command.

## Say Thank You
If you would like to make a donation as appreciation of my work, please use one of the links below:

<a href="https://coindrop.to/thenoctambulist" target="_blank"><img src="https://coindrop.to/embed-button.png" style="border-radius: 10px; height: 57px !important;width: 229px !important;" alt="Coindrop.to me"/></a>
<a href="https://www.buymeacoffee.com/thenoctambulist" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-blue.png" style="border-radius: 10px; margin-left: 25px" alt="Buy Me A Coffee" height="57px" width="242px"/></a>
fastpyrepl 0.1.1
FastAPI service for executing Python code in session-scoped environments
License: MIT
Requires Python: >=3.12

# fastpyrepl

`fastpyrepl` is a small FastAPI service that executes Python code in session-scoped environments over HTTP.

## Install

From pypi:

```bash
pip install fastpyrepl
```

From source:

```bash
git clone https://github.com/gjyotin305/fastpyrepl
cd fastpyrepl
pip install .
```

After install, run the CLI:

```bash
fastpyrepl --help
```

## Run the server

Default:

```bash
fastpyrepl
```

Custom host/port:

```bash
fastpyrepl --host 127.0.0.1 --port 9000
```

Enable reload during development:

```bash
fastpyrepl --reload
```

The server starts at `http://<host>:<port>`.

## API Endpoints

### `GET /health`

Check service health.

Example:

```bash
curl http://127.0.0.1:8000/health
```

Response:

```json
{"status":"PYTHON REPL ACTIVE"}
```

### `POST /execute`

Execute Python code in a session.

Request body:

```json
{
  "code": "print('hello')",
  "context": "optional context string",
  "setup_code": "x = 10",
  "session_id": "optional-session-id",
  "return_locals": true,
  "locals_keys": ["x"]
}
```

Notes:
- If `session_id` is omitted, a new one is created and returned.
- Reuse the same `session_id` to keep variables between calls.
- `setup_code` runs when a new session is created.

Example:

```bash
curl -X POST http://127.0.0.1:8000/execute \
  -H "Content-Type: application/json" \
  -d '{"code":"x = 2\nprint(x)","return_locals":true,"locals_keys":["x"]}'
```

Response shape:

```json
{
  "stdout": "2\n",
  "stderr": "",
  "locals": {"x": 2},
  "execution_time": 0.001,
  "session_id": "...",
  "error": null
}
```

### `POST /reset`

Reset one session or all sessions.

Reset one:

```bash
curl -X POST http://127.0.0.1:8000/reset \
  -H "Content-Type: application/json" \
  -d '{"session_id":"your-session-id"}'
```

Reset all:

```bash
curl -X POST http://127.0.0.1:8000/reset \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Local development

```bash
python3 -m pip install -e .
fastpyrepl --reload
```

## Security warning

This service executes arbitrary Python code. Do not expose it to untrusted users or public networks without sandboxing and strict isolation.