semvec/pypi-packages huggingface dataset:
libddog 0.1.8.post1
Datadog automation tool
License: MIT

# Datadog library and command line tools

[![Latest PyPI package version](https://badge.fury.io/py/libddog.svg)](https://pypi.org/project/libddog)
[![libddog tests](https://github.com/nearmap/libddog/actions/workflows/github-actions.yml/badge.svg?branch=master)](https://github.com/nearmap/libddog/actions/workflows/github-actions.yml)


libddog lets you define your metrics and dashboards in code and get the full benefit of a programming language to automate your monitoring setup.

First you write the query:

```python
query = (Query("aws.elb.request_count")
        .filter(region="us-east-1")
        .agg("sum").by("availability-zone").as_count()
        .rollup("sum", 5 * 60))

# produces:
#   sum:aws.elb.request_count{region:us-east-1}
#    by {availability-zone}.as_count().rollup(sum, 300)
```

The query language closely resembles the Datadog syntax, but because it's Python code and not just a string it is validated and known to be well formed at definition time.

Then you define what the graph looks like:

```python
Timeseries(
    title="ELB: total requests by AZ every 5min",
    requests=[
        Request(
            queries=[query],
            display_type=DisplayType.BARS,
        ),
    ],
    size=Size(height=3, width=5),
)
```

This gives you the widget you want, with all the parameters supported by the Datadog UI.

Learn more in the **[User guide](https://github.com/nearmap/libddog/blob/master/docs/USER_GUIDE.md)**.



## The state of the project

libddog is a young project and currently supports a small but useful subset of dashboard functionality. See the **[Feature support](https://github.com/nearmap/libddog/blob/master/docs/FEATURE_SUPPORT.md)** page for details.

We plan to support more dashboard features over time. We also plan to support monitors.

Want to know what's new in the project? Read the **[CHANGELOG](https://github.com/nearmap/libddog/blob/master/CHANGELOG.md)**.

Want to contribute? Start by reading the **[Maintainer guide](https://github.com/nearmap/libddog/blob/master/docs/MAINTAINER_GUIDE.md)**.
flexbox 0.0.2
FlexBox layout engine for Python
License: MIT
Requires Python: >=3.7

# FlexBox layout with Yoga in Python

FlexBox is a very neat layout engine available in all browsers. You can play around with it in this [Playground](https://yogalayout.com/playground) to see which properties you need to get the desired results.

This is how to use it in Python with this project:

```python
from flexbox import box, compute_layout

layout = compute_layout(
    box(width=610, flex_direction="row")(
        box(id="cal", flex_grow=1, flex_wrap="wrap", padding=5, justify_content="stretch")(
            box(width=90, height=90, margin=5, flex_grow=1)
            for _ in range(31)
        ),
        box(
            id="legend",
            position="absolute",
            width=200,
            height=200,
            right=25,
            top=25,
        ),
    )
)

# Access the computed layout

(layout / "legend").height
[box.width for box in layout.glob("/calender/*")]
layout["/legend"].x(0.5)  # horizontal center of the legend box


# Make a simple drawing of all boxes in the layout
from domtree.svg import svg, g, rect, text

print(
    svg(width=layout.width, height=layout.height)(
        g(name=name)(
            rect(
                fill="rgba(0,0,0,0.1)",
                stroke="rgba(0,0,0,0.4)",
                stroke_width=".3",
                x=box.left,
                y=box.top,
                height=box.height,
                width=box.width,
            ),
            text(
                x=box.x(0.5),
                y=box.y(0.5),
                text_anchor="middle",
                font_size=10,
                alignment_baseline="middle",
            )(name),
        )
        for name, box in layout.items()
    )
)
```
image2patch 0.1.1
A library that splits the image into overlapping or non-overlapping patches with the optimal step in order to minimize pixels loss. It can then merge them back together.
License: MIT
Requires Python: >=3.7,<4.0
Keywords: patch,split,augmentation,image,overlap

# image2patch
`image2patch` splits the image in different patches with automatic detection of the best step in order to minimize pixels loss. The overlap between patches depends on the patch size.
Alternatively, it is possible to choose the step size.  
The reconstruction of the original image is possible using `patch2image` which can merge the patches taking into account the overlap percentage among patches. Hence, the original image is perfectly restored. 
If there is a minimum pixels loss during patching procedure, resize to its original dimensions is possible. 

## Example
![pic](example.png)

## Installation
```Python
pip install image2patch
```
```Python
from image2patch import image2patch
```
```Python
from image2patch import patch2image
```
## How to use it
`image2patch(image, patch_size, step=None, verbose=False)`

In particular:
- image : 2D input image
- patch_size : dimension of the window
- step : the distance from one step to another, if =None it will be automatically detected in order to avoid pixels loss. If set = patch_size it will provide patches without overlapping but with pixels loss depending on the size of the input image. 
- verbose : if =True it provides details. 
 

`patch2image(patched_image, original_dims, step, resize_flag = True)`

In particular:
- patched_image : 2D input patches from image2patch
- original_dims : dimension of the original image
- step : step obtained from `image2patch`
- resize_flag : allows to resize the image to its original dimension in case of pixels loss. 

 
## Licence
[MIT](https://choosealicense.com/licenses/mit/)