semvec/pypi-packages huggingface dataset:
fh-heroicons 0.1.0
FastHTML package for Heroicons
Requires Python: >=3.10
Keywords: fasthtml, heroicons, icons, svg

# fh-heroicons

Any use of the code retrieved from [heroicons.com](https://heroicons.com/) is subject to the terms of the Heroicons license, found [here](https://github.com/tailwindlabs/heroicons/blob/master/LICENSE).

-----

This is a small library that let's you use `heroicons` as FastHTML `ft` components: 

* Only saves the icons you use
* Icons are downloaded on the first use and cached locally in your working directory. 
* full customization through css


## Installation

```bash
pip install fh-heroicons
```

## Usage

```python
from fh_heroicons import Heroicon

Heroicon("academic-cap", style="color: red")
```

You can pass any valid heroicon icon name to `Heroicon`. A full searchable list of icons can be found [here](https://heroicons.com/).

You can also specify which variant of the icons (`outline` or `solid`, default to `outline`) you want by adding the `variant` attribute to `Heroicon`. 

```python
Heroicon("academic-cap", variant="solid")
```

## Caveat
This is very much wip as well as my first python library ever. So please treat it gently. 

## License

The library is distributed under the MIT LICENSE.
haralick-torch 1.1.0
GPU-accelerated Haralick texture extraction for GeoTIFFs
Requires Python: >=3.9

# haralick-torch

GPU-accelerated Haralick texture extraction for GeoTIFF images using PyTorch.

## Installation

GDAL must be installed via precompiled wheels:

https://github.com/cgohlke/geospatial-wheels/releases

```bash
pip install GDAL-3.10.1-cp310-cp310-win_amd64.whl
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
pip install haralick-torch
```

## Usage CLI

```bash
haralick-torch --input image.tif --out-texture textures.tif --out-pca pca.tif --nir-idx 8 --window 7 --levels 128 --tile 64
```

## Usage API
```bash
import torch
from haralick_torch.io import read_nir_as_tensor, write_haralick_geotiff
from haralick_torch.haralick import compute_haralick
from haralick_torch.tiling import process_in_tiles

DEVICE = "cuda" if torch.cuda.is_available() else "cpu"

# ---- INPUT
img = "image.tif"
out = "haralick.tif"
nir_band = 4

# ---- IO
nir, ref_ds = read_nir_as_tensor(img, nir_band, DEVICE)

# ---- HARALICK
textures = process_in_tiles(
    nir,
    compute_haralick,
    window=11,
    stride=1
)

# ---- SAVE
write_haralick_geotiff(
    out,
    textures,
    list(textures.keys()),
    ref_ds
)
```