semvec/pypi-packages huggingface dataset:
labthings-picamera2 0.0.2
Picamera2 support for LabThings-FastAPI
Requires Python: >=3.9

# labthings-picamera2
A LabThings-FastAPI Thing for working with picamera2

This package defines a `Thing` using [labthings-fastapi] that exposes an HTTP interface to
the Raspberry Pi camera, using `picamera2`. This includes autogenerated OpenAPI documentation
viewed with a built-in Swagger/Redocly page at `/docs/`, and a Web of Things compliant
Thing Description at the camera's root (usually `/camera/`).

## Installation

For this to work you should be on a 32-bit version of Bullseye or Bookworm os with python v3.9 or 3.11.

It's usually best to install in a virtual environment, but note that you should use

    python -m venv .venv --system-site-packages

as the `picamera2` package and its dependencies are not all installable using `pip`.

The package is on PyPI and can be installed using

    pip install labthings-picamera2

You will also need to separately install the server with:

    pip install labthings-fastapi[server]
    
    
If you want to edit labthings-picamera2 then you can clone this repository. Move to the directory and run

    pip install -e .



## Usage

You can start the server using:

```
labthings-server --json '{"things":{"/camera/":"labthings_picamera2.thing:StreamingPiCamera2"}}'
```
This assumes you have `labthings[server]>=0.0.6` installed.

You may then point a web browser at `http://localhost:5000/camera` or `http://localhost:5000/docs/`.

It's also possible to control it from Python, if you have `labthings-fastapi` installed (note that 
if you're using a separate machine or separate environment for the client,
if you don't add `[server]` it won't install the rather heavy server dependencies like `starlette`.)

To connect, run:

```python
from labthings_fastapi.client import ThingClient
from PIL import Image

cam = ThingClient.from_url("http://localhost:5000/camera/")
blob = cam.capture_jpeg()
image = Image.open(blob.open())
```

All of the properties and actions described in the Thing Description should be present as
Python properties and methods - currently the types and docstrings don't propagate to the
client object, this is planned for the future but isn't reality yet.

[labthings-fastapi]: https://github.com/labthings/labthings-fastapi/
primitive_metadata 0.2025.1
a (simple?) toolset for authoring and gathering metadata as rdf
Requires Python: >=3.7

# `primitive_metadata`
> note: unstable and subject to wild change, tho with intent to settle

