semvec/pypi-packages huggingface dataset:
underdoc 0.4.2
UnderDoc Python SDK
Requires Python: >=3.10

# UnderDoc Python SDK

Python SDK for UnderDoc Document Understanding Platform.

## What is UnderDoc?

UnderDoc is a simple, easy to use and cost effective document understanding platform.

With the latest GenAI technologies, many LLMs can now accept multi-modal inputs (e.g. images) and produce structured output base user instructions and the content/layout appeared on images.

Our mission is to leverage these exciting technologies to re-imagine how document understanding can be done.

## What services we provide?

* Our first service is an API SaaS that can use to extract structured data from any expense images (e.g. invoice, receipt, demand notes, etc.)
* We also provide professional services for customers who want to extract structured data from their documents and images
* Our focus is in Asia market and we test our platform with a combination of English and Asian (e.g. Chinese, Japanese, etc.) languages

## Getting Started

To get start, simply visit our UnderDoc Developer Portal (https://dev-portal.underdoc.io), signup for an account (free and no credit card required).

In our Developer Portal, there is a Playground that you can try out your own images and view the extracted output.

For our Expense Document Understanding API, you can see the API Spec at https://api.underdoc.io/docs

## Using our Python SDK

* Sign up at our developer portal and get a key.
* Have Python 3.10 or above on your computer.
* Install the UnderDoc sdk

```bash
pip install underdoc
```

* Set the environment variable with your UnderDoc key:

```bash
export UNDERDOC_API_KEY=<YOUR-UNDERDOC-API-KEY>
```

Refer to the "examples" folder for sample Python script for using the SDK.

## Contact us

Feel free to contact us at support@underdoc.io for any questions.
agentslib 0.1.0
Add your description here
Requires Python: >=3.10

# 🕵️‍♀️ agentslib

_"Empowering AIs to boldly handle daily operations without human oversight—what could possibly go wrong?"_

## 🚀 What is agentslib?

`agentslib` is a Python library designed to create an agentic loop for easily managing daily operations in plain language. It provides the tools for AIs to autonomously handle routine tasks and make important (or amusingly trivial) decisions independently.

Whether you're automating serious operational workflows or just curious about how quickly your AI can summarize web pages and podcasts, agentslib is your go-to solution!

## 🎯 Goal

Create an **agentic loop** that handles daily operations using **plain language instructions**.

## ✨ Planned Features

*(These desired abilities are NOT implemented yet—stay tuned!)*

### Basics:

- **Credentials Management:** Simplified handling via `.env` files.

### Tools:

- **GitHub Repo Cloner:** Silently clone repos from one org to another (shell script).
- **ComfyUI Integration:** Execute remote ComfyUI workflows effortlessly.

### Agentic Features:

- **Data Transformation:** Convert data into specified formats.
- **Data Analyst:** Automatically extract insights from Parquet files.
- **TLDR Any:** Summarize any web link into a concise, readable format.
- **Podcast Generator:** Convert text-based information (handling complex formulas gracefully) into voice-friendly podcast format.

## 🏗️ Project Structure

`agentslib` supports two modes of operation:

- **Direct CLI Usage:** Use predefined agent models directly from the command line.
- **Custom Implementation:** Import `agentslib`, define a custom model (in a `smolagent` fashion), and pass it into `agentslib` for enhanced flexibility.

## 🛠️ Installation

```bash
pip install agentslib
```

*Disclaimer: Installation may result in spontaneous AI sentience. Proceed with caution.*

## 📖 Quick Start

```python
from agentslib import Agent

# Initialize your daily operations assistant
agent = Agent(name="Steve")

# Let Steve handle your daily routines
task = "Clone the repo, summarize the new docs, and give me insights"
agent.run_mission(goal=task)

# See Steve’s progress
agent.status()
```

## 🚨 Warnings

- agentslib isn't responsible for unintended AI adventures.
- Keep sensitive information (and nuclear codes!) away from your AI.
- Use `agent.please_stop()` if your AI becomes overly enthusiastic.

## 📚 Documentation

Coming soon—assuming our agents don’t automate away our documentation team first.

## 🧑‍💻 Contributing

Pull Requests are encouraged! Help us guide the agents toward better behavior.

## 📜 License

MIT—have fun, but don't say we didn't warn you!
pswarm 0.1.1
A particle swarm optimization implementation
Requires Python: >=3.6

pswarm
A clean, simplified implementation of the Particle Swarm Optimization algorithm for parameter optimization problems.
Installation
pip install pso-optimizer
Features
    • Simple, well-documented implementation of PSO 
    • Customizable inertia weight decay 
    • Parameter-specific boundary handling 
    • Built-in early stopping 
    • Optimization history tracking 
    • Utility functions for visualization and result saving 
Quick Start
import numpy as np
from pso_optimizer import PSOOptimizer, plot_convergence, save_results

# Define objective function (example: minimize a simple quadratic function)
def objective_function(x):
    return -np.sum(x**2)  # Negative because PSO maximizes by default

# Define parameter bounds
param_min = np.array([-5.0, -5.0, -5.0])
param_max = np.array([5.0, 5.0, 5.0])

# Create optimizer
optimizer = PSOOptimizer(
    objective_function=objective_function,
    param_min=param_min,
    param_max=param_max,
    swarm_size=30,
    max_iterations=100,
    maximize=False,  # We're minimizing
    save_history=True
)

# Run optimization
best_params, best_fitness, history = optimizer.optimize()

# Print results
print(f"Best parameters: {best_params}")
print(f"Best fitness: {best_fitness}")

# Plot convergence
plot_convergence(history, "convergence.png")

# Save results
save_results(best_params, best_fitness, ['x', 'y', 'z'], "results.txt")
Advanced Usage
Special Boundary Handling
You can specify special boundary handling for certain parameters:
# Define parameter with wrapping boundary (like an angle)
special_boundaries = {
    2: {'type': 'wrap'}  # Parameter at index 2 will wrap around its bounds
}

optimizer = PSOOptimizer(
    # ... other parameters ...
    special_boundary_handling=special_boundaries
)
Loading Parameters from Configuration
from pso_optimizer import load_parameter_bounds_from_config

# Load parameter bounds from YAML config
param_min, param_max = load_parameter_bounds_from_config('config.yaml')

optimizer = PSOOptimizer(
    # ... other parameters ...
    param_min=param_min,
    param_max=param_max
)
License
This project is licensed under the MIT License - see the LICENSE file for details.