semvec/pypi-packages huggingface dataset:
duckdb-appender 0.3.1
A DuckDB appender for Python
Requires Python: >=3.9

# DuckDB PyAppender

A [DuckDB appender](https://duckdb.org/docs/data/overview#appender) for Python.

## Installation

## Usage

```py
import duckdb
from duckdb_appender import Appender

conn = duckdb.connect()

appender = Appender(conn, schema="main", table="users")
appender.append_row([1, "John"])
appender.append_row([2, "Doe"])
appender.close()

# Can also use it with context manager:
with Appender(conn, schema="main", table="users") as appender:
  appender.append_row([3, "foo"])
```

See more in the `/examples` folder.

## Why use this

- Much faster than simple INSERT statements.
- Versus storing data in a pandas DataFrame and load into DuckDB: while pandas loads the entire dataset into memory, this appender uses SQLite as a buffer that regularly flush itself (every 204,800 rows, similar to the official C++ appender)
  - This prevents memory overload on large data aggregation.
  - A little bit of crash protection - since it commits data every 204,800 rows, you'll preserve most of your progress if something goes wrong.

## Local development

This repo uses [uv](https://github.com/astral-sh/uv) to manage dependencies and
virtual environment. Dependencies are written in `pyproject.toml`, so other
tools supporting it can be used as well.

### Run test

This repo use [pytest](https://docs.pytest.org/en/stable/). To run tests within an uv environment, run:

```bash
uv run pytest
```
database-setup 0.0.5
Database setup utilities with configuration handling
Requires Python: >=3.10

# Database Setup Package

`database_setup` is a Python package designed to streamline database configuration and initialization. It supports YAML-based configuration files, database connection pooling, and utility functions for database management.

## Features

- Load database configurations from YAML files.
- Create databases if they do not exist.
- Execute schema and seed SQL files.
- Insert default admin user with encrypted credentials.
- Utilize connection pooling for optimized performance.

## Installation

Install the package via pip:

```bash
pip3 install database_setup
```

## Usage

Import the Package

```
from database_setup import setup_database
```

## Setting Up a Database
Ensure your project directory contains a config/database.yml file with the following structure:

```yaml
development:
  host: "localhost"
  port: 3306
  username: "root"
  password: "password"
  database: "example_db"
  autocommit: True
  blocking: True
  maxconnections: 5
```

Ensure the config folder contains schema.sql and seed.sql files for database schema and initial data.

Run the setup_database function:

setup_database('/path/to/project')

Replace /path/to/project with the absolute path to your project directory.

Example Database Configuration File
config/database.yml:

```yaml
development:
  host: "localhost"
  port: 3306
  username: "root"
  password: "password"
  database: "example_db"
  autocommit: True
  blocking: True
  maxconnections: 5
```
Example Schema File
config/schema.sql:

```sql
CREATE TABLE IF NOT EXISTS User (
    id INT AUTO_INCREMENT PRIMARY KEY,
    user_type VARCHAR(50),
    name VARCHAR(100),
    username VARCHAR(50) UNIQUE,
    email VARCHAR(100),
    mobile VARCHAR(15),
    password TEXT,
    user_access TINYINT
);
```

Example Seed File
config/seed.sql:

```sql
INSERT INTO User (user_type, name, username, email, mobile, password, user_access)
VALUES ('admin', 'Default Admin', 'admin', 'info@yun.buzz', '8888888888', '<encrypted_password>', 1);
```

### Dependencies

This package depends on the following libraries:
- pymysql
- dbutils
- PyYAML

### License

This package is proprietary software and is distributed under the terms of the Proprietary License. Unauthorized redistribution or modification is prohibited. See the LICENSE file for more information.

### Support
For inquiries or support contact: Neudeep Technologies Pvt Ltd

📧 neudeep.tech.pvt.ltd@gmail.com
Rock-Paper-scissers 0.1.0
A AI that plays Rock Papier Scissers with u using the camera
Requires Python: >=3.9.20

testing setup and requirement files for ez setup
# Rock-Paper-Scissers
This is a code that lets u play rock paper scissers against an ai using your webcam.

to use this code u need some libs.
i will make it ez for u to do but form now its just the reposetary
eikosograms 0.0.2
A small package for drawing eikosograms
Requires Python: >=3.8

# Eikosograms
Inspired by [R eikosograms](https://cran.r-project.org/web/packages/eikosograms/vignettes/Introduction.html), I decided to create a similar library for Python since there was no such library at the time (only a few crude implementations: [[1]](https://andrewtruong.com/data_visualization), [[2]](https://github.com/wtsi-hgi/spack-repo/blob/b5bd14ed3a34bae3ad4677be09af070f0f544293/packages/r-eikosograms/package.py#L9)). 

Also, I created [interactive visualization](https://www.desmos.com/calculator/81hy17u2bt) in Desmos.

## Install
```
pip install eikosograms
```

## Usage
```python
>>> from eikosograms import eikosograms
>>> eikosograms.draw_chart(.8, .3, .4, names=('Rain', 'Cloudy'), min_labels=False)
```
Check function docstring for more details.
document_image_utils 0.1.25.5
Toolkit for document image processing
Requires Python: <4.0.0,>=3.10.11

# Contextualization

In progress toolkit for document image pre processing.

Aimed for images to be OCRed.

# Main Available methods

- **Auto rotate image**

    Uses left margin of a document to calculate the angle of rotation present, and correct it accordingly.

    Can be given the rotation direction (clocwise or counter_clockwise), or in auto mode tries to determine the side to which the document is tilted (can be none, in which case image won't be rotated).

- **Calculate rotation direction**

    Calculates rotation direction of an image by finding the biggest sets of the first black pixels appearances (with outliers removed) in the image for each direction: clockwise, counter_clockwise and none.

    For none direction, the set is created based on pixels with same 'x' coordinate that with less than a 5% height difference, relative to the image's height.

- **Binarize document**

    Normal binarization with otsu tresholding and fastNlMeansDenoising.

    Fax binarization, following the image magick command: convert "image" -colorspace Gray ( +clone -blur 15,15 ) -compose Divide_Src -composite -level 10%,90%,0.2

- **Split document into columns**

    Analyzes document image pixel color frequency and split document image into columns.

- **Auto crop document**

    Analyzes document image pixel color frequency and cut document margins, aiming mostly to remove possible folds in the corners.

- **Identify document images**
    Identify document images in image, using algorithm available in leptonica's repository that finds potential image masks.

- **Get document delimiters**
    Get document delimiters, using image transformations.

- **Segment document**
    Segments document image into header, body and footer, using delimiters. Only the body is always guaranteed to have a value.

# Bash commands:

- **binarize** : binarize document image.

- **rotate_document** : rotate document image.

- **split_columns** : split document into column images.

- **d_auto_crop** : auto crop document image.
astra-llm 0.1.21
Astra is a lightweight library for Astra LLM.
Requires Python: >=3.10

# Check Python version
**N.B: python version must be required up to 3.10.0**

`!python --version`


# Install dependencies of Astra LLM
`pip install astra-llm==0.1.19`

# Load Model

### Selection of device for load model
```
import torch

# Set device to GPU if available
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

```

### Load model
```
from astra.model import Model

model = Model('/kaggle/input/astra/pytorch/1.4b/2', map_location=device)
```

# Generate text

```
response = model.generate(
    messages="hello",
    max_new_tokens=50,
    top_k=25,
    temperature=1.4
)
```