semvec/pypi-packages huggingface dataset:
longleding-operation-log-service-sdk 0.3.0
Longleding Operation Log Service SDK
Requires Python: >=3.6

Longleding Operation Log Service SDK

# Supported Python Versions

Python >= 3.6

# Installation

longleding-operation-log-service-sdk is available for Linux, macOS, and Windows.

```shell script
$ pip install longleding-operation-log-service-sdk
```

# Basic Usage

```python
# -*- coding: utf-8 -*-
from datetime import datetime
import operation_log_service

log_service_endpoint = "localhost:80"
source_name = "demo"

operation_log_service.init_service(endpoint=log_service_endpoint, src=source_name)


def put_log():
    log = {
        "time": datetime.now(),
        "topic": "tpc",
        "tags": {"tg1": "v1", "tg2": "v2"},
        "content": "say something."
    }
    operation_log_service.log(**log)


def get_logs():
    end_time = datetime.now()
    start_time = datetime.strptime(("%d-%02d-%02d 00:00:00" % (end_time.year, end_time.month, end_time.day)), "%Y-%m-%d %H:%M:%S")
    request = {
        "start_time": start_time,
        "end_time": end_time,
        "offset": 0,
        "limit": 0,
        "reverse": False,
        "topic_in": ["tpc", "other"],
        "source_in": ["demo", "other"],
        "tag_contains": {
            "tg1": ["v1", "v8"],
            "tg2": [],
        },
    }
    print("request: " + str(request))
    print("\n================================\n")
    resp = operation_log_service.get_operation_logs(**request)
    print(resp.total)
    for v in resp.logs:
        print(v)


if __name__ == '__main__':
    put_log()
    get_logs()

```
icbs 0.0.2
Simple image cut and rebuild package. It allows to decide how to cut an image in overlapping squares. After having cut the image you can rebuild it (or you can do some processing before rebuilding it)
Requires Python: >=3.6

# icbs - Image Cut and (re)Build Squares
Package to cut an image in overlapping rectangles and to rebuild it. \
Can be used for pre-processing an image before a learning algorithm and then rebuild it or to create a data set from a large image. 

## Description
It is useful to cut an image like this one: \
![](/img/pre_cut.png) \
To obtain an array of images: \
![](/img/after_cut.png)

It is useful because it handles well edge cases; from this image:
![](/img/edge_case.png) \
To obtain an array of images:
![](/img/after_cut_with_edge.png) \
With icbs you can also do the inverse operation, and given the images, rebuild the original one.

## Installation & Requirements
To install this library you need to have at least python 3.6. You also need to install `numpy` (`pip install numpy`)\
Run `pip install icbs`. 

## Usage
icbs has two methods, cut and rebuild. The parameters are similar for both images and are better explained through an image: \
![](/img/pre_cut_labled.png) \
The method  `cut` returns the n_img_per_col and the array with the images. \
n_img_per_col is particularly important for using the `rebuild` method. \
You can find more info reading the parameter description under both methods.