semvec/pypi-packages huggingface dataset:
filesystems 2024.8.1
A filesystem abstraction layer
Requires Python: >=3.8
Keywords: filesystem

===========
Filesystems
===========

|PyPI| |Pythons| |CI|

.. |PyPI| image:: https://img.shields.io/pypi/v/filesystems.svg
   :alt: PyPI version
   :target: https://pypi.python.org/pypi/filesystems

.. |Pythons| image:: https://img.shields.io/pypi/pyversions/filesystems.svg
   :alt: Supported Python versions
   :target: https://pypi.python.org/pypi/filesystems

.. |CI| image:: https://github.com/Julian/Filesystems/workflows/CI/badge.svg
  :alt: Build status
  :target: https://github.com/Julian/Filesystems/actions?query=workflow%3ACI
validacion-terrenos 0.2.0
Validacion atributos terrenos
Requires Python: >=3.6

# terrenos_sahagun

ValidaciÃ³n atributos terrenos actualizaciÃ³n catastral de Sahagun.

## Requisitos

Este paquete requiere que `arcpy` estÃ© instalado y configurado en el entorno. `arcpy` es una biblioteca propietaria de Esri que viene con ArcGIS y no se distribuye a travÃ©s de PyPI.

## InstalaciÃ³n

Para instalar este paquete, usa el siguiente comando:

```sh
pip install terrenos_sahagun
async-executor 0.1.2
Async execution pool

# async-executor
[![PyPI - Version](https://img.shields.io/pypi/v/async-executor.svg)](https://pypi.org/project/async-executor)

Async execution pool

## Examples
### Limit the number of concurrently running awaitables
```python
import asyncio
import time

import async_executor


async def sleep_and_print(i):
    print(f'{i} {int(time.time())} - before sleep')
    await asyncio.sleep(1)
    print(f'{i} {int(time.time())} - after sleep')


async def main():
    # limit to a maximum of two concurrent executions
    executor = async_executor.AsyncExecutor(max_concurrent=2)

    # awaitables are only queued here - nothing is run
    for i in range(5):
        executor.submit(sleep_and_print, i)

    # awaitables begin executing
    async for task in executor:
        task.result()

asyncio.run(main())
```

This shows that only a maximum of two executions are allowed to run concurrently.
```
$ python examples/example_1.py
0 1670613515 - before sleep
1 1670613515 - before sleep
0 1670613516 - after sleep
1 1670613516 - after sleep
2 1670613516 - before sleep
3 1670613516 - before sleep
2 1670613517 - after sleep
3 1670613517 - after sleep
4 1670613517 - before sleep
4 1670613518 - after sleep
```

## Installation

```console
pip install async-executor
```

## License

`async-executor` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
aiohttp-rq 0.0.8
aiohttp client workers with redis in/out queues

### Installation
```bash
$ pip install aiohttp-rq
```

### Environment variables
Variable|default
-|-
`AIOHTTP_RQ_DIR`|`None`
`AIOHTTP_RQ_REQUEST_QUEUE`|`aiohttp-rq-request`
`AIOHTTP_RQ_RESPONSE_QUEUE`|`aiohttp-rq-response`
`AIOHTTP_RQ_EXCEPTION_QUEUE`|`aiohttp-rq-exception`

optional
Variable|default
-|-
`AIOHTTP_RQ_LOG_CONFIG_FILE`|`None`
`AIOHTTP_RQ_TTL_DNS_CACHE`|`10`
`REDIS_HOST`|`localhost`
`REDIS_PORT`|`6379`
`REDIS_DB`|`0`

### Features
+   logging
    +   `DEBUG`, `ERROR` level messages
    +   `logging.conf` support
+   request: `method`,`url`, `headers`, `data`,`allow_redirects`, custom arguments
+   response: `url`, `status`, `headers`,`content_path`, `request_xxx` arguments
+   request exception: `url`, `exc_class`, `exc_message`, `request_xxx` arguments

### Examples
```bash
$ export AIOHTTP_RQ_REQUEST_QUEUE="aiohttp-rq-request"
$ export AIOHTTP_RQ_RESPONSE_QUEUE="aiohttp-rq-response"
$ export AIOHTTP_RQ_EXCEPTION_QUEUE="aiohttp-rq-exception"
$ export AIOHTTP_RQ_TTL_DNS_CACHE=3600 # optional
$ python3 -m aiohttp_rq 50 # 50 workers

```

redis client
```python
import redis