some tools for writing and working with small-ish chunks of metadata
as [rdf](https://www.w3.org/TR/rdf11-primer/) in [python](https://python.org)

(for python 3.7+)

## `primitive_rdf`
`primitive_metadata.primitive_rdf` contains suggestions and utilities for expressing
rdf metadata with (almost entirely) built-in python data structures (`dict` and `set`)

## running unit tests
`python3 -m unittest`

## todo list
- write a readme
complexifier 1.0.0
A library to make data worse
Requires Python: >=3.8

# Complexifier

Make your pandas even worse!

## Problem

When teaching students to work with data, an important lesson is how to clean it.

The problem with this is that there are two types of datasets available on the internet:

1. Data that is good, but already cleaned
2. Data that is not cleaned, but is terrible and incomprehensible

Complexifier solves this problem by allowing you take the former and turn it into a better version of the latter!

## Dependencies

- `pandas`
- `typo`
- `random`

## Installation

`complexifier` can be installed using `pip`

```sh
pip install complexifier
```

## Documentation

[Go to the documentation](https://ruyzambrano.github.io/complexifier/)

## Usage


Once installed you can use `complexifier` to add mistakes and outliers to your data

This library has several methods available:

### create_spag_error

`create_spag_error(word: str) -> str`

Introduces a 10% chance of a random spelling error in a given word. This function is useful for simulating typos and spelling mistakes in text data.

### introduce_spag_error

`introduce_spag_error(df: pd.DataFrame, columns=None) -> pd.DataFrame`

Applies the create_spag_error function to each string entry in specified columns of a DataFrame, introducing random spelling errors with a 10% probability.

### add_or_subtract_outliers

`add_or_subtract_outliers(df: pd.DataFrame, columns=None) -> pd.DataFrame`

Randomly adds or subtracts values in specified numeric columns at random indices, simulating outliers between 1% and 10% of the rows.

### add_standard_deviations

`add_standard_deviations(df: pd.DataFrame, columns=None, min_std=1, max_std=5) -> pd.DataFrame`

Adds between 1 to 5 standard deviations to random entries in specified numeric columns to simulate data anomalies.

### duplicate_rows

`duplicate_rows(df: pd.DataFrame, sample_size=None) -> pd.DataFrame`

Introduces duplicate rows into a DataFrame. This function is useful for testing deduplication processes.

### add_nulls

`add_nulls(df: pd.DataFrame, columns=None, min_percent=1, max_percent=10) -> pd.DataFrame`

Inserts null values into specified DataFrame columns. This simulates missing data conditions.

### mess_it_up

`mess_it_up(df: pd.DataFrame, columns=None, min_std=1, max_std=5, sample_size=None,min_percent=1, max_percent=10, introduce_spag=True, add_outliers=True, add_std=True, duplicate=True, add_null=True) -> pd.DataFrame`

Adds all (or some) of the above methods. Really messes it up.
persim 0.3.8
Distances and representations of persistence diagrams
Keywords: persistent homology, persistence images, persistence diagrams, topological data analysis, algebraic topology, unsupervised learning, supervised learning, machine learning, sliced wasserstein distance, bottleneck distance

[![PyPI version](https://badge.fury.io/py/persim.svg)](https://badge.fury.io/py/persim)
![PyPI - Downloads](https://img.shields.io/pypi/dm/persim)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/persim.svg)](https://anaconda.org/conda-forge/persim)
[![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/persim.svg)](https://anaconda.org/conda-forge/persim)
[![codecov](https://codecov.io/gh/scikit-tda/persim/branch/master/graph/badge.svg)](https://codecov.io/gh/scikit-tda/persim)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)


<img align="right" width="40" height="40" src="https://imgur.com/8p6VwFm.jpg">

Persim is a Python package for many tools used in analyzing Persistence Diagrams.  It currently houses implementations of 

- Persistence Images
- Persistence Landscapes
- Bottleneck distance
- Modified Gromov&ndash;Hausdorff distance
- Sliced Wasserstein Kernel
- Heat Kernel
- Diagram plotting


## Setup

The latest version of persim can be found on Pypi and installed with pip:

```
pip install persim
```

## Documentation and Usage

Documentation about the library, it's API, and examples of how to use it can be found at [persim.scikit-tda.org](http://persim.scikit-tda.org).

## Contributions

We welcome contributions of all shapes and sizes. There are lots of opportunities for potential projects, so please get in touch if you would like to help out. Everything from an implementation of your favorite distance, notebooks, examples, and documentation are all equally valuable so please don't feel you can't contribute. 

To contribute please fork the project make your changes and submit a pull request. We will do our best to work through any issues with you and get your code merged into the main branch.
predictoor-data 0.1.7
A package for fetching historical and prediction data
Requires Python: >=3.7

# predictoor-data

Python client for accessing Predictoor data and predictions on Ocean Protocol.

## Installation

Install via pip:

```sh
pip install predictoor-data
```

Or install from source:

```sh
git clone https://github.com/oceanprotocol/predictoor-data
cd predictoor-data
pip install -e .
```

## Quick Start

```python
from predictoor_data import PredictoorClient
from datetime import datetime

# Initialize client
# private key can also be set using PREDICTOOR_PRIVATE_KEY env var
client = PredictoorClient(private_key="your-private-key")  # private_key is optional

# Get current prediction
stake_up, stake_down = client.get_prediction("BTC/USDT", "5m")
print(f"Up stake: {stake_up/1e18} OCEAN")
print(f"Down stake: {stake_down/1e18} OCEAN")

# Fetch historical data
historical_data = client.fetch_historical(
    datetime(2024, 9, 1),
    datetime(2024, 9, 30),
    "BTC/USDT",
    "5m"
)
```

## API Reference

### PredictoorClient

#### Constructor

```python
client = PredictoorClient(private_key=None)
```
- `private_key`: Optional. Your private key for authentication. Can also be set via `PREDICTOOR_PRIVATE_KEY` environment variable.

#### Methods

##### get_prediction(pair: str, timeframe: str) -> Tuple[int, int]
Get current prediction for a trading pair. If the subscription doesn't exist raises an error.

```python
stake_up, stake_down = client.get_prediction("BTC/USDT", "5m")
```

- `pair`: Trading pair (e.g., "BTC/USDT", "ETH/USDT")
- `timeframe`: Time interval ("5m", "1h")
- Returns: Tuple of (stake_up, stake_down) in wei

##### subscribe_and_get_prediction(pair: str, timeframe: str) -> Tuple[int, int]
If the subscription doesn't exist, subscribes to a trading pair and get current prediction.

```python
stake_up, stake_down = client.subscribe_and_get_prediction("BTC/USDT", "5m")
```

##### fetch_historical(start_date: datetime, end_date: datetime, pair: str, timeframe: str) -> pd.DataFrame
Fetch historical prediction data.

```python
df = client.fetch_historical(
    datetime(2023, 1, 1),
    datetime(2023, 1, 31),
    "BTC/USDT",
    "5m"
)
```

Returns DataFrame with columns:
- `slot_start`: Start time of prediction slot
- `slot_target`: Target time for prediction
- `stake_up`: Amount staked on price going up
- `stake_down`: Amount staked on price going down

## Supported Trading Pairs

Check [predictoor.ai](https://predictoor.ai)
jsonschema-default 1.8.1
Create default objects from a JSON schema
Requires Python: <4.0,>=3.9
Keywords: automation, code-generation, data-generation, default-values, defaults, json, json-schema, jsonschema, mock-data, schema, structured-data, validation

# jsonschema-instance

A Python package that creates default objects from a JSON schema.

## Note
This is not a validator. Inputs should be valid JSON schemas. For Python you can use the [jsonschema](https://github.com/Julian/jsonschema) package to validate schemas.

## Installation
```
pip install jsonschema-default
```

## Usage
```python
import jsonschema_default

default_obj = jsonschema_default.create_from("<schema>")
```

## Development
- Install and configure [Poetry](https://python-poetry.org/)

```bash
pip install --user poetry
```

See [Installation](https://python-poetry.org/docs/#installation) for the official guide.

- Install the dependencies using 

```bash
# Configure poetry to create a local venv directory
poetry config virtualenvs.in-project true

poetry install
```
dine 0.0.2
Librería y línea de comandos para explorar y exportar datos del Instituto Nacional de Estadística de España
Requires Python: >=3.13.2

# DINE 🦕

Librería y línea de comandos para explorar y exportar datos del [Instituto Nacional de Estadística](https://www.ine.es/).

## 🔍 Recursos

- [API JSON](https://www.ine.es/dyngs/DAB/index.htm?cid=1099) - API JSON de INE
- [Tablas INE](https://www.ine.es/dyngs/INEbase/listaoperaciones.htm) - Listado de operaciones estadísticas
- [Microdatos INE](https://www.ine.es/dyngs/INEbase/es/operacion.htm?c=Estadistica_C&cid=1254736176918&menu=resultados&idp=1254735976595) - Acceso a microdatos de encuestas
- [API INE](https://www.ine.es/dyngs/DataLab/es/manual.html?cid=1259945948443) - Documentación de la API
- [Tempus3](https://www.ine.es/dyngs/IOE/es/operacion.htm?numinv=30714) - Sistema de difusión de información estadística

Puedes explorar la documentación de la API en Markdown en la carpeta [docs](docs).

## 🚀 Instalación

Puedes instalar la librería `dine` usando `uv` o `pip`.

```bash
pip install dine
```

```bash
uv add dine
```

Para instalar `dine` en el sistema de manera aislada, puedes hacerlo con:

```bash
uv tool install dine
```

## 🛠️ Uso

La librería `dine` proporciona una interfaz de línea de comandos para interactuar con los datos del INE.

### Operaciones Estadísticas

Listar todas las operaciones estadísticas disponibles:

```bash
dine operations list
```

Obtener información detallada sobre una operación específica:

```bash
dine operations get <ID_OPERACION>
```

### Tablas Estadísticas

Listar todas las tablas estadísticas disponibles:

```bash
dine tables list
```

Listar tablas de una operación específica:

```bash
dine tables list --operation <ID_OPERACION>
```

Obtener información detallada sobre una tabla específica:

```bash
dine tables info <ID_TABLA>
```

Descargar una tabla y guardarla en formato Parquet:

```bash
dine tables download <ID_TABLA>
```

Especificar una ruta de salida personalizada:

```bash
dine tables download <ID_TABLA> --output ruta/personalizada.parquet
```

### Uso desde Python

También puedes usar DINE directamente desde Python:

```python
import dine

# Listar operaciones
operaciones = dine.list_operations()

# Obtener información de una operación
operacion = dine.get_operation("ID_OPERACION")

# Listar tablas
tablas = dine.list_all_tables()
tablas_por_operacion = dine.list_tables_by_operation("ID_OPERACION")

# Obtener información de una tabla
info_tabla = dine.get_table_info("ID_TABLA")

# Descargar una tabla
ruta_salida = dine.download_table("ID_TABLA", "ruta/salida.parquet")
```

## 🔧 Desarrollo

Para contribuir al proyecto, se puede usar el siguiente comando para instalar las dependencias necesarias y ejecutar el proyecto.

```bash
make install
```

## 📝 Licencia

Este proyecto está bajo la licencia MIT. Ver el archivo [LICENSE](LICENSE) para más detalles.