semvec/pypi-packages huggingface dataset:
ocr-stream 2.5.2
Extrair textos de documentos digitalizados e imagens.
Requires Python: >=3.11

# ocrlib

# Uso simples


from ocr_stream import File, TextRecognized, RecognizeImage, RecognizePdf

# passo 1:
#   instânciar o objeto para reconhecer texto, utilizando o caminho do tesseract

tess: File = File('/usr/bin/tesseract') # Substitua pelo tesseract do seu sistema
ocr = RecognizeImage.create(path_tesseract=tess)

# passo 2:
#   instânciar um arquivo de imagem para extrair o texto.
image: File = File('path/to/file.png')

# passo 3:
#   extrair o texto
text: str = ocr.image_to_string(image)
print(text)

# passo 4 opcional:
#   você pode salvar um arquivo PDF com o texto extraido
output_file: File = File('path/to/save.pdf')
recognized: TextRecognized = ocr.image_recognize(image)
recognized.to_document().to_file_pdf(output_file)

# passo 5 opcional:
#   você pode salvar uma planilha com o texto da imagem
output_excel: File = File('path/to/file.xlsx')
recognized: TextRecognized = ocr.image_recognize(image)
recognized.to_document().to_excel(output_excel)
flock-context-manager 1.0.0
A flock implementation using Python's context manager.
Requires Python: ~=3.9

<!--
SPDX-FileCopyrightText: 2025 Joe Pitt

SPDX-License-Identifier: GPL-3.0-only
-->
# Flock with Context Manager

A flock implementation using Python's context manager.

## Installation

```sh
pip3 install flock-context-manager
```

## Usage

```python
"""Demonstration script for flock with context manager"""

from multiprocessing import Pool
from os import getpid
from time import sleep

from flock_context import FLockContext

LOCK_FILE = "demo.lock"


def task():
    """Your mutually exclusive task goes here"""

    pid = getpid()

    print(f"[{pid}] Getting Lock")
    with FLockContext(LOCK_FILE):
        print(f"[{pid}] Lock Obtained - sleeping for 2 seconds")
        sleep(2)
    print(f"[{pid}] Lock Released")


if __name__ == "__main__":
    print("Starting")
    with Pool(3, task) as pool:
        pool.close()
        pool.join()
    print("Done")

```
svg-timeline 0.4.0
A pure python library to create timeline plots
Requires Python: >=3.11
Keywords: timeline, svg, plotting, graph

# svg-timeline

A pure python library to create timeline plots.

## Documentation
At the current time (`0.2.2`), this library is still in an early development state.
Because I still expect the API to undergo larger changes until version `1.0`,
there is no extensive user documentation yet.

