semvec/pypi-packages huggingface dataset:
torch-roller 0.1.0
Roll 2d tensor to 3d and vice versa.
License: MIT
Requires Python: >=3.10

# torch-roller
* Roll 2d tensor to 3d and vice versa.

```python
>>> df = pd.DataFrame()
>>> df["A"] = [1, 2, 3, 4, 5]
>>> df["B"] = [10, 20, 30, 40, 50]
>>> df.values
array([[ 1, 10],
       [ 2, 20],
       [ 3, 30],
       [ 4, 40],
       [ 5, 50]], dtype=int64)
>>> tensor_3d = roll(df, length=3)
>>> tensor_3d
tensor([[[ 1., 10.],       
         [ 2., 20.],       
         [ 3., 30.]],      

        [[ 2., 20.],       
         [ 3., 30.],       
         [ 4., 40.]],      

        [[ 3., 30.],       
         [ 4., 40.],       
         [ 5., 50.]]])     
>>> df_2d = unroll(tensor_3d)
>>> df_2d.values
array([[ 1., 10.],
       [ 2., 20.],
       [ 3., 30.],
       [ 4., 40.],
       [ 5., 50.]], dtype=float32)
>>> assert np.array_equal(df.values, df_2d.values)
```
cocosuite 0.1.0
A toolkit for COCO dataset
License: MIT
Requires Python: >=3.10

# COCOSuite

COCOSuite is a comprehensive collection of tools designed to facilitate the management and manipulation of datasets in COCO format.

## Tools

| Tool | Description |
| ---- | ----------- |
| [coco_merge](./cocosuite/scripts/manipulation/coco_merge.py) | Merge two COCO datasets into a single one |
| [merge_multiple](./cocosuite/scripts/manipulation/merge_multiple_coco_files.py) | Allows merging of multiple COCO files into a single dataset |
| [random_split](./cocosuite/scripts/manipulation/random_split.py) | Performs a random division of the dataset into training and validation subsets, configurable in terms of data proportion. |
| [property_split](./cocosuite/scripts/manipulation/property_split.py) | Divides a COCO dataset into training and validation sets according to specific image properties |
| [coco_filter](./cocosuite/scripts/manipulation/coco_filter.py) | Filters a COCO dataset based on certain criteria |

## Installation

```bash
git clone https://github.com/jorgenusan/cocosuite.git
cd cocosuite
pip3 install -r requirements.txt
```

## Usage

> [!IMPORTANT]
> In all scripts, if no path is specified in the <output_filename> argument and only a name is specified. The resulting file will be created in the input annotations file path

### Basic example

```bash
python3 /cocosuite/scripts/manipulation/coco_merge.py <annotations_file_1> <annotations_file_2> <output_filename>
```

### config_split

Applies to **property_split** and **coco_filter**

```bash
python3 /cocosuite/scripts/manipulation/property_split.py <annotations_file> <config_split>
```

For these scripts you have to pass a configuration file with the criteria for separating the data in the case of **property_split** and the criteria for filtering in the case of **coco_filter**.

Here is an example for each of these cases:

1. property_split

   ```json
    "criteria": {
      "file_name": ["image1", "image2"],
      "height": [480]
    },
    "match_all": true
   ```

2. coco_filter

    ```json
    "filter": {
      "file_name": ["image1", "image2"],
      "height": [480]
    },
    "match_all": true
   ```

> [!NOTE]
> the **match_all** property, when set to `true` means that both properties have to match in order to filter or split a new file.<br>
> If set to `false`, it filters or splits for each property.
redis-async-client 0.1.7
Redis async client.
License: MIT
Requires Python: <4.0,>=3.10

### Stack:

- [x] <a href="https://www.python.org/"><img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/python/python-plain.svg" alt="python" width="15" height="15"/>
  Python 3.10+ <br/></a>
- [x] <a href="https://github.com/redis/redis-py"><img src="https://avatars.githubusercontent.com/u/1529926?s=48&v=4" alt="niquests" width="15" height="15"/>
  Redis 5.0.3+ <br/>

### Installation

    pip install redis-async-client

### Usage Async

    from redis_async_client import AsyncRedisClient, RedisSettings

    redis_settings = RedisSettings()
    pool: redis_async.ConnectionPool = redis_settings.make_pool()
    async with redis_async.Redis(connection_pool=pool) as conn:
        async_client = AsyncRedisClient(conn)
        data = await async_client.health_check()
        assert data == {'test': 'test'}

    or

    from redis_async_client import RedisSettings, get_redis_connection

    redis_settings = RedisSettings()
    async for client in get_redis_connection(redis_settings):
        data = await client.health_check()
        assert data == {'test': 'test'}