REDIS = redis.Redis(host='localhost', port=6379, db=0)
```

#### Redis push

```python
value=json.dumps(dict(
    url='https://domain.com',
    method="GET",
    headers=None,
    data=None,
    allow_redirects=True
))
REDIS.rpush('aiohttp-rq-request',*values)
```

#### Redis pull

```python
item_list = REDIS.lrange('aiohttp-rq-response',0,-1)
data_list = list(map(lambda i:i.encode('utf-8'),item_list))

item_list = REDIS.lrange('aiohttp-rq-exception',0,-1)
data_list = list(map(lambda i:i.encode('utf-8'),item_list))
```
moroccan-licence-plate 0.1.2
Detection and recognition of moroccan car licence plates.
Requires Python: >=3.11

# CHARACTER DETECTION PIPLINE OF CAR LICENCE PLATES

In this repository you will find a method to recognize the numbers of a car plate in street view images.

If you want to build a license plate detection model in your country, but couldn't find a pre-trained model or an annotated dataset (bounding boxes on both plates and characters inside the plates) because you have characters in a different language (like Arabic, Chinese, Hindi...). This repository can be useful to you.

The used pipeline for character recognition from car images can be summarized in three steps:
- find the bounding box of the full licence plate in an image using a trained yolov3.
- find the bounding box of each character in the plate using a customized yolov3 trained on synthesized data.
- reconstruct the plate number based on the bounding box positions.

<img src="https://github.com/taoufik1el/plate_characters_detection/blob/main/images/car.jpg" width="400" height="400">

<img src=https://github.com/taoufik1el/plate_characters_detection/blob/main/images/plate.png width="400" height="100">

<img src=https://github.com/taoufik1el/plate_characters_detection/blob/main/images/plate_with_boxes.png width="400" height="100">


There is a possibility to use classical computer vision methods (canny, thresholding ...) to detect the plate and the characters, but this solutions are not robust,
for example the images can contain, different kinds of noise and backgrounds. Also OCR solutions like [Tesseract](https://github.com/tesseract-ocr/tesseract) does not work for noisy images.

This is why a neural network based solutions can be a good solution, by training it on a varied dataset.

YOLO (You Only Look Once) is one efficient NN model in object detection, it's performant in terms of accuracy and inference time.

For The first step, we will use a trained yolo model to detect the licence plates in images, the pretrained models can be found [here](https://github.com/ThorPham/License-plate-detection) and [here](https://github.com/oublalkhalid/MoroccoAI-Data-Challenge).

But For the second step, didn't find any annotated dataset or any trained model annotated dataset that can detect digits and arabic characters of the moroccan plates, so we will create our dataset and train a custumize yolo.

For the creation of datasets, we just take random images as backgrounds and write on top of them characters with different [fonts](https://fonts.google.com/) and sizes, then we can use some artifacts (rotations, perspectives, blur, noise ...) in the online data auguementation, then we feed those images to the model.
config-server-client-python 1.0.2
Streamline configuration management by fetching and updating configurations from a Spring Cloud Config Server in Python.

# config-server-client-python

Streamline configuration management by fetching and updating configurations from a Spring Cloud Config Server in Python.

## Overview

`config-server-client-python` is a client library designed to interact with the Spring Cloud Config Server, facilitating seamless integration of configuration properties into your Python applications. This package is particularly useful for applications built using frameworks such as Django and Flask.

## Features

- Fetch configurations from a Spring Cloud Config Server.
- Update configurations as environment variables within the container.
- Easy integration with Python frameworks like Django and Flask.
- Simplified configuration management for microservices architecture.

## Installation

Add `config-server-client-python` to your `requirements.txt` file:
```python
config-server-client-python==<version_no>
```
## Usage

### Django/Flask Integration

In your `manage.py` or equivalent entry point, import the `ConfigServerPythonClient`:

```python
from src.config_server_python_library import ConfigServerPythonClient