- For a rough usage overview, please take a look at the example below.
- For more technical information, you can read the [ADRs](https://github.com/TiDreyer/svg-timeline/tree/main/ADRs).

### Example
This is the result of running the script
[`examples/emmy_noether.py`](https://github.com/TiDreyer/svg-timeline/blob/main/examples/emmy_noether.py)
via `uv run --script examples/emmy_noether.py`:

![a timeline of Emmy Noether's life](https://github.com/TiDreyer/svg-timeline/raw/main/examples/emmy_noether.svg)

## Allowed Version Number Tags
[Semantic versioning](https://semver.org/) and [PEP 440](https://peps.python.org/pep-0440/#public-version-identifier)
have different requirements on version numbers.
This project aims to use version numbers that are valid according to both standards.
Effectively this allows version tags of the following form:

```
N.N.N[-(a|b|rc)N][-postN][-devN]
```

Where:
- `N` is a shorthand for a positive integer
- `(x|y)` symbolize two allowed variants `x` and `y`
- `[]` denote optional parts
- (the other symbols are literal characters)
ratisbona-pygames 0.0.4
A Collection of demos and small games for the pygame library.
Requires Python: >=3.10

# Ratisbona Pygames

This project comprises a set of small games and demos written in python using the pygame library.

fire_demo:   
  Demo that shows a famous fire effect using Pygame.

etchasketch:   
  A small etch-a-sketch like drawing program.

fanedit:
  Utility to create a cirular image for a usb-powered persistence-of-vision led-display fan.

death_by_powerpoint:   
  A little psycho-game that lets you experience, that your brain just has around 7 fast registers for objects.
  Guessing the number of larger sets of objects is slower, causes more strain and is more error-prone as for 7 objects.
  
palette_demo:   
  Demos different palettes that are available in the ratisbona_utils.simplecolors module.

## Project-structure, Installing Dependencies and PYTHONPATH configuration.

This Project houses it's sources below the `src/{projectname}` directory. You have
to have this directory in your module-searchpath to execute the project. It should also
be present in the module-searchpath of your IDE.

If using pycharm or any other Jetbrains-based IDE, use 
`Settings->Project->Project Structure`
to `mark as sourcefolder` the `src`-folder of this.

The Project requirements, as well as the dev-requirements are intended to be listed in the 
`pyproject.toml`-file (see there)

By issuing:

```shell
pip install -e .
```

you add all the project dependencies as well as the projects sourcefolder to your 
[hopefully virtual!] environment, relieving you of the burden of having to manually 
installing anything or having to configure your python path by other means.

Likewise you can install all the dev-dependencies by:

```shell
pip install -e .'[dev]'
```
ratisbona-utils 0.0.4
A package comprising various utilities useful for many python projects.
Requires Python: >=3.9

# Ratisbona Utils

Ratisbona utils comprises a set of python modules useful in many programs. 

## Project-structure, Installing Dependencies and PYTHONPATH configuration.

This Project houses its sources below the `src/ratisbona_utils` directory. You have
to have this directory in your module-searchpath to execute the project. It should also
be present in the module-searchpath of your IDE.

If using pycharm or any other Jetbrains-based IDE, use 
`Settings->Project->Project Structure`
to `mark as sourcefolder` the `src`-folder of this.

The Project requirements, as well as the dev-requirements are intended to be listed in the 
`pyproject.toml`-file (see there)

By issuing:

```shell
pip install -e .
```

you add all the project dependencies as well as the projects source-folder to your
(hopefully virtual!) environment, relieving you of the burden of having to manually 
installing anything or having to configure your python path by other means.

Likewise you can install all the dev-dependencies by:

```shell
pip install -e .'[dev]'
```
bitbully-databases 0.0.2
Opening Databases for the Board Game Connect-4
Requires Python: >=3.10
Keywords: connect-4, opening book, database

# bitbully-databases
Opening Databases for the Board Game Connect-4.

<h1 align="center">
<img src="https://raw.githubusercontent.com/MarkusThill/bitbully-databases/master/bitbully-databases-logo.png" alt="bitbully-logo-full" width="400" >
</h1><br>

**BitBully Databases** is a companion library to [BitBully](https://github.com/MarkusThill/BitBully) that provides precomputed **Connect-4 opening books** with millions of evaluated positions.
It includes a **pure-Python reference implementation** (no NumPy dependency) demonstrating how to read, search, and interpret these binary databases — ideal for educational use and exploration.
For high-performance inference, use the native **C++/pybind11 BitBully API** to access and query the databases.


## Install

Install `bitbully-databases` via pip:

```bash
pip install bitbully-databases
```

## Usage

```python
import bitbully_databases as bbd

# Load the 12-ply book with distances (default)
db = bbd.BitBullyDatabases("12-ply-dist")

# Get the absolute file path of the packaged database
path = bbd.BitBullyDatabases.get_database_path("12-ply-dist")
print("Database path:", path)

# Check database metadata
print("Book size:", db.get_book_size())
print("Memory size (bytes):", db.get_book_memory_size())
print("Contains win distances:", db.has_win_distances())

# Example Connect-4 board (bottom → top)
# Player 1 (yellow, X) will eventually win
board = [
    [0, 0, 0, 0, 0, 0, 0],
    [0, 0, 0, 1, 0, 0, 0],
    [0, 1, 0, 2, 0, 0, 0],
    [0, 2, 0, 1, 0, 2, 0],
    [0, 1, 0, 2, 0, 1, 0],
    [0, 2, 0, 1, 0, 2, 0],
]

# Retrieve the evaluation score for the board
value = db.get_book_value(board)
print("Book value:", value)
if value is not None and db.has_win_distances():
    print(f"→ Player 1 wins in {100 - abs(value)} moves.")

# Display whether the database uses distances and the type of book
print("Has win distances:", db.has_win_distances())
```

## Further Usage Examples and API Reference

You will find further examples and the full API reference under [https://markusthill.github.io/bitbully-databases/](https://markusthill.github.io/bitbully-databases/)

# Development (Debian-based Systems)

## Install & Activate virtualenv

```bash
python3 -m venv venv
source venv/bin/activate
```

## Install Dependencies

```bash
pip install -e .[dev,ci]
```

```bash
pre-commit install
```

You can run pre-commit before a commit with:

```bash
pre-commit run
```

## Commitizen

### Bump Version

```bash
cz bump --dry-run # first perform a dry run
cz bump
git push origin tag x.x.x
```

An alpha release can be created like this:
```bash
cz bump --prerelease alpha
```

### Push commit and tag atomically

For example, pushing the commit and tag for `v0.0.2-a1` would be done like this:
```bash
git push --atomic origin master v0.0.2-a1
```
hcoop-meetbot 0.8.1
Plugin for Limnoria to help run IRC meetings
Requires Python: <4,>=3.11

# HCoop Meetbot Plugin

[![pypi](https://img.shields.io/pypi/v/hcoop-meetbot.svg)](https://pypi.org/project/hcoop-meetbot/)
[![license](https://img.shields.io/github/license/pronovic/hcoop-meetbot)](https://github.com/pronovic/hcoop-meetbot/blob/main/LICENSE)
[![wheel](https://img.shields.io/pypi/wheel/hcoop-meetbot.svg)](https://pypi.org/project/hcoop-meetbot/)
[![python](https://img.shields.io/pypi/pyversions/hcoop-meetbot.svg)](https://pypi.org/project/hcoop-meetbot/)
[![Test Suite](https://github.com/pronovic/hcoop-meetbot/workflows/Test%20Suite/badge.svg)](https://github.com/pronovic/hcoop-meetbot/actions?query=workflow%3A%22Test+Suite%22)
[![docs](https://readthedocs.org/projects/hcoop-meetbot/badge/?version=stable&style=flat)](https://hcoop-meetbot.readthedocs.io/en/stable/)
[![coverage](https://coveralls.io/repos/github/pronovic/hcoop-meetbot/badge.svg?branch=main)](https://coveralls.io/github/pronovic/hcoop-meetbot?branch=main)

[hcoop-meetbot](https://github.com/pronovic/hcoop-meetbot) is a plugin for [Limnoria](https://github.com/ProgVal/Limnoria), a bot framework for IRC.  It is designed to help run meetings on IRC.  It was originally written for quarterly board meetings at [HCoop](https://hcoop.net), when Ken was on the board there.

The code is based in part on the [MeetBot](https://github.com/rkdarst/MeetBot/) plugin for Supybot written by Richard Darst. Supybot is the predecessor to Limnoria.  Richard's MeetBot was "inspired by the original MeetBot, by Holger Levsen, which was itself a deri vative of Mootbot by the Ubuntu Scribes team".  So, this code has a relatively long history.  For this version, much of the plugin was rewritten using Python 3, but it generally follows the pattern set by Richard's original code.  

See the [user documentation](https://hcoop-meetbot.readthedocs.io/en/stable/) for more information about how to use the plugin, including installation instructions.
nothion 0.4.9
Yet another unofficial Notion API client.
Requires Python: >=3.10

# Nothion
Yet another unofficial Notion API client.

## Installation
```bash
pip install nothion
```

## Usage
```python
from nothion import NotionClient

client = NotionClient(auth_secret="your_auth_token",
                      tasks_db_id: str | None = None,
                      stats_db_id: str | None = None,
                      notes_db_id: str | None = None,
                      expenses_db_id: str | None = None)
client.tasks.get_active_tasks()
```

## Features

### Tasks Handler
- get_active_tasks()
- get_task(ticktick_task: Task)
- get_notion_id(ticktick_task: Task)
- is_task_already_created(task: Task)
- create(task: Task)
- update_task(task: Task)
- complete(task: Task)
- delete(task: Task)

### Notes Handler
- is_page_already_created(title: str, page_type: str)
- create_page(title: str, page_type: str, page_subtype: tuple[str], date: datetime, content: str)

### Stats Handler
- get_incomplete_dates(limit_date: datetime) -> List[str]
- update(stat_data: PersonalStats, overwrite_stats: bool = False)
- get_between_dates(start_date: datetime, end_date: datetime) -> List[PersonalStats]

### Expenses Handler
- add_expense_log(expense_log: ExpenseLog)

### Blocks Handler
- get_all_children(block_id: str) -> list

## Data Models

### PersonalStats
This package uses a custom attrs model to store personal stats:

- date: str
- focus_total_time: float | None
- focus_active_time: float | None  
- work_time: float | None
- leisure_time: float | None
- sleep_time_amount: float | None
- sleep_deep_amount: float | None
- fall_asleep_time: float | None
- sleep_score: float | None
- weight: float | None
- steps: float | None
- water_cups: int | None

### ExpenseLog
This package uses a custom attrs model to store expense log data:

- date: str
- expense: float
- product: str

## Environment Variables

- NT_AUTH: Notion auth token, for example secret_t1Cd...