semvec/pypi-packages huggingface dataset:
distrand 0.1.2
Generate spaced random numbers with minimum distance constraints.
Requires Python: >=3.7
Keywords: random, sampling, spacing, numpy, utility

# distrand

🎲 Generate random numbers with spacing constraints — no collisions, no clutter.

[![PyPI version](https://img.shields.io/pypi/v/distrand.svg)](https://pypi.org/project/distrand/)
[![License](https://img.shields.io/pypi/l/distrand.svg)](https://github.com/Eggman5800/distrand/blob/main/LICENSE)

## 📦 What is this?

`distrand` lets you generate random numbers (integers or floats) between two bounds, ensuring that all values are **at least `min_dist` apart**.

Perfect for:
- Spaced-out sampling
- Visualization
- Simulation
- Teaching randomness with constraints

## 🔧 Features

- 🧠 Smart spacing — every pair of values ≥ `min_dist`
- 🧮 Supports `int` and `float` generation
- 🚫 Automatically raises `ValueError` if impossible
- ⚡ Fast and NumPy-powered
- 📜 Apache 2.0 licensed

## 🚀 Installation

From [PyPI](https://pypi.org/project/distrand/):
```bash
pip install distrand
```

From source (for development):

```bash
git clone https://github.com/Eggman5800/distrand.git
cd distrand
pip install .
```
## 📚 Usage

```python
from distrand import distrand

# Integer mode
nums = distrand(low=0, high=100, size=5, min_dist=10, dtype=int)

# Float mode
floats = distrand(low=0.0, high=5.0, size=4, min_dist=1.2, dtype=float)
```
🧪 It guarantees that:

- `len(nums) == size`
- `abs(a - b) >= min_dist` for all `a, b` pairs


## 🧪 Testing

Run the tests using `pytest`:

```# Run tests (make sure PYTHONPATH is set to 'src')

# Windows (PowerShell)
$env:PYTHONPATH = "src"
pytest

# Unix/macOS
PYTHONPATH=src pytest

```

Tests cover:

* Integer & float mode
* Invalid inputs (e.g. not enough space)
* Type conversions



## 🧑‍💻 Example Run

```bash
python usage_demo.py
```

Output:

```
🎲 Integer Mode Example:
Generated integers: [10 40 20 60 0]

🌊 Float Mode Example:
Generated floats: [0.   3.6 1.2 2.4]

🚫 Invalid Parameters Example:
Caught expected error: Cannot select 10 values from range [0, 10] with min_dist=5
```

## 🛡️ License

Licensed under the [Apache License 2.0](LICENSE).

## 💡 Credits

Developed by [Syed Talha](https://github.com/Eggman5800).  
Feedback, issues, and pull requests welcome!

## 🌠 Roadmap

- [x] Publish to PyPI
- [ ] Add optional seed parameter (for reproducible results)
- [ ] Support output sorting (`sort=True`)
- [ ] Vectorized float optimization

---

## 🙌 Support

If you find this useful, give the repo a ⭐ or share it.  
Feel free to open [issues](https://github.com/Eggman5800/distrand/issues).
fixmefinder 0.1.0
Add your description here
Requires Python: >=3.13

# fixmefinder

fixmefinder is a command-line tool that scans Python files for `# TODO:` and `# FIXME:` comments, creates issues for them in Linear, and updates the comments with the issue ID.

## Features

- Detects `TODO` / `FIXME` comments in `.py` files
- Respects `.gitignore`
- Creates issues in Linear using its API
- Updates comments with the Linear issue ID

## Installation

1. install `uv`
2. run `uv tool install fixmefinder`

## Usage

3. run `fixmefinder` from the repo root

## License

This project is licensed under the MIT License.
image-enhancer-vivi 0.1.2
A deep learning-powered image enhancement library using Real-ESRGAN and GFPGAN
Requires Python: >=3.7

# image-enhancer-vivi

A deep learning-based image enhancement tool using Real-ESRGAN and GFPGAN.

## Features

- Super-resolution with Real-ESRGAN
- Face enhancement using GFPGAN
- Blurriness detection & image validation

## Installation

```bash
pip install -e .
agd 0.2.16
Adaptive Grid Discretizations

# Adaptive Grid Discretizations using Lattice Basis Reduction (AGD-LBR)
## A set of tools for discretizing anisotropic PDEs on cartesian grids

This repository contains
- the agd library (Adaptive Grid Discretizations), written in Python&reg; and cuda&reg;
- a series of *jupyter notebooks* in the Python&reg; language (online [static](http://nbviewer.jupyter.org/urls/rawgithub.com/Mirebeau/AdaptiveGridDiscretizations_showcase/master/Summary.ipynb) and [interactive](https://colab.research.google.com/notebook#fileId=1exIN-55tUG1LFlgoHM582k8o8zy6H46f&offline=true&sandboxMode=true) view), reproducing my research in Anisotropic PDE discretizations and their applications.
- a [basic documentation](https://mirebeau.github.io/AdaptiveGridDiscretizations_help/docs/agd.html),
generated with [pdoc](https://pdoc.dev/).

### The AGD library

The recommended way to install is
```console
pip install agd
```

*Deprecated conda package* (this version does not include the GPU codes, and is not maintained)
```console
conda install agd -c agd-lbr
```

### Reboot of the git history (february 8th 2024)
The whole notebooks, including images and videos, were previously saved in the git history, which as a result had grown to approx 750MB. After some unsuccessful attempts with BFG, I eventually had to delete and recreate the repository.

### The notebooks

You may :  
* [Visualize the notebooks online using nbviewer](http://nbviewer.jupyter.org/urls/rawgithub.com/Mirebeau/AdaptiveGridDiscretizations_showcase/master/Summary.ipynb).
*Note* : prefer to use this link to view the notebooks, rather than the present repository, which contains some notebooks in a partially evaluated state.
* [Run and modify the notebooks online using GoogleColab](https://colab.research.google.com/notebook#fileId=1exIN-55tUG1LFlgoHM582k8o8zy6H46f&offline=true&sandboxMode=true).
*Note* : some notebooks require turning on the GPU acceleration in GoogleColab (typical error: cannot import cupy) : Modify->Notebook parameters->GPU.

The notebooks are intended as documentation and testing for the adg library. They encompass:
* Anisotropic fast marching methods, for shortest path computation.
* Non-divergence form PDEs, including non-linear PDEs such as Monge-Ampere.
* Divergence form anisotropic PDEs, often encountered in image processing.
* Algorithmic tools, related with lattice basis reduction methods, and automatic differentiation.

For offline consultation, please download and install [anaconda](https://www.anaconda.com) or [miniconda](https://conda.io/en/latest/miniconda.html).  
*Optionally*, you may create a dedicated conda environnement by typing the following in a terminal:
```console
conda env create --file agd-hfm.yaml
conda activate agd-hfm
```
In order to open the book summary, type in a terminal:
```console
jupyter notebook Summary.ipynb
```
Then use the hyperlinks to navigate within the notebooks.

### Matlab users

Recent versions of Matlab are able to call the Python interpreter, and thus to use the 
agd library. See Notebooks_FMM/Matlab for examples featuring the CPU and GPU eikonal solvers.
otel-log-proto-mapper 0.1.5
A Python library to map standard logging.LogRecord messages to OpenTelemetry OTLP Log Protobufs.
Requires Python: >=3.9
Keywords: opentelemetry, logging, otel, protobuf, logs, mapper

# otel-log-proto-mapper

A Python library designed to facilitate the conversion of standard `logging.LogRecord` objects into OpenTelemetry Protocol (OTLP) Log Protobuf messages. This library provides a decoupled mapping function, enabling flexible integration into custom logging solutions without requiring the full OpenTelemetry SDK.

## Features

- Converts `logging.LogRecord` attributes (message, level, `extra` data, exception info) into OTLP Log Protobuf fields.
- Supports mapping of common Python types to OTLP `AnyValue`.
- Provides an `OTEL_SEVERITY_MAP` for standard logging levels.

## Installation

```bash
pip install otel-log-proto-mapper
```

## Usage

```python
import logging
from otel_log_proto_mapper import convert_log_record, OTEL_SEVERITY_MAP
# Assuming you also have opentelemetry-proto installed for type hints and protobuf classes
from opentelemetry.proto.logs.v1 import logs_pb2 as otel_logs_pb2

# Create a dummy LogRecord
logger = logging.getLogger("my_app")
logger.setLevel(logging.INFO)
record = logging.LogRecord(
    name=logger.name,
    level=logging.INFO,
    pathname="/app/main.py",
    lineno=42,
    func="do_work",
    msg="Processing data",
    args=(),
    exc_info=None,
    created=time.time(),
)
record.user_id = "user123" # Example of an 'extra' attribute

# Convert to OTLP LogRecord
otel_log_record = convert_log_record(record)

print(f"OTLP Severity: {otel_log_record.severity_text} ({otel_log_record.severity_number})")
print(f"OTLP Body: {otel_log_record.body.string_value}")
print("OTLP Attributes:")
for attr in otel_log_record.attributes:
    print(f"  {attr.key}: {attr.value}")

# Example with exception
try:
    raise ValueError("Something went wrong!")
except ValueError:
    exc_record = logging.LogRecord(
        name=logger.name,
        level=logging.ERROR,
        pathname="/app/main.py",
        lineno=50,
        func="handle_error",
        msg="An error occurred",
        args=(),
        exc_info=sys.exc_info(),
        created=time.time(),
    )
    # When using convert_log_record, you typically pass a formatter for full traceback
    # like handler.format in the OTLPGrpcLogHandler context.
    # For standalone test, you can rely on converter's internal traceback formatting.
    otel_exc_log_record = convert_log_record(exc_record)
    print("\nOTLP Exception Log:")
    for attr in otel_exc_log_record.attributes:
        if attr.key.startswith("exception."):
            print(f"  {attr.key}: {attr.value}")
```