semvec/pypi-packages huggingface dataset:
py3html 1.0.2
A very simple tool to generate html with python code.
License: MIT
Requires Python: >=3.9,<4.0
Keywords: py3html,html

# py3html

> A very simple tool to generate html with python code.

| Project       | Tabler                                                                                   |
|---------------|------------------------------------------------------------------------------------------|
| Author        | Özcan Yarımdünya                                                                         |
| Documentation | [https://ozcanyarimdunya.github.io/py3html](https://ozcanyarimdunya.github.io/py3html)   |
| Source code   | [https://github.com/ozcanyarimdunya/py3html](https://github.com/ozcanyarimdunya/py3html) |

`py3html` is a library that you can generate html by using same tree-structure python code.

## Installation

Only `python3.9+` required, no extra dependencies.

```shell
pip install py3html
```

## Usage

Basic usage

```python
import py3html as ph

code = ph.p("Hello, World")

code.html
```

**Output**

```html
<p>Hello, World</p>
```

You can add more elements with attributes.

```python
import py3html as ph

code = ph.div(
    ph.h1("Welcome", style="color: red"),
    ph.a("Click here!", href="example.com"),
    ph.p(
        "Login ",
        ph.small("to"),
        " continue!",
    ),
    class_="container"
)

code.html
```

**Output**

```html
<div class="container">
  <h1 style="color: red">Welcome</h1>
  <a href="example.com">Click here!</a>
  <p>Login <small>to</small> continue!</p>
</div>
```

## Test

This project using `pytest`.

```shell
make test
```

## Documentation

**Live preview**

```shell
make serve-docs
```

**Building**

```shell
build-docs
```

## LICENSE

```text
MIT License

Copyright (c) 2023 yarimdunya.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

```
pytorch-helper 0.0.14
Pytorch helper
License: MIT

# pytorch-helper

Supported layers

<pre>
import pytorch_helper

pytorch_helper.layers.DictToParameters
pytorch_helper.layers.DotProduct
pytorch_helper.layers.GRULastHiddenState
pytorch_helper.layers.HiddenStateResetGRU
pytorch_helper.layers.HiddenStateResetLSTM
pytorch_helper.layers.HiddenStateResetRNN
pytorch_helper.layers.LazilyInitializedLinear
pytorch_helper.layers.LSTMLastHiddenState
pytorch_helper.layers.Reshape
pytorch_helper.layers.RNNLastHiddenState
pytorch_helper.layers.SelectFromArray
</pre>

Supported utils

<pre>
import pytorch_helper

text = ''
pytorch_helper.utils.clean_english(text)
pytorch_helper.utils.clean_korean(text)
</pre>

<pre>
import pytorch_helper

from sklearn.preprocessing import MinMaxScaler
transformer = MinMaxScaler()
transformer.fit(train_df[['Open', 'High', 'Low', 'Close', 'Adj Close', 'Volume']].to_numpy())
train_np_array = transformer.transform(validation_df[['Open', 'High', 'Low', 'Close', 'Adj Close', 'Volume']].to_numpy())
train_x, train_label = pytorch_helper.utils.slice_time_series_data_from_np_array(train_np_array, x_column_indexes=[0, 1, 2, 3, 4, 5], label_column_indexes=[3], sequence_length=7)
#print(train_x.shape) #(973, 7, 6)
#print(train_labels.shape) #(973, 1)
#print(validation_x.shape) #(238, 7, 6)
#print(validation_labels.shape) #(238, 1)
</pre>
evaluate-helper 0.0.1
Evaluate helper
License: MIT


# evaluate-helper

Helper for evaluate package (https://github.com/huggingface/evaluate)

Supported metrics
<pre>
import evaluate_helper

evaluate_helper.metrics.CustomAccuracy
evaluate_helper.metrics.MeanAveragePrecision
evaluate_helper.metrics.Psnr
evaluate_helper.metrics.AverageMetrics
</pre>
pil-helper 0.0.7
Pil helper
License: MIT

# pil-helper

Supported APIs
<pre>
import pil_helper

pil_helper.utils.draw_rect(image, point1, point2)
pil_helper.utils.draw_label(image, text, point, font_color=(255, 255, 255), font_size=28)
pil_helper.utils.draw_rect_with_label(image, point1, point2, text, font_color=(255, 255, 255), font_size=28)
pil_helper.utils.draw_point(image, point)
pil_helper.utils.draw_image(image, image_to_draw, point)
</pre>
cv2-helper 0.0.7
cv2 helper
License: MIT

# cv2-helper

Helper for opencv package (https://github.com/opencv/opencv)

Supported APIs
<pre>
import cv2_helper

cv2_helper.utils.draw_rect(image, point1, point2)
cv2_helper.utils.draw_label(image, text, point, font_color=(255, 255, 255), font_size=28)
cv2_helper.utils.draw_rect_with_label(image, point1, point2, text, font_color=(255, 255, 255), font_size=28)
cv2_helper.utils.draw_point(image, point)
cv2_helper.utils.draw_image(image, image_to_draw, point)
</pre>