semvec/pypi-packages huggingface dataset:
popsom7 7.1.2
A Fast, User-friendly Implementation of Self-Organizing Maps (SOMs)
Requires Python: >=3.6

# Popsom7

## Overview

A fast, user-friendly implementation of self-organizing maps (SOMs) with a number of distinguishing features:

1. Support for both Python and R.

1. Easy to use interfaces for building and evaluating self-organizing maps:
   * An interface that works the same on both the R and the Python platforms
   * An interface that is **sklearn compatible**, allowing you to leverage the power
     and convenience of the sklearn framework in Python.

1. Automatic centroid detection and visualization using starbursts.

1. Two models of the data: (a) a self organizing map model, (b) a centroid based clustering model.

1. A number of easily accessible quality metrics.

1. An implementation of the training algorithm based on tensor algebra.


## Installation

You can install popsom7 via pip:

```bash
pip install popsom7
```

## Usage
Below is a quick example using the popsom `sklearnapi` interface.   

```python
from popsom7.sklearnapi import SOM
import pandas as pd
from sklearn import datasets

iris = datasets.load_iris()
X = pd.DataFrame(iris.data, columns=iris.feature_names)
y = pd.DataFrame(iris.target_names[iris.target],columns=['species'])

# Create and fit the SOM model
som = SOM(xdim=20, ydim=15, train=100000, seed=42).fit(X, y)

# View a summary of the SOM
som.summary()

# Display the starburst (heat map) representation
som.starburst()
```

Here is the same example written in the API based on the R API.
```python
from popsom7.maputils import map_build, map_summary, map_starburst
import pandas as pd
from sklearn import datasets   

iris = datasets.load_iris()
X = pd.DataFrame(iris.data, columns=iris.feature_names)
y = pd.DataFrame(iris.target_names[iris.target],columns=['species'])

# Build the map
som_map = map_build(X, labels=y, xdim=20, ydim=15, train=100000, seed=42)

# View a summary of the SOM
map_summary(som_map)

# Display the starburst (heat map) representation
map_starburst(som_map)
```

