semvec/pypi-packages huggingface dataset:
pyapacheatlas 0.16.0
A package to simplify working with the Apache Atlas REST APIs for Atlas and Azure Purview.
Requires Python: >=3.6

# PyApacheAtlas: A Python SDK for Azure Purview and Apache Atlas

PyApacheAtlas lets you work with the Azure Purview and Apache Atlas APIs in a Pythonic way. Supporting bulk loading, custom lineage, custom type definition and more from an SDK and Excel templates / integration.

The package supports programmatic interaction and an Excel template for low-code uploads.

## Using Excel to Accelerate Metadata Uploads

* Bulk upload entities.
  * Upload entities / assets for built-in or custom types.
  * Supports adding glossary terms to entities.
  * Supports adding classifications to entities.
  * Supports creating relationships between entities (e.g. columns of a table).
* Creating custom lineage between existing entities.
* Defining Purview Column Mappings / Column Lineage.
* Bulk upload custom type definitions.
* Bulk upload of classification definitions (Purview Classification Rules not supported).

## Using the Pythonic SDK for Purview and Atlas

The PyApacheAtlas package itself supports those operations and more for the advanced user:
* Programmatically create Entities, Types (Entity, Relationship, etc.).
* Perform partial updates of an entity (for non-complex attributes like strings or integers).
* Extracting entities by guid or qualified name.
* Creating custom lineage with Process and Entity types.
* Working with the glossary.
  * Uploading terms.
  * Downloading individual or all terms.
* Working with classifications.
  * Classify one entity with multiple classifications.
  * Classify multiple entities with a single classification.
  * Remove classification ("declassify") from an entity.
* Working with relationships.
  * Able to create arbitrary relationships between entities.
  * e.g. associating a given column with a table.
* Deleting types (by name) or entities (by guid).
* Performing "What-If" analysis to check if...
   * Your entities are valid types.
   * Your entities are missing required attributes.
   * Your entities are using undefined attributes.
* Azure Purview's Search: query, autocomplete, suggest, browse.
* Authentication to Azure Purview using azure-identity and Service Principal
* Authentication to Apache Atlas using basic authentication of username and password.
imhblpce 1.0.0
This module attempts to enhance contrast of a given image by employing a method called HBLPCE.
Keywords: python,histogram,imhblpce,hblpce,histogram equalization,histogram based equalization,histogram locality preserving,contrast enhancement


[![PyPI Latest Release](https://img.shields.io/pypi/v/imhblpce.svg)](https://pypi.org/project/imhblpce/)
[![Package Status](https://img.shields.io/pypi/status/imhblpce.svg)](https://pypi.org/project/imhblpce/)
[![Downloads](https://pepy.tech/badge/imhblpce)](https://pepy.tech/project/imhblpce)
[![License](https://img.shields.io/pypi/l/imhblpce.svg)](https://github.com/Mamdasn/imhblpce/blob/main/LICENSE)
![Repository Size](https://img.shields.io/github/repo-size/mamdasn/imhblpce)


# imhblpce
This module attempts to enhance contrast of a given image by employing a method called HBLPCE [Histogram-Based Locality-Preserving Contrast Enhancement]. This method enhances contrast of an image through equalizing its histogram, while keeping an eye on histogram's general shape, to conserve overall brightness and prevent excessive enhancement of the image.  

You can access the article that came up with this method [here](https://www.researchgate.net/publication/272424815_Histogram-Based_Locality-Preserving_Contrast_Enhancement).  

Through formulating their approach, a minimization problem is introduced and solved using cvxpy library in python.

## Installation

Run the following to install:

```python
pip install imhblpce
```

## Usage

```python
import numpy as np
import cv2
from imhblpce import imhblpce

def imresize(img, wr=500, hr=None): # This is just for imshow-ing images with titles
    [ h, w, d] = img.shape
    hr = (h*wr)//w if not hr else hr
    img_resized = cv2.resize(img, dsize=(wr, hr))
    return img_resized

def main():
    image_name = 'assets/Countryside.jpg'
    image = cv2.imread(image_name)

    # converts rgb image to hsv
    hsv_image = cv2.cvtColor(image, cv2.COLOR_BGR2HSV)
    v_image = hsv_image[:, :, 2]
    v_image_hblpce = imhblpce(v_image)
    
    hsv_image_hblpce = hsv_image.copy()
    hsv_image_hblpce[:, :, 2] = v_image_hblpce
    image_hblpce = cv2.cvtColor(hsv_image_hblpce, cv2.COLOR_HSV2BGR)

    # This is just for imshow-ing images with titles

    cv2.imshow('Original Image', imresize(image))
    cv2.imshow('HBLPCE-d Image', imresize(image_hblpce))
    cv2.waitKey(0)
    
if __name__ == '__main__': main()
```  
Or  
```Bash
imhblpce --input 'Countryside.jpg' --output 'Countryside-imhblpce.jpg'
```  

## Showcase
This is a sample image
![Countryside.jpg Image](https://raw.githubusercontent.com/Mamdasn/imhblpce/main/assets/Countryside.jpg "Countryside.jpg Image")
The sample image enhanced by HBLPCE method
![Countryside-imhblpce.jpg Image](https://raw.githubusercontent.com/Mamdasn/imhblpce/main/assets/Countryside-imhblpce.jpg "Countryside-imhblpce.jpg")