client = ConfigServerPythonClient(
    os.getenv('CONFIG_SERVER_URL'), 
    <service-name>, 
    <profile-list>, 
    os.getenv('COMMIT_ID'), 
    os.getenv('ENV_NAMESPACE')
)
client.write_configs_to_env()
```
This will retrieve the configurations from the Spring Cloud Config Server and set them as environment variables for your application.

## Development and Deployment

### Pushing a New Version to Nexus


1} Clone config-server-client-python repo.

```
git clone https://github.com/jayantreddy181198/config-server-client-python.git <destination_path>/tm-config-server-client-python
```

2} Install twine and setuptools from pypi if not exists already.
```
pip install twine setuptools
```

3} RUN below command to create sdist.
```
python setup.py sdist bdist_wheel
```

4} Upload package to nexus.
```
twine upload dist/*
```%
APIFixer 1.1.1
APIFixer is a Python class that automatically starts an API server, checks its routes, generates documentation based on the OpenAI API, and tests API endpoints to fix bugs and improve API performance.
Keywords: python, logs, api, fastapi, docs, ai, openai

# APIFixer

APIFixer is a powerful automation tool built for API developers. It starts an API server using Uvicorn, analyzes its routes, generates detailed documentation using OpenAI, and performs automated tests of API endpoints. Key features include:

1. API Server Startup: Allows you to easily start the server with minimal configuration.
2. API Documentation Generation: Uses OpenAI to generate detailed documentation based on API routes.
3. Automatic testing of API routes: Checks for errors and writes the results to a log file.
4. Support for auto-close server: Ability to automatically close the server after all tasks are completed.
5. This tool simplifies the API development and testing process, minimizes errors, and creates easy-to-use documentation.

Developed by Bohdan Terskow (c) 2024

## Usage Process

### Parameter Setup:

Define parameters when initializing the APIFixer class, such as resource (resource), host (host), port (port), and the OpenAI API key (openai_api_key).

### Start the server and generate documentation:

Call the run method to start the server. This method also starts the route validation process, which automatically generates documentation and performs API testing.

### Testing and Logging:

API route validation and testing occurs in the background and the results are written to a log file.

### Auto-close server:

If auto_close_server=True is set, the server will automatically close after all tasks are completed.

```python
fixer = APIFixer(
    resource='main:app',
    host='127.0.0.1',
    port=8000,
    openai_api_key='your_openai_api_key'
)

fixer.run(auto_close_server=True)
```
netauth 0.1.0
NetAuth client library
Requires Python: >=3.11
Keywords: secure-access, authentication-service, netauth

## netauth-python

A [NetAuth](https://netauth.org) client library for Python.

### Installation

```
pip install netauth
```

### Usage

netauth-python centers around the `NetAuth` object:

```py
na = netauth.NetAuth("netauth.example.org")

try:
    resp = na.system_status()
    print(resp)
except netauth.error.NetAuthRpcError as e:
    print(f"Request failed: {e}")

na.close()
```

`NetAuth` can also be used as a context manager and be initialized from a NetAuth configuration file:

```py
with netauth.NetAuth.with_config(Path("/etc/netauth/config.toml")) as na:
    try:
        resp = na.system_status()
        print(resp)
    except netauth.error.NetAuthRpcError as e:
        print(f"Request failed: {e}")
```

For interactive or dynamic applications, operations that require authentication can use a callback to retrieve the user's secret:

```py
def secret_cb() -> str:
    return getpass(prompt="Secret: ")

with netauth.NetAuth("netauth.example.org", entity="demo", secret=secret_cb) as na:
    try:
        na.entity_kv_add("demo", "foo", ["bar", "baz"])
    except error.NetAuthRpcError as e:
        print(e)
```

For more information, see the [API documentation](https://python.netauth.org).
spitfire3 0.2.8
Spitfire port forPython3

# ![Spitfire][]

[![PyPI version](https://badge.fury.io/py/spitfire3.svg)](https://badge.fury.io/py/spitfire3)


## Introduction

Spitfire is a high-performance Python template language inspired
by [Cheetah][].  It originally started out as an experiment to
see if techniques used in compilers were applicable to
templates.  Spitfire has been the primary template language for
[youtube.com][] since 2008 and is used to generate
[billions of views a day][].

This particular fork is made so that Spitfire can work with Python 3.


## Example

```html
<html>
<head><title>$title</title></head>
<body>
  <ul>
    #for $user in $users
      <li><a href="$user.url">$user.name</a></li>
    #end for
  </ul>
</body>
</html>
```


## Getting Started

Spitfire's syntax is extremely similar to Cheetah, however some
directives and language features have been omitted.  If you're
already using Cheetah, simple templates will likely compile in
Spitfire, and there are a couple compatibility modes to ease
transition.


## Performance

Spitfire has a basic optimizer that can make certain operations
much faster.  Using a basic 10x1000 table generation benchmark,
Spitfire can be faster than other template systems and compares
very favorably to hand-coded Python (the upper limit of
performance achievable by compiling to Python bytecode).
This is by no means exhaustive proof that Spitfire is always
fast, just that it can provide very high performance.

```
# Python 3.10.9 (main, Dec 19 2022, 17:35:49) [GCC 12.2.0] on linux
$ python tests/benchmarks/render_benchmark.py
Running benchmarks 1000 times each...

Genshi tag builder                            646.05 ms
Genshi template                               226.59 ms
Genshi template + tag builder                 448.92 ms
Mako Template                                  58.38 ms
Spitfire template                              33.79 ms
Spitfire template -O1                          20.66 ms
Spitfire template -O2                          12.94 ms
Spitfire template -O3                           8.19 ms
StringIO                                        7.95 ms
cStringIO                                       9.73 ms
list concat                                     7.32 ms
Jinja2 templates                               15.84 ms

```


[Cheetah]: http://www.cheetahtemplate.org/
[youtube.com]: https://www.youtube.com/
[billions of views a day]: https://www.youtube.com/yt/press/statistics.html

[Spitfire]: https://raw.githubusercontent.com/re-masashi/spitfire/master/doc/Spitfire.png
pyrepo-mcda 0.1.8
Python library for Multi-Criteria Decision Analysis.
Requires Python: >=3.6

# pyrepo-mcda

The Python 3 library for Multi-Criteria Decision Analysis.

## Installation

```
pip install pyrepo-mcda
```

## Usage

`pyrepo-mcda` can be used to rank alternatives after providing their performance values in the two-dimensional decision matrix `matrix`
with alternatives in rows and criteria in columns, and criteria weights `weights` and types `types` in vectors. 
All criteria weights must sum to 1. Criteria types are equal to 1 for profit criteria and -1 for cost criteria. The TOPSIS method returns a
vector with preference values `pref` assigned to alternatives. To rank alternatives according to TOPSIS preference values, we have to sort them
in descending order because, in the TOPSIS method, the best alternative has the highest preference value. The alternatives are ranked using 
the `rank_preferences` method provided in the `additions` module of the `pyrepo-mcda` package. Parameter `reverse = True` means that alternatives 
are sorted in descending order. Here is an example of using the TOPSIS method:

```python
import numpy as np
from pyrepo_mcda.mcda_methods import TOPSIS
from pyrepo_mcda import distance_metrics as dists
from pyrepo_mcda import normalizations as norms
from pyrepo_mcda.additions import rank_preferences

matrix = np.array([[256, 8, 41, 1.6, 1.77, 7347.16],
[256, 8, 32, 1.0, 1.8, 6919.99],
[256, 8, 53, 1.6, 1.9, 8400],
[256, 8, 41, 1.0, 1.75, 6808.9],
[512, 8, 35, 1.6, 1.7, 8479.99],
[256, 4, 35, 1.6, 1.7, 7499.99]])

weights = np.array([0.405, 0.221, 0.134, 0.199, 0.007, 0.034])
types = np.array([1, 1, 1, 1, -1, -1])

topsis = TOPSIS(normalization_method=norms.vector_normalization, distance_metric=dists.euclidean)
pref = topsis(matrix, weights, types)
rank = rank_preferences(pref, reverse = True)
print(rank)
```

## License

`pyrepo-mcda` was created by Aleksandra Bączkiewicz. It is licensed under the terms of the MIT license.

## Documentation

Documentation of this library with instruction for installation and usage is 
provided [here](https://pyrepo-mcda.readthedocs.io/en/latest/)
VortexKit 0.1.6
A lightweight, customizable WSGI framework designed to handle web requests with ease and flexibility.
Requires Python: <4.0,>=3.10

# 🌪️ VortexKit

VortexKit is a lightweight, customizable WSGI framework designed to handle web requests with ease and flexibility. It's perfect for building web applications quickly and efficiently. 🚀

## 🌟 Features

- ⚡ **Lightweight**: Minimal overhead, lightning-fast performance.
- 🛠️ **Customizable**: Easily extend and modify to fit your needs.
- 📦 **Built-in Tools**: Includes request parsing, routing, and more.
- 🧪 **Test-Friendly**: Designed with testing in mind.

## 🚀 Getting Started

### 📦 Installation

Install VortexKit via pip:

```bash
pip install vortexkit
```

### 🔧 Usage

Create a simple application with VortexKit:

```python
from vortexkit import App, PlainTextResponse, Request

app = App()

@app.route("/")
def home(req: Request):
    return PlainTextResponse(f"Hello, World! Your requesting from {req.path}!")

if __name__ == "__main__":
    app.run("localhost", 8080)
```

Run your application:

```bash
python app.py
```

### 🛠️ Advanced Usage

#### Handling Different Content Types

VortexKit can handle various content types including JSON, XML, and multipart form data.
View more examples in the [Examples Folder](/examples/)

```python
from vortexkit import App, JSONResponse, Request

app = App()

@app.route('/upload')
def upload(req: Request):
    if req.method.upper() is not 'POST':
        return JSONResponse({"error": "Unsupported method"}, status="400 Bad Request")
    if req.content_type.startswith('multipart/form-data'):
        file_data = req.body.get('file')
        return JSONResponse({"filename": file_data.filename, "content": file_data.file.read().decode()})
    return JSONResponse({"error": "Unsupported Content Type"}, status_code="400 Bad Request")

if __name__ == "__main__":
    app.run("localhost", 8080)
```

#### Manually registering routes

VortexKit allows dynamic route definitions tailored to your application's specific needs, empowering precise control and flexibility.

```python
from vortexkit import App, PlainTextResponse, Request

app = App()

def homeRoute(request: Request):
    return PlainTextResponse("Hello world!")

app.add_route("/", homeRoute)

if __name__ == "__main__":
    app.run("localhost", 8080)
```

### 📖 Documentation

For detailed documentation, visit the [VortexKit Docs](https://github.com/daftscientist/VortexKit/wiki).

## 💻 Contributing

We welcome contributions! Please see our [CONTRIBUTING.md](https://github.com/daftscientist/VortexKit/blob/main/CONTRIBUTING.md) for details.

## 📝 License

This project is licensed under the MIT License - see the [LICENSE](https://github.com/daftscientist/VortexKit/blob/main/LICENSE) file for details.

## 🎉 Acknowledgements

Thanks to all contributors and supporters of VortexKit. Your efforts make this project better every day. 🌟
winbox 0.2.0
A lightweight helper for creating windows message boxes.
Requires Python: >=3.8

# Winbox

![image](https://img.shields.io/github/languages/code-size/hazyfossa/winbox?style=flat&label=size)
[![image](https://img.shields.io/pypi/v/winbox.svg)](https://pypi.python.org/pypi/winbox)
[![image](https://img.shields.io/pypi/l/winbox.svg)](https://pypi.python.org/pypi/winbox)
[![image](https://img.shields.io/pypi/pyversions/winbox.svg)](https://pypi.python.org/pypi/winbox)

A lightweight helper for creating windows message boxes.
Built to be as slim as possible. No dependencies, except Python itself!

Useful when you:

- only need a message-box notification in your app, nothing more.
- want a simple GUI for your script, without the complexity of a full framework.
- are writing a background service and need to notify the user, without unexpectedly opening a terminal.

# Example

```py
from winbox import Box, Type, Response, Icon

box = Box("Example App", type=Type.YESNO, icon=Icon.QUESTION)

response = box.send("Is this example working?")

match response:
    case Response.YES:
        print("Great!")
    case Response.NO:
        print("Uh-oh...")
```
here-debugger 2.0.0
A user friendly debugger, just like print statement, but much more.
Requires Python: >=3.6

# Here-Debugger
This user-friendly debugger simplifies the debugging process by accepting any number of variables and printing their names, values, and line numbers. It also offers options to add search text and include variable type information for enhanced clarity.

Pypi: https://pypi.org/project/here-debugger/

## Features:
- Prints variable names and values
- Displays line number of the variables
- Option to add search text
- Option to include variable type information

## Installation
To install the debugger, use:
```pip install here-debugger```

## Usage
1. Print variable names and values.
   ```
   from here_debugger.debug import here_debug
   a = 2
   b = "Bibhash"
   here_debug(a, b)
   ```
   Output:
   ```File: <current_file>: Line-4: a = 2 | b = Bibhash |```

2. Add search text:
    ```
   from here_debugger.debug import here_debug
   a = 2
   b = "Bibhash"
   here_debug(a,b, custom_search_text="Debug-")
   ```
   Output:
   ```Debug-: File: <current_file>: Line-4: a = 2 | b = Bibhash |```

3. Print variable type information:
   ```
   from here_debugger.debug import here_debug
   a = 2
   b = "Bibhash"
   c = [2,2]
   d = {}
   here_debugger(a,b,c,d, custom_search_text="Debug-", include_types=True)
   ```
   Output: ```Debug-: File: <current_file>: Line-6: a = 2, type = <class 'int'> | b = Bibhash, type = <class 'str'> | c = [2, 2], type = <class 'list'> | d = {}, type = <class 'dict'> | ```

4. Update: Now supports constants:
   ```
   from here_debugger.debug import here_debug
   a = 2
   here_debug(a,"Bibhash", custom_search_text="Debug-")
   ```
   Output:
   ```Debug-: File: <current_file>: Line-4: a = 2 | Bibhash |```

## Test Case Coverage: 98%
[![here-debugger-coverage-report.png](https://i.postimg.cc/859qd2Kv/here-debugger-coverage-report.png)](https://postimg.cc/5Y57bRM9)