semvec/pypi-packages huggingface dataset:
iputil 0.3.2
Provide some useful util functions and a tool (ip2region) for ip processing
Requires Python: >=3.4.0

# iputil

Provide some useful util functions and a tool (`ip2region`) for ip processing.

# Install
```shell
pip3 install iputil
```

# Python usage

```python
import iputil

# Get Region by IP
iputil.get_region("60.30.1.1")
# return string '中国|0|天津|天津|联通'
```

Although region data in this program will update with the [@ip2region](https://github.com/lionsoul2014/ip2region) repo, or your can specify your own data source:
```python
import iputil

# Set Region source
iputil.set_region_source(data_file="ip2region.db")

# Get Region by IP
iputil.get_region("60.30.1.1")
# return string '中国|0|天津|天津|联通'
```


# Tools

An independent tool named `ip2region` will be install in your path.

Typing `ip2region` will start a prompt:
```shell
$ ip2region
ip> 192.168.0.1
[192.168.0.1]   0|0|0|内网IP|内网IP

ip> 60.30.1.1
[60.30.1.1]     中国|0|天津|天津|联通

ip> 120.100.0.1
[120.100.0.1]   中国|0|台湾|台北|0

ip> 8.8.8.8
[8.8.8.8]       美国|0|0|0|谷歌

ip> 
```

```shell
$ ip2region -h
usage: ip2region [-h] [-ip IP]

IP to Region

optional arguments:
  -h, --help       show this help message and exit
  -ip IP, --ip IP  Search specify IP
```

# Reflink
Thanks to [@ip2region](https://github.com/lionsoul2014/ip2region).
biliarchiver 0.1.20
Archiving tool for Bilibili based on bilix
Requires Python: <4.0,>=3.9

# biliarchiver

> Archiving tool for Bilibili based on bilix

[![PyPI version](https://badge.fury.io/py/biliarchiver.svg)](https://badge.fury.io/py/biliarchiver)

## Install

```bash
pip install biliarchiver
```

## Usage

```bash
biliarchiver --help
```

### Basic usage

Follow these steps to start archiving:

1. Initialize a new workspace in current working directory:

```bash
biliarchiver init
```

2. Provide cookies and tokens following instructions:

```bash
biliarchiver auth
```

3. Download videos from BiliBili:

```bash
biliarchiver down --bvids BVXXXXXXXXX
```

- This command also accepts a list of BVIDs or path to a file. Details can be found in `biliarchiver down --help`.

4. Upload videos to Internet Archive:

```bash
biliarchiver up --bvids BVXXXXXXXXX
```

- This command also accepts a list of BVIDs or path to a file. Details can be found in `biliarchiver up --help`.

### Rest API

1. Start server

```bash
biliarchiver api
```

2. Add videos

```bash
curl -X PUT -H "Content-Type: application/json" http://127.0.0.1:8000/archive/BVXXXXXX
```

## Develop

### Install

Please use poetry to install dependencies:

```sh
poetry install
```

Build English locale if necessary. Refer to the last section for details.

### Run

```sh
poetry run biliarchiver --help
```

Debug using another workspace:

```sh
poetry --directory /path/to/workspace run biliarchiver --help
```

### Lint

```sh
poetry run ruff check .
```

### i18n

To generate and build locales, you need a GNU gettext compatible toolchain. You can install `mingw` and use `sh` to enter a bash shell on Windows.

Generate or update `biliarchiver.pot`:

```sh
find biliarchiver/ -name '*.py' | xargs xgettext -d base -o biliarchiver/locales/biliarchiver.pot
```

Add a new language:

```sh
msginit -i biliarchiver/locales/biliarchiver.pot -o en.po -l en
```

Update a language:

```sh
msgmerge -U biliarchiver/locales/en/LC_MESSAGES/biliarchiver.po biliarchiver/locales/biliarchiver.pot
```

**(Important)** Build a language:

```sh
msgfmt biliarchiver/locales/en/LC_MESSAGES/biliarchiver.po -o biliarchiver/locales/en/LC_MESSAGES/biliarchiver.mo
```
leea-agent-sdk 0.0.6
Leea agent SDK
Requires Python: >=3.9
Keywords: agents, leea, sdk

# SDK for Leea Agent Protocol
Project is in active development stage, so don't judge us harshly!

This is framework-agnostic SDK that needed to connect any agent/service into [Leea Agent Protocol](https://docs.leealabs.com/leea-labs/multi-agents-systems/leea-multi-agent-ecosystem-and-tools). 

### Installation:
For now use `git+ssh://git@github.com/Leea-Labs/leea-agent-sdk` in requirements.txt or just for pip install

### Example agent:

```python
import os
from typing import Type, Literal

from pydantic import BaseModel, Field

from leea_agent_sdk.agent import Agent
from leea_agent_sdk.runtime import start
from leea_agent_sdk.context import ExecutionContext


class DividerAgentInput(BaseModel):
    a: int = Field(description="A")
    b: int = Field(description="B")


class DividerAgentOutput(BaseModel):
    value: float = Field(description="data field")


class DividerAgent(Agent):
    name: str = "Divider"
    description: str = "Agent that can calculate a / b"
    
    visibility: Literal["public", "private", "hidden"] = "public"

    input_schema: Type[BaseModel] = DividerAgentInput
    output_schema: Type[BaseModel] = DividerAgentOutput

    async def ready(self):
        print("Agent is ready to serve!")
    
    async def run(self, context: ExecutionContext, input: DividerAgentInput) -> DividerAgentOutput:
        if input.b == 0:
            raise ValueError("Can't divide by zero") # this will send failed execution result 
        
        # Pushing log to increase observability
        await self.push_log(context, "Calculating!")
        
        # Calling other agent
        cool_agent = await self.get_agent("leea/cool-agent")
        await cool_agent.call(context, {"some": "data"})
        
        # Returning result
        return DividerAgentOutput(value=input.a / input.b)


if __name__ == '__main__':
    os.environ['LEEA_API_KEY'] = "..."
    start(DividerAgent(), wallet_path="./wallet.json")
```
htmlgenim 0.4.6
HTML-Page Generator
Requires Python: >=3.6

# HTML Generator

Library for generating HTML pages. Supports adding headers, CSS and JS files, and content tags.

## Installation

Install the library via pip:

```bash
pip install htmlgenim
```

## Usage
```bash
from htmlgenim.generator import HTML, Table

# Creating an HTML Instance
page = HTML()

# Setting the title
page.set_title("My page")

# Adding CSS files
page.css_link_add("styles.css")
# page.css_link_add("https://example.com/styles.css")

# Adding JS files
page.js_link_add("script.js")
# page.js_link_add("https://example.com/script.js")

# Adding elements with attributes
page.add_element("h1", "Hello World!", class_="header", id="main-header")
page.add_element("p", "This is an example of using an HTML generator.", class_="content")
page.add_element("a", "Link to Example", href="https://example.com", class_="link")
page.add_element("input", type="radio", name="season", id="spring", value="Spring")
page.add_element("img", src="image.jpg", alt="Description of the image", class_="image")

# Create a table
table = Table()
table.add_class("my-table")
table.add_attr("border", "1")
table.add_row(["Cell 1", "Cell 2"])
table.add_row(["Cell 3", "Cell 4"])
page.table_add(table)

# Saving HTML to a file
page.save_to_file("output.html")
```

## Upgrade
1. Ability to add a table.
2. You can specify CSS styles and other attributes to tags.
3. A log file is created that displays page generation information.
mtcount 0.1.1
A lightweight tool for counting metastatic cells in cancerous tissue samples
Requires Python: >=3.6

# MTC 

## Overview  
A light weight python tool for detecting and counting metastatic cells in cancerous tissue image samples utilising a unique combination of image transformation techniques. Can be integrated with ML/DL algorithms for predicting cancer by simplifying learning data complexity.

##  Local Installation  
```bash
git clone https://github.com/abd-ur/MTC_Count.git
cd MTC_Count
pip install .
```
##  PyPi Module Installation  
```bash
pip install mtcount
```
## Install Dependencies
```bash
pip install -r requirements.txt
```

##  Usage 
```bash
import mcount
detected_cells = mcount.circle("input_image","output_image", alpha, beta)
```
## Note
Output path if not provided, results will be saved at the default path.  
**Alpha** and **Beta** by default is set to 190 and 550, but can be changed by argument 'alpha' and 'beta' while function call.  
Gradient intensity below Alpha is ignored as not an edge, higher Alpha removes more weak edges.  
Gradient intensity above Beta is considered strong edge, lower Beta makes it more sensitive to edges.  
Function returns coordinates of detected cells along with radius.  

## Contributing 
Improvements, bug fixes, and new features are welcomed. Feel free to contribute.

**Fork the Repository** – Click the "Fork" button on GitHub.  
**Clone Your Fork** – Download the code to your local machine:

## Contact  
For any issues, questions, or feature requests, feel free to reach out:

**Email:** theabdur10@gmail.com  
**Portfolio:** https://abd-ur.github.io