semvec/pypi-packages huggingface dataset:
PolygonCollision 0.0.6
A simple python collision dectection tool
Requires Python: >=2.7

<img src="https://raw.githubusercontent.com/vertmit/PolygonCollision/aa4848617edbad97b15d97c889084a235e973b6f/logo.png" width="200"/>
<br>

PolygonCollision is a Python module designed for efficient collision detection between 2D polygons. Using the Separating Axis Theorem (SAT), this library enables precise detection of intersections between polygons, making it an essential tool for game developers, simulations, and applications requiring accurate collision detection between shapes.

# Features:
Polygon Collision Detection: Determine whether two 2D polygons overlap with accurate collision detection algorithms.
Customizable Shapes: Define custom 2D shapes by specifying their vertices as Vector objects.
Calculate verlocity: Calculate the verlocity between two different shapes.
Efficient Algorithm: Implementing the Separating Axis Theorem (SAT) ensures fast and reliable collision detection for complex polygons.

# How It Works:
The library checks for collisions by projecting the shapes onto various axes and checking if the projections overlap. If there is no axis along which the projections of the two shapes do not overlap, they are colliding.

# Code Examples:
```Python
import PolygonCollision

#Create Squares
polygon1 = PolygonCollision.shape.Shape(vertices = [(0, 0), (0, 10), (10, 10), (10, 0)])
polygon2 = PolygonCollision.shape.Shape(vertices = [(5, 5), (5, 15), (15, 15), (15, 5)], fill=False)

#Create Circle
circle = PolygonCollision.shape.Shape(vertices = [(30, 30)], radius = 5)

#Output The Size And Posiotion Of The Shapes
print('polygon1:', polygon1.get_width(), polygon1.get_height())

#Check For Polygons Collision
if polygon1.collide(polygon2):
    print('POLYGON COLLISION!!!')
else:
    print('no polygon colllision')

#Check For Polygons + Circle Collision
if polygon1.collide(polygon2):
    print('CIRCLE COLLISION!!!')
else:
    print('no circle colllision')
```
Output
```Output
POLYGON COLLISION!!!
no circle collision
```
# License:
This Collision Detection Library is licensed under the MIT License - see the LICENSE file for details.
cyral-gimme-db-token 0.8.4
Eases using Cyral for SSO login to databases.
Requires Python: >=3.6,<4.0

# Cyral Gimme DB Token

The Cyral Gimme DB Token is a tool used for easing the process of SSO login to databases through the command line.

## Deprecated
This tool is **deprecated** and no longer valid with Cyral Control Plane version `4.12` or later. Please use the [Cyral CLI](https://pypi.org/project/cyral/) to retrieve tokens going forward.
autodistill-hls-geospatial 0.1.0
Use the HLS Geospatial model made by NASA and IBM to generate masks for use in training a fine-tuned segmentation model.
Requires Python: >=3.7

<div align="center">
  <p>
    <a align="center" href="" target="_blank">
      <img
        width="850"
        src="https://media.roboflow.com/open-source/autodistill/autodistill-banner.png"
      >
    </a>
  </p>
</div>

# Autodistill HLS Geospatial Module

This repository contains the code supporting the HLS Geospatial base model for use with [Autodistill](https://github.com/autodistill/autodistill).

[Harmonized Landsat and Sentinel-2 (HLS) Prithvi](https://github.com/NASA-IMPACT/hls-foundation-os) is a collection of foundation models for geospatial analysis, developed by NASA and IBM. You can use Autodistill to automatically label images for use in training segmentation models.

The following models are supported:

- [Prithvi-100M-sen1floods11](https://huggingface.co/ibm-nasa-geospatial/Prithvi-100M-sen1floods11)

This module accepts `tiff` files as input and returns segmentation masks.

Read the full [Autodistill documentation](https://autodistill.github.io/autodistill/).

Read the [HLS Geospatial Autodistill documentation](https://autodistill.github.io/autodistill/base_models/clip/).

## Installation

To use HLS Geospatial with autodistill, you need to install the following dependency:

```bash
pip3 install autodistill-hls-geospatial
```

## Quickstart

```python
from autodistill_hls_geospatial import HLSGeospatial
import numpy as np
import rasterio
from skimage import exposure
import supervision as sv

from autodistill_hls_geospatial import HLSGeospatial

def stretch_rgb(rgb):
    ls_pct = 1
    pLow, pHigh = np.percentile(rgb[~np.isnan(rgb)], (ls_pct, 100 - ls_pct))
    img_rescale = exposure.rescale_intensity(rgb, in_range=(pLow, pHigh))

    return img_rescale


#replace with the name of the file you want to label
FILE_NAME = "USA_430764_S2Hand.tif"

with rasterio.open(FILE_NAME) as src:
    image = src.read()

    mask = image

    rgb = stretch_rgb(
        (mask[[3, 2, 1], :, :].transpose((1, 2, 0)) / 10000 * 255).astype(np.uint8)
    )

    base_model = HLSGeospatial()

    # replace with the file you want to use
    detections = base_model.predict(FILE_NAME)

    mask_annotator = sv.MaskAnnotator()

    annotated_image = mask_annotator.annotate(scene=rgb, detections=detections)

    sv.plot_image(annotated_image, size=(10, 10))

# label a folder of .tif files
base_model.label("./context_images", extension=".tif")
```


## License

This project is licensed under an [Apache 2.0 license](LICENSE).

## 🏆 Contributing

We love your input! Please see the core Autodistill [contributing guide](https://github.com/autodistill/autodistill/blob/main/CONTRIBUTING.md) to get started. Thank you 🙏 to all our contributors!