semvec/pypi-packages huggingface dataset:
py-predicate 1.4
Module to create composable predicates
Requires Python: >=3.10

![Documentation](https://github.com/mrijk/py-predicate/actions/workflows/pages.yaml/badge.svg)
![Test](https://github.com/mrijk/py-predicate/actions/workflows/test.yaml/badge.svg)
[![codecov](https://codecov.io/gh/mrijk/py-predicate/graph/badge.svg?token=KMBDJNC3W9)](https://codecov.io/gh/mrijk/py-predicate)

# Introduction

py-predicate is a typed Python library to create composable predicates.

These predicates can be used for generating test-cases (property based testing) and
run-time instrumenting of functions against a specification based on predicates.

# Getting started

To get started, install the library with [pip](https://pip.pypa.io/en/stable/)

```
pip install py-predicate
```

The full documentation can be found [here](https://mrijk.github.io/py-predicate/). We give 2 small examples
to show what the library can do.

# Example 1

```python
filtered = [x for x in range(10) if x >= 2 and x <= 3]
```

## Version with predicates:

```python
from predicate import ge_p, le_p

ge_2 = ge_p(2)
le_3 = le_p(3)

between_2_and_3 = ge_2 & le_3
filtered = [x for x in range(10) if between_2_and_3(x)]
```

Of course this example looks way more complicated than the original version. The point here is that you can build
reusable predicates that can be used in multiple locations.

So lets do just that, reuse our predicate to create a generator. The ``generate_false`` will create an infinite
series of integers for which the predicate ``between_2_and_3`` is False. The ``generate_true`` will create an
infinite (well, with lots of duplicates obviously) series of integers for which the predicate is True.

```python
from predicate import generate_false, generate_true, ge_p, le_p
from more_itertools import take

ge_2 = ge_p(2)
le_3 = le_p(3)

between_2_and_3 = ge_2 & le_3

take(5, generate_true(between_2_and_3))

take(5, generate_false(between_2_and_3))
```

This might be useful for example in unit tests.

# Example 2

A unique (?) py-predicate feature is that you can define self referencing predicates.
This makes it easy to apply predicates to arbitrarily nested structures, like JSON data.

In the next example we define a predicate, that tests if a given data structure is
either a string, or a list of data that can again either be a string or a list of
data. Ad infinitum.

```python
from predicate import all_p, is_list_p, is_str_p, root_p

str_or_list_of_str = is_str_p | (is_list_p & all_p(root_p))
```

Using plain Python, the above one-liner would have to be coded as a (recursive) function.
aimon 0.12.3
The AIMon SDK that is used to interact with the AIMon API and the product.
Requires Python: >3.8.0

# 🎉**Welcome to AIMon**

AIMon helps developers build, ship, and monitor LLM Apps more confidently and reliably with its state-of-the-art, multi-model system for detecting LLM quality issues. It helps seamlessly with both offline evaluations and continuous production monitoring. AIMon offers fast, reliable, and cost-effective hallucination detection. It also supports other important quality metrics such as completeness, conciseness, and toxicity. Read our [blog post](https://aimon.ai/blogs/introducing-rely) for more details.
decodanda 0.8.0
Geometric decoding of neural data with built-in best practices.
Keywords: python, decoding, neuroscience, ccgp, neural activity, population activity, neural decoding, geometry


Decodanda (dog latin for "to be decoded") is a best-practices-made-easy Python package for decoding neural data.
Decodanda is designed to expose a user-friendly and flexible interface for population activity decoding,
with a series of built-in best practices to avoid the most common pitfalls.
In addition, Decodanda exposes a series of functions to compute the Cross-Condition Generalization Performance (CCGP,
Bernardi et al. 2020) and Cross-Variable Interference (O'Neill et al 2025) 
for the geometrical analysis of neural population activity.
tessbind 0.15.0
Tesseract pybind11 bindings
Requires Python: >=3.12

# tessbind

[![Actions Status][actions-badge]][actions-link]

[![PyPI version][pypi-version]][pypi-link]
[![PyPI platforms][pypi-platforms]][pypi-link]

Python 3.12+ bindings for Tesseract built with pybind11. The package vendors the native dependencies (leptonica, libpng, zlib) so you only need Tesseract's trained data files available at runtime.

## Installation

```bash
pip install tessbind
```

Tesseract language data must be discoverable. If it is not installed in a default location (e.g., `/usr/share/tesseract-ocr/5/tessdata` on Linux or the Homebrew Cellar on macOS), set `TESSDATA_PREFIX` to the directory that contains the `tessdata` folder.

## Usage

`TessbindManager` wraps the underlying API in a context manager and exposes the recognized UTF-8 text plus per-word confidences:

```python
from pathlib import Path

from tessbind import PageSegMode, TessbindManager

img_bytes = Path("tests/hello.png").read_bytes()

with TessbindManager(lang="eng", page_seg_mode=PageSegMode.SINGLE_LINE) as tb:
    text, confidences = tb.ocr_image_bytes(img_bytes)

print(text)         # -> Hello, World!
print(confidences)  # list of word-level confidences (0-100)
```

Use the `page_seg_mode` setter to change segmentation between calls, or omit it to rely on Tesseract's default.

## Development

- `uv sync --extra test` to create the venv and build vendored libraries.
- `uv run pytest -m "not slow"` to run the test suite.

<!-- SPHINX-START -->

<!-- prettier-ignore-start -->
[actions-badge]:            https://github.com/elohmeier/tessbind/workflows/CI/badge.svg
[actions-link]:             https://github.com/elohmeier/tessbind/actions
[pypi-link]:                https://pypi.org/project/tessbind/
[pypi-platforms]:           https://img.shields.io/pypi/pyversions/tessbind
[pypi-version]:             https://img.shields.io/pypi/v/tessbind

<!-- prettier-ignore-end -->