For more details please see the [project homepage](https://github.com/lutzhamel/popsom7)
amis-py-model 1.0.0
基于百度amis前端框架的python pydantic模型封装。
Requires Python: <4.0,>=3.7

## amis-python
<p align="center">
    <a href="https://cdn.jsdelivr.net/gh/CMHopeSunshine/amis-python@master/LICENSE"><img src="https://img.shields.io/github/license/CMHopeSunshine/amis-python" alt="license"></a>
    <img src="https://img.shields.io/badge/Python-3.7+-yellow" alt="python">
    <img src="https://img.shields.io/pypi/v/amis-python" alt="version">
</p>

基于 [百度amis](https://github.com/baidu/amis) 前端框架的python pydantic模型封装。

由于[原版本](https://github.com/amisadmin/fastapi_amis_admin/tree/master/fastapi_amis_admin/amis)缺少大量amis新版本的组件或配置，因此本项目在其版本的基础上进行了扩充。

相比fastapi-amis-admin的版本：
- 涵盖amis截至3.1.0版本的所有组件
- 使用jinja2模板
- 支持修改主题
## 安装
```
pip install amis-python
```
## 简单使用
```python
from amis.components import Page

page = Page(title='新页面', body='Hello World')
# 输出为python字典
print(page.to_dict())
# 输出为json
print(page.to_json())
# 输出为str
print(page.render())
# 保存为html文件
with open('HelloWorld.html', 'w', encoding='utf-8') as f:
    f.write(page.render())
```

## 详细使用
详见[amis官方文档](https://aisuda.bce.baidu.com/amis/zh-CN/docs/index)

## 感谢
- [amis](https://github.com/baidu/amis)
- [fastapi-amis-admin](https://github.com/amisadmin/fastapi_amis_admin/tree/master/fastapi_amis_admin/amis)
fs-comfyui-frontend-package 1.20.2
ComfyUI Frontend Package for web interface
Requires Python: >=3.9

# comfyui_frontend pypi package

This is the pypi package structure for the comfyui frontend.

During build process, the compiled assets are copied into the `${PROJECT_ROOT}/comfyui_frontend_package/comfyui_frontend_package/static` directory.

The package can be installed with the following command:

```bash
pip install comfyui-frontend-package
```

Ref: <https://pypi.org/project/comfyui-frontend-package/>
petl-addons 0.0.1
A collection of extensions for PETL
Requires Python: >=3.8

# petl_addons

This is a library that adds

## Installation

```sh
pip install petl_addons
```

## Usage

```py
import petl_addons
```

### apply

This patches the petl `Table` class with an `apply` method calls the specified function
with the table. This allows pipeline fragments to be defined and applied in a clear format.

```py
def filter_values(table):
    return table.selecteq('value', 10).selectnotnone('name')

table.apply(filter_values)
```

`args` and `kwargs` are passed through to the function:

```py
def op(table, field, inflation=10):
    return table.convert(field, lambda f: f+inflation)

table.apply(op, 'value', inflation=20) // Will inflate the value field by 20
```

Multiple separate fragments can be chained together, greatly enhancing code readability and
reusability.

```py
table.apply(filter_values).apply(summarise_data).apply(write_csv)
```

The module also overloads the `|` character to allow the following usage, equivalent to the
example above:

```py
table | filter_values | summarise_data | write_csv
```

NB this won't work with parameter functions.

If you wish to load this on its own without any other modules, use the statement below.

```py
import petl_addons.apply
```
samsam 1.0.7
Scaled Adaptive Metropolis SAMpler
Requires Python: >=3.8

samsam: Scaled Adaptive Metropolis SAMpler
==========================================

Read the documentation at https://obswww.unige.ch/~delisle/samsam/doc/.

Contribute
----------

Everyone is welcome to open issues and/or contribute code via pull-requests.
A SWITCH edu-ID account is necessary to sign in to https://gitlab.unige.ch.
If you don't have an account, you can easily create one at https://eduid.ch.
Then you can sign in to https://gitlab.unige.ch by selecting "SWITCH edu-ID" as your organisation.
dl-a2t 0.0.2.4
Download audio from YouTube and transcribe it
Requires Python: >=3.12

# dl-a2t

dl-a2t 是一个从 YouTube 下载音频并转录为文本的工具。它使用 yt-dlp 下载音频，并使用 OpenAI 的 Whisper 模型进行转录。

## 使用方法

使用 dl-a2t 需要 Python 3.12 或更高版本。首先，确保你已经安装了 Python 和 pip。然后，使用以下命令安装 dl-a2t：

```sh
pip install dl-a2t
```

安装完成后，你可以使用以下命令来下载音频并转录为文本：

```sh
dl-a2t run url_of_video output_file
```

也可以输入一个文件，每行是一个 url

```sh
dl-a2t batch input_file output_file
```

获取详细的 API 文档：

```sh
dl-a2t --help
dl-a2t run --help
dl-a2t batch --help
```

## Options

- `--model`：选择 Whisper 模型大小，默认为 `tiny`

## 依赖项

dl-a2t 依赖以下库：

- `yt-dlp`：用于下载 YouTube 视频的音频
- `OpenAI Whisper`：用于转录音频为文本
- `Typer`：用于命令行界面

## 文件结构

dl-a2t 的文件结构如下：

- `cli.py`：命令行界面
- `pyproject.toml`：项目配置文件
- `impl/download.py`：用于下载音频的实现
- `impl/transcript.py`：用于转录音频为文本的实现
mymathlib-test 0.4
A simple math operations library for demo purposes
Requires Python: >=3.6

# mymathlib_test

`mymathlib_test` is a simple Python library that provides basic math operations such as addition, subtraction, multiplication, and division.  
It's perfect for beginners or anyone who needs quick and easy math functions without any extra dependencies.

## Features

- Add two numbers
- Subtract one number from another
- Multiply two numbers
- Divide one number by another (with zero division protection)

## Installation

Install the package easily with pip:

```bash
pip install mymathlib_test
ysdb 0.2.1
YSDB Python Client SDK
Requires Python: >=3.7

# YSDB SDK

> 目前支持 Windows、CentOS 和 Debian 环境（Debian为K2Assets的python运行环境）。

此SDK为二次开发人员提供ysdb数据库的python客户端开发接口。

ysdb提供标准C动态库，由python封装C动态库，对外提供标准python的接口SDK。用户只需要调用python的对象既可以访问ysdb数据库。

## 一、安装和验证

安装SDK最新版本：
```
pip install -U ysdb
```

在python代码里引用并建立到指定ysdb服务器的连接：
```
from ysdb.ysdbLib import RdbClient

client = RdbClient()
ret = client.connect("192.168.131.238", 30221)
```
以上代码若运行成功将返回下面的结果，表示连接成功：
```
rdbConnectOk, handle:1
```

## 二、直接使用SDK

直接使用ysdb sdk的方法，例如读取ysdb中的散点或波形数据，请参考《ysdb数据库开发接口（Python）》文档。


## 三、通过封装类使用SDK

昆仑数据基于ysdb原有接口做了一层封装（`RdbWrapper`类），去掉了不常用的参数，使得调用更方便。

目前`RdbWrapper`只提供个别接口的功能，未来视情况扩展。

注意，确保在K2Assets的`docker-compose.yml`里配置了必要的ysdb信息，例如：
```
- K2BOX_YSDB_HOST=192.168.130.13
- K2BOX_YSDB_PORT=30221
- K2BOX_YSDB_USER=Administrator
- K2BOX_YSDB_PASSWORD=123
```

### 1、实例化

#### 接口定义
根据指定的K2Assets，构造RDBWrapper类的实例。

#### 输入参数
| 参数名称        | 参数含义                             |
|-------------|----------------------------------|
| k2a_host        | K2Assets的域名或IP地址                 |
| k2a_port    | K2Assets的端口号，例如443               |
| k2a_user | K2Assets用户名                      |
| k2a_basic_token | Basic认证用的token，可在K2Assets用户管理页查看 |
| k2a_protocol | 可选参数，K2Assets的访问协议，默认为https      |
| k2a_tenant | 可选参数，K2Assets的租户，默认为root         |


#### 示例
```
from ysdb.wrapper import RdbWrapper
rdbWrapper = RdbWrapper('dev.kstonedata.k2', 443, 'zhangsan', '...')
```

### 2、写入遥控命令
基于原SDK中的`login`和`writeCtrlDataById`接口封装，用于向ysdb写入遥控命令。

#### 接口定义
- write_ctrl_data(mode, point_id, point_value)

#### 输入参数
| 参数名称        | 参数含义                                 |
|-------------|--------------------------------------|
| mode        | 写入模式，0表示写入状态量，1表示写入模拟量               |
| point_id    | 要遥控的测点ID                             |
| point_value | 要写入的遥控值。mode为0时，1代表打开，0代表关闭； |

#### 返回值
- 返回1表示写入成功，非1表示写入失败
- 若connect或login失败将抛出异常

#### 示例
```
from ysdb.wrapper import RdbWrapper

rdbWrapper = RdbWrapper('dev.kstonedata.k2', 443, 'zhangsan', '...')
ret = rdbWrapper.write_ctrl_data(0, 2, 1)  # 写入状态量到2号测点
ret = rdbWrapper.write_ctrl_data(1, 4, 3.0)  # 写入模拟量到4号测点

# 登录ysdb得到的token有效期为10分钟，若持续写入遥控命令，需要定期更新token
rdbWrapper.refresh_token()
```

### 3、更新token
登录ysdb得到的token有效期为10分钟，若持续调用需要token的接口，需要定期更新token。

#### 接口定义
- refresh_token()

#### 返回值
- 若更新成功返回token值
- 若更新失败将抛出异常