semvec/pypi-packages huggingface dataset:
imBroker 0.0.1
A Tensorflow Lite Image Classification Model Integration Library
Requires Python: >=3.7
Keywords: broker, tensorflow lite, image classification, flexible, real time

# TFLite Image Classification Broker

This library provides a simple interface for image classification using TensorFlow Lite models. It's designed to work with pre-trained models and can process both single images and directories of images.

## Installation

```bash
pip install imBroker
```

## Features

- Single image classification
- Batch classification for directories
- Support for custom TFLite models
- Handles any type of image shapes

## Usage

### Initializing the Broker

```python
from imBroker import tflBroker

# Define your TFlite model's path
model_path = "path/to/your/model.tflite"

# Define your output labels
output_labels = {
    0: 'Label 1',
    1: 'Label 2',
    ... 
}

# Initialize the broker
broker = tflBroker(model_path, output_labels)
```

### Classifying a Single Image

```python
result = broker.predict_single_image("path/to/image.jpg")
print(result)
```

### Classifying a Directory of Images

```python
results = broker.predict_image_directory("path/to/image/directory")
print(results)
```
anvil-web3 0.0.4
Wrapper and Web3 class to interact with and create Anvil chains

# anvil-web3
Easily interact with and create [anvil](https://github.com/foundry-rs/foundry/tree/master/crates/anvil) chains from python

## Install
`anvil-web3` assumes anvil is already installed, click [here](https://book.getfoundry.sh/getting-started/installation) if you don't have anvil installed
```
python3 -m pip install anvil-web3
```

## Usage
This example shows how to programatically create an Anvil chain and how to inject the anvil rpc methods to a
web3.py `Web3` object:
```python
from web3 import Web3, HTTPProvider
from anvil_web3 import anvil, AnvilWeb3, AnvilInstance

# create an anvil chain
instance = AnvilInstance(
    chain_id=42
)

# use the injection function
w3 = Web3(HTTPProvider(instance.http_url))
anvil(w3)

# or contruct a Web3 object from the AnvilWeb3 class (recommended for better autocompletion support)
w3 = AnvilWeb3(HTTPProvider(instance.http_url))

test_account = w3.eth.account.from_key(w3.keccak(text="42"))

# call an anvil method
w3.anvil.set_balance(test_account.address, 42424242)
assert w3.eth.get_balance(test_account.address) == 42424242 and w3.eth.chain_id == 42

instance.kill()
```
More complex demos in `/examples`

## Tests
WIP

### Current API Support

- [x] anvil_impersonateAccount
- [x] anvil_stopImpersonatingAccount
- [x] anvil_autoImpersonateAccount
- [x] anvil_getAutomine
- [x] anvil_mine
- [x] anvil_dropTransaction
- [x] anvil_reset
- [ ] anvil_setRpcUrl
- [x] anvil_setBalance
- [x] anvil_setCode
- [x] anvil_setNonce
- [x] anvil_setStorageAt
- [ ] anvil_setCoinbase
- [ ] anvil_setLoggingEnabled
- [ ] anvil_setMinGasPrice
- [ ] anvil_setNextBlockBaseFeePerGas
- [x] anvil_setChainId
- [ ] anvil_dumpState
- [ ] anvil_loadState
- [ ] anvil_nodeInfo
- [ ] evm_setAutomine
- [x] evm_setIntervalMining
- [ ] evm_snapshot
- [ ] evm_revert
- [ ] evm_increaseTime
- [x] evm_setNextBlockTimestamp
- [ ] anvil_setBlockTimestampInterval
- [ ] evm_setBlockGasLimit
- [ ] anvil_removeBlockTimestampInterval
- [ ] evm_mine
- [ ] anvil_enableTraces
- [ ] eth_sendUnsignedTransaction
alpax 0.2.0
Generate custom Ableton Live packs
Requires Python: >=3.9

# alpax

[![PyPI - Version](https://img.shields.io/pypi/v/alpax.svg)](https://pypi.org/project/alpax)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/alpax.svg)](https://pypi.org/project/alpax)
![Test & Release](https://github.com/kmontag/alpax/actions/workflows/test_and_release.yml/badge.svg?branch=main)
[![codecov](https://codecov.io/github/kmontag/alpax/graph/badge.svg?token=5C1JO6YTDL)](https://codecov.io/github/kmontag/alpax)

---

`alpax` allows you to generate custom Ableton Live packs. It supports
adding audio previews and Live 12 tags to the pack content.

Currently, only directory-based packs can be created - **generating
`.alp` files is not supported.**

Packs can be added to Live by dragging them into the Places pane.

_This is alpha software. It works for my use cases but hasn't been
extensively tested, and is missing plenty of functionality. APIs are
subject to change. Please submit issues and/or PRs if
you run into trouble._

## Installation

```console
pip install alpax
```

## Usage

```python
from alpax import DirectoryPackWriter
from time import time

with DirectoryPackWriter(
    "/path/to/output_dir",
    name="My Pack",
    unique_id="my.unique.id",
    # Tell Live to re-index the pack when it gets regenerated.
    revision=int(time()),
) as p:
    p.set_file("Preset.adg", "/path/to/Preset.adg")
    p.set_preview("Preset.adg", "/path/to/Preset.adg.ogg")
    p.set_tags("Preset", [
        ("Sounds", "Lead"),
        ("Custom", "Tag", "Subtag")
    ])

```

An async variant is also available:

```python
import asyncio
from alpax import DirectoryPackWriterAsync
from time import time

async def run():
    async with DirectoryPackWriterAsync(
        "/path/to/output_dir",
        name="My Pack",
        unique_id="my.unique.id",
        revision=int(time()),
    ) as p:
        await p.set_file("Preset.adg", "/path/to/Preset.adg")
        # ...
asyncio.run(run())
```
pydex0 1.7.0
Powerful, yet easy to use, python library for loading(and eventually writing) dex files.
Requires Python: >=3.11

<div align="center" style="margin: 25px;">
<img height="100px" src="https://raw.githubusercontent.com/yntha/pydex0/master/source/_static/logo.png"/>
</div>

# PyDex
Powerful, yet easy to use, python library for loading(and eventually writing) dex files.

[![PyPI - Version](https://img.shields.io/pypi/v/pydex0)](https://pypi.org/project/pydex0/)
[![Python application](https://github.com/yntha/pydex0/actions/workflows/run-tests.yml/badge.svg)](https://github.com/yntha/pydex0/actions/workflows/run-tests.yml)
[![Documentation Status](https://readthedocs.org/projects/pydex/badge/?version=latest)](https://pydex.readthedocs.io/en/latest/?badge=latest)

PyDex is a Python library for the analysis and instrumentation of Android/Dalvik bytecode. It is designed to on par with [Ben Gruver's](https://github.com/JesusFreke>) [`dexlib2`](https://github.com/JesusFreke/smali/tree/master/dexlib2) project. *PyDex is a work in progress and is not yet ready for production use.*

PyDex provides both a high-level and low-level API for interacting with Android/Dalvik bytecode. The high-level API is designed to be easy to use and abstracts away the details of the low-level API. The low-level API is designed to be more flexible and provide more control over the bytecode. The low-level API closely follows the [Dalvik executable format](https://source.android.com/docs/core/runtime/dex-format)

### Installation
PyDex can be installed using pip:
```bash
    python -m pip install --user -U pydex0
```

Unfortunately, PyDex is named *pydex0* on PyPI because the name *pydex* was already taken.

---

<div align="center">
<img height="100px" src="https://raw.githubusercontent.com/yntha/pydex0/master/source/_static/firedroid.png"/>
</div>
proportion-localised 0.1.3
Proportion Localised is a novel metric for visual anomaly detection, intended to be more interpretable than existing metrics. Published in Transactions of Machine Learning Research (TMLR) 2024: VisionAD, a software package of performant anomaly detection algorithms, and Proportion Localised, an interpretable metric.
Requires Python: >=3.6

# Proportion Localised (PL)
Proportion Localised is a novel metric for visual anomaly detection. The metric reports the proportion of anomalies in the dataset sufficiently localized at the best threshold. Note that one image may contain many anomalies.

## Getting started - IPython demo
The Github repo (https://github.com/alext1995/proportion-localised) contains demo data and a notebook:

notebooks/pl_demo.ipynb

Clone the repo and run through the notebook to get started!

## Pip package
Install the code with:
```
pip install proportion-localised
```
PyPI link: https://pypi.org/project/proportion-localised/

## Advantages of PL
PL works by splitting each ground truth image into individual anomalies (non-overlapping regions), applying the minimum area rotated bounding box to each anomaly, and measuring the IoU between the prediction and each bounding box. If the IoU > 0.3 (the default IoU limit), then the anomaly is classified as localized. A minimum width and height is enforced for each anomaly, and anomalies with a degree of overlap between each other are merged. This metric provides the researcher or professional with an interpretable method of evaluation for anomaly detection algorithms.

P-AUC and AUPRO are the standard metrics used in the field of anomaly detection; however, these have drawbacks in that they output over a small range of values (0.8-1), are not interpretable, are sensitive to noise from ambiguous pixel-wise labels, and in the case of P-AUC, weigh anomalies in proportion to their size.

Proportion Localised mitigates these drawbacks. The rotated bounding boxes ensure that noise from ambiguous pixel labels is mitigated, and the splitting of the ground truth into discrete anomalies means that each anomaly is weighted equally, regardless of its size. As the output is a proportion, the metric reports between 0 and 1, and the metric has a real physical relation.

## Transactions of Machine Learning Research (TMLR) Publication
More details can be found in the Transactions of Machine Learning Research (TMLR) publication: VisionAD, a software package of performant anomaly detection algorithms, and Proportion Localised, an interpretable metric.
printinglog 0.0.1
Python logging instead of complicated print
Requires Python: >=3.9
Keywords: log, logger, logging, loguru

# Simple Logging Module

I've been using pythons built-in logging for my previous projects, but i discovered that it doesn't work as expected when running cronjobs in docker containers. The logger fails to write to the specified file because cronjobs operate in a limited environment with different permissions. They often capture standard output and error to a default file, usually ```cron.log``` in my case. While there might be ways to fix this, as a coder, it feels much better to write my own logging module; it would be a disgrace otherwise. So with this module, i can read the logs from cron.log since it uses print statements with logging formatting.

### Install
Install the module with:
```bash
pip install printinglog
```

### Usage
To start using `printinglog`, initialize the logger with:
```python
from printinglog import Logger

logger = Logger()

logger.info("This is a INFO log")
```

You can also change how much detail you want to show in your log:
```python
logger = Logger(format="simple")
logger.info("This is a INFO log")
>> INFO: This is a INFO log

logger = Logger(format="logging")
logger.info("This is a INFO log")
>> 2024-07-26 22:55:28 - INFO: This is a INFO log

logger = Logger(format="detailed")
logger.info("This is a INFO log")
>> 2024-07-26 22:55:28 @main - INFO: This is a INFO log

logger = Logger(format="long")
logger.info("This is a INFO log")
>> INFO: This is a INFO log
2024-07-26 22:55:28 @main<test_function> - INFO: This is a INFO log
```

To change the colors for each log type, you can also specify that:
```python
default_colors = {
    "info": "green",
    "error": "red",
    "warning": "yellow",
    "debug": "blue",
}
logger = Logger(colorscheme=default_colors)
```

Colors to choose from:
* black
* red
* green
* yellow
* blue
* magneta
* cyan
* white
puentespablojosuecuadrado 0.1.0
paquetedeprueba
Requires Python: <3.12,>=3.10.0

# puentespablojosuecuadrado

Una biblioteca que permite realizar operaciones de ingeniería con puentes.

## Tabla de Contenidos

- [Instalación](#instalación)
- [Uso](#uso)
- [Características](#características)
- [Licencia](#licencia)
- [Contacto](#contacto)

## Instalación

Instala la librería usando `pip`:

```bash
pip install puentespablojosuecuadrado
```

## Uso

Ejemplo de uso

```Python
from resistencias.tuberias import leer_datos_desde_diccionario, optimizar_red, mostrar_red

if __name__ == "__main__":
    # Opción 2: Leer datos desde un diccionario
    datos = [
        {"point_id": 1, "x": 0, "y": 0, "demand": 10},
        {"point_id": 2, "x": 10, "y": 0, "demand": 15},
        {"point_id": 3, "x": 20, "y": 10, "demand": 20},
        {"point_id": 4, "x": 30, "y": 5, "demand": 25},
    ]
    puntos_desde_diccionario = leer_datos_desde_diccionario(datos)

    conexiones = optimizar_red(puntos_desde_diccionario)
    mostrar_red(puntos_desde_diccionario, conexiones)
```
## Características

- Operaciones matemáticas básicas
- Optimización de redes de distribución de agua
- Lectura de puntos de red

## Licencia
Este proyecto está licenciado bajo la MIT License.

## Contacto
Información de contacto:

Nombre: Pablo Cuadrado
Email: pjcuadraado@utpl.edu.ec
GitHub: pablocuadrado2004
puentestayro 0.1.0
Paquete de ejemplo
Requires Python: <3.12,>=3.10.0

# puentesantiago

Una biblioteca que permite realizar operaciones de ingeniería con puentes.

## Tabla de Contenidos

- [Instalación](#instalación)
- [Uso](#uso)
- [Características](#características)
- [Licencia](#licencia)
- [Contacto](#contacto)

## Instalación

Instala la librería usando `pip`:

```bash
pip install puentessantiago
```

## Uso

Ejemplo de uso

```Python
from resistencias.tuberias import leer_datos_desde_diccionario, optimizar_red, mostrar_red

if __name__ == "__main__":
    # Opción 2: Leer datos desde un diccionario
    datos = [
        {"point_id": 1, "x": 0, "y": 0, "demand": 10},
        {"point_id": 2, "x": 10, "y": 0, "demand": 15},
        {"point_id": 3, "x": 20, "y": 10, "demand": 20},
        {"point_id": 4, "x": 30, "y": 5, "demand": 25},
    ]
    puntos_desde_diccionario = leer_datos_desde_diccionario(datos)

    conexiones = optimizar_red(puntos_desde_diccionario)
    mostrar_red(puntos_desde_diccionario, conexiones)
```
## Características

- Operaciones matemáticas básicas
- Optimización de redes de distribución de agua
- Lectura de puntos de red

## Licencia
Este proyecto está licenciado bajo la MIT License.

## Contacto
Información de contacto:

Nombre: Tayron Correa
Email: tcorrealoaiza@gmail.com
GitHub:
platedet 0.0.2
Detect license plates
Requires Python: <4,>=3.5
Keywords: plate, detection, brazilian


# platedet

`platedet` is a lightweight package for detecting license plates in images using an ONNX model. It is designed to be part of a pipeline for detecting, cropping, and reading license plates. The underlying model is just YOLO, converted to ONNX format. The training data comprises primarily Brazilian license plates, sourced from internet images.

## Installation

To install the required dependencies, use the following command:

For cpu

```bash
pip install "platedet[cpu]"
```

For cuda 11.X
```bash
pip install "platedet[gpu]"
```

For cuda 12.X
```bash
pip install "platedet[gpu]" --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
```

## Usage

### Command Line Interface

You can use the command line interface to detect license plates in an image:

```bash
platedet image_path [--model_path MODEL_PATH] [--return_types RETURN_TYPES] [--providers PROVIDERS] [--save_images] [--show_result]
```

#### Arguments

- `image_path`: Path to the input image.
- `--model_path`: Path to the ONNX model (default: `artifacts/platedet.onnx`).
- `--return_types`: Output formats (choices: `raw`, `pil`, `np_array`, `boxes`).
- `--providers`: ONNX Runtime providers (default: `CPUExecutionProvider`).
- `--save_images`: Save cropped images of detected plates.
- `--show_result`: Display results with bounding boxes and confidence scores.

### Example

To detect license plates and save the cropped images:

```bash
platedet path/to/image.png --save_images
```

To display the results with bounding boxes:

```bash
platedet detect.py path/to/image.png --show_result
```

### Using in Code

```python
from PIL import Image
from platedet import Platedet

platedet = Platedet()
image = Image.open('examples/1.jpg')
crops = platedet.inference(image, return_types=['pil'])
for idx, crop in enumerate(crops['pil']['images']):
    crop.save(f'{idx}.jpg')
```

If you want to use CUDA:
```python
from PIL import Image
from platedet import Platedet

platedet = Platedet(providers=["CUDAExecutionProvider"])
image = Image.open('examples/1.jpg')
crops = platedet.inference(image, return_types=['pil'])
for idx, crop in enumerate(crops['pil']['images']):
    crop.save(f'{idx}.jpg')
```

Check all execution providers [here](https://onnxruntime.ai/docs/execution-providers/).