semvec/pypi-packages huggingface dataset:
frac-json 0.1.2
Highly storage efficient binary JSON format
Requires Python: >=3.8

# Fractured Binary JSON

A binary JSON encoding optimized for small storage size.

For more information, see [here](https://github.com/ArthurHeitmann/fractured_binary_json.git).

## Usage

```python
import frac_json as fj

# basic usage
encoded_object = fj.encode({ "key1": "value" })
decoded_object = fj.decode(encoded_object)

# with compression
large_object = {
	# ...	
}
encoded_object2 = fj.encode(large_object, compression_level=3)

# with keys table
keys_table = fj.keys_table_from_json(large_object) # one time only, save this to a file
# keys_table = keys_table_from_keys(["key", "key1", "key2", "key3"]) # or generate from keys
encoded_object3 = fj.encode(large_object, global_keys_table_bytes=keys_table)
decoded_object3 = fj.decode(encoded_object3, global_keys_table_bytes=keys_table)
```

## Functions

```python
json_type = Union[dict, list, str, int, float, bool, None]

# Encode a JSON object (object, array, string, number, boolean, null) to bytes.
def encode(
    object: json_type,
	# bytes of an external keys table
	# to generate a keys table from keys, use keys_table_from_keys or keys_table_from_json
    global_keys_table_bytes: Optional[bytes] = None,
	# compression level for zstandard. 1-22. Default is 3.
    compression_level: Optional[int] = None,
	# pre trained zstandard dictionary
    zstd_dict: Optional[bytes] = None,
) -> bytes:
    ...

# Decode bytes to a JSON object (object, array, string, number, boolean, null).
def decode(
    frac_json_bytes: bytes,
	# bytes of an external keys table
    global_keys_table_bytes: Optional[bytes] = None,
	# pre trained zstandard dictionary
    zstd_dict: Optional[bytes] = None,
) -> Any:
    ...

# Generate a keys table from a list of unique keys.
# To improve performance during encoding, keys should be sorted by frequency of occurrence.
def keys_table_from_keys(keys: List[str]) -> bytes:
    ...

# Generate a keys table from a JSON object.
def keys_table_from_json(
	# object to recursively extract keys from
    object: Any,
	# maximum number of keys to extract
    max_count: Optional[int] = None,
	# minimum number of occurrences for a key to be included
    occurrence_cutoff: Optional[int] = None,
) -> bytes:
    ...

```
polars_splitters 0.2.1
Polars-based splitter functionalities for polars LazyFrames and DataFrames similar to `sklearn.model_selection.train_test_split` and `sklearn.model_selection.StratifiedKFold`.
Requires Python: <4.0,>=3.10.9

# polars-splitters

Polars-based splitter functionalities for polars LazyFrames and DataFrames similar to `sklearn.model_selection.train_test_split` and `sklearn.model_selection.StratifiedKFold`.

## features

- split_into_train_eval
- split_into_k_folds

## installation

```bash
pip install polars-splitters
```

## usage

```python
import polars as pl
from polars_splitters import split_into_train_eval, split_into_k_folds

df = pl.DataFrame(
    {
        "feature_1": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
        "treatment": [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],
        "outcome": [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1],
    }
)

df_train, df_test = split_into_train_eval(
    df,
    eval_rel_size=0.3,
    stratify_by=["treatment", "outcome"],
    shuffle=True,
    validate=True,
    as_lazy=False,
    rel_size_deviation_tolerance=0.1,
)

folds = split_into_k_folds(
    df,
    k=3,
    stratify_by=["treatment", "outcome"],
    shuffle=False,
    as_lazy=False
)
```
asyncpg-wrapper 0.1.2
AsyncPG Easy-To-Use wrapper
Requires Python: >=3.6

# AsyncPG Wrapper
## _Легкая в обращении обёртка над AsyncPG_
### _версия 0.1.2_

Wrapper принимает и возращает только объекты типа __dict()__ и __List[dict]__

### Установка
```shell
pip install asyncpg-wrapper
```
### Инициализация в коде
```python
from asyncpg_wrapper import AsyncDB

dsn = "postgresql://username:password@host:port/dbname"
db = AsyncDB(dsn)
```

### Примеры операций:

```python
new_record = await db.insert('users', {'first_name': 'John', 'last_name': 'Doe'})
print(new_record)
```

```python
l = [{'first_name': f'John{i}', 'last_name': f'Doe{i}'} for i in range(0, 1000)]
new_records = await db.insertmany('users', l)
print(new_records)
```

```python
updated_record = await db.update('users', "id=1", {'first_name': 'Jane'})
print(updated_record)
```

```python
deleted_records = await db.delete('users', "first_name='Jane'")
print(deleted_records)
```

```python
deleted_records = await db.delete('users')
print(deleted_records)
```

```python
selected_records = await db.select('users', 'id=1')
print(selected_records)
```

```python
selected_records = await db.select('users')
print(selected_records)
```
voyage-touch 0.0.3
Open-source low-cost robot touch sensor hardware and controls.
Requires Python: >=3.6

# Voyage Touch

**Open source tactile sensing library for robots.**

Voyage Touch is a Python library for interacting with tactile sensors built using force sensitive resistors, or piezoelectronic sensors. It provides methods for reading raw sensor data, as well as an interface for an **artificial somatosensory cortex** - a model for predicting touch events from raw data.

Voyage Touch is built and maintained by [Voyage Robotics](https://www.voyagerobotics.com/).

## ASSC model

An ASSC is a foundation model for tactile sensing, converting raw sensor data into features such as touch contact (1 or 0), magnitude of force, or the direction of the force vector. A pre-trained ASSC is designed to be used as an input to other machine learning policies, allowing an easy integration of tactile sensing without the need to retrain the policy.

Currently, only a heuristic ASSC model that supports force-sensing resistors is provided, but the goal is to provide pre-trained models for a common set of sensor configurations and hardware devices you could build at home.

### Data collection

See [this README file](experiments/README.md).

## Installation

### Firmware

1. Open the `arduino` package in the [Arduino IDE](https://www.arduino.cc/en/software).
2. Ensure your Arduino board is connected to your computer
3. Flash the firmware to your Arduino board using the Arduino IDE.

Your touch sensor should now be ready to use with the Voyage Touch library! 

### Library

```
pip install voyage-touch
```

To run the examples, also install the following:
```
pip install tqdm pynput
```

The Voyage Touch API is still experimental and may change in the future.

## Supported sensor types

We're planning Voyage Touch to be compatable with various types of tactile sensors to allow developers to explore different, inventive ways to integrate tactile sensing to their robot.

- ✅ Force sensing resistors
- 🚧 Piezoelectric sensors (also known as contact microphones)
    - supports raw data but no support in the ASSC yet. Still working on the most effective way to make use of these.
- 👀 Magnetic sensors

✅: fully supported
🚧: working on support
👀: support planned for the future

## Hardware design

Voyage Touch sensors can be built using an Arduino board and some sensors. Reference circuit designs and lists of hardware components to buy will be published in due course.

## Supported robots

Voyage Touch Sensors will have dedicated support for particular robot grippers  in the form of 3D printed designs and pre-trained ASSC models, allowing the integration of tactile sensing out of the box.

Contact us via Issues for a robot arm or gripper you'd like to use Voyage Touch with!

## Example usage

[Example with raw data](examples/raw_data.py).

[Example with a heuristic ASSC](examples/assc_heuristic.py).
mkdocs-inline-svg-plugin 0.1.5
MkDocs plugin for inlining svg-href img tags
Requires Python: >=3.8
Keywords: MkDocs

> **NOTE:** this project is still WIP!

# mkdocs-inline-svg-plugin

[![PyPI - Version](https://img.shields.io/pypi/v/mkdocs-inline-svg-plugin.svg)](https://pypi.org/project/mkdocs-inline-svg-plugin)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mkdocs-inline-svg-plugin.svg)](https://pypi.org/project/mkdocs-inline-svg-plugin)

-----

**Table of Contents**

- [Installation](#installation)
- [License](#license)

## Installation

```console
pip install mkdocs-inline-svg-plugin
```

## License

`mkdocs-inline-svg-plugin` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.

## Usage

If you want to inline SVGs, that were put in `img` tags by the [kroki plugin](https://github.com/AVATEAM-IT-SYSTEMHAUS/mkdocs-kroki-plugin):

`mkdocs.yml`:
```yaml
plugins:
  - kroki:
      FencePrefix: ''
      HttpMethod: 'POST'
      DownloadImages: true
  - inline-svg:
      alt_name: Kroki
```

### Configuration

| Config value | What for |
|---|---|
| `alt_name` | default: `*`, that does not check the `img` `alt` property |
| `include_assets` | default: `False`, looks for `url(..)`, downloads the contents to `asset_dir` and replaces the url |
| `asset_dir` | default: `assets/` |
| `patch_style` | default: `False`, this feature is **EXPERIMENTAL** and not yet finished, needs an additional CSS |

## Test

Serve documentation:
```sh
hatch run docs:serve
```