semvec/pypi-packages huggingface dataset:
model-saver2 0.9.0
A class for saving and loading machine learning models

## Class ModelSaver
The ModelSaver class is a utility for saving and loading trained machine learning models in Python. It allows you to save any Python object as a binary file, which can be loaded later to restore the original object. This class is especially useful for saving trained models, as you can save the entire model architecture and trained parameters in a single file, which can be loaded and used to make predictions later.

## Installation
You can install the ModelSaver class using pip. Simply run the following command:

```
pip install model-saver2
```
## Usage
To use the ModelSaver class, you first need to import it in your Python script:

```python
from model_saver2 import ModelSaver
Then, you can create an instance of the class and use it to save your trained model:
```

```python
my_model = ...  # Trained model object
saver = ModelSaver()
saver.save(my_model,'my_model.model')
This will save the my_model object to a file named my_model.model in binary format.
```
To load the saved model, you can use the load method of the ModelSaver class:

```python
saver = ModelSaver()
my_model = saver.load('my_model.model')
This will load the my_model object from the file my_model.model.
```

## Exemple

```python
from model_saver2 import ModelSaver
import numpy as np
from sklearn.linear_model import LinearRegression

# Train a linear regression model on some data
X = np.array([[1, 1], [1, 2], [2, 2], [2, 3]])
y = np.dot(X, np.array([1, 2])) + 3
model = LinearRegression().fit(X, y)

# Save the model to a file
saver = ModelSaver('models', 'my_model')
saver.save(model)

# Load the model from the file
loaded_model = saver.load()

# Use the loaded model to make predictions
new_X = np.array([[3, 5], [4, 6]])
predictions = loaded_model.predict(new_X)
print(predictions)
```

## License
This project is licensed under the MIT License - see the LICENSE.md file for details.
model-saver 1.7.0
A class for saving and loading machine learning models

## Class ModelSaver
The ModelSaver class is a utility for saving and loading trained machine learning models in Python. It allows you to save any Python object as a binary file, which can be loaded later to restore the original object. This class is especially useful for saving trained models, as you can save the entire model architecture and trained parameters in a single file, which can be loaded and used to make predictions later.

## Installation
You can install the ModelSaver class using pip. Simply run the following command:

```
pip install model-saver
```
## Usage
To use the ModelSaver class, you first need to import it in your Python script:

```python
from model_saver import ModelSaver
Then, you can create an instance of the class and use it to save your trained model:
```

```python
my_model = ...  # Trained model object
saver = ModelSaver('my_model.model')
saver.save(my_model)
This will save the my_model object to a file named my_model.model in binary format.
```
To load the saved model, you can use the load method of the ModelSaver class:

```python
saver = ModelSaver('my_model.model')
my_model = saver.load()
This will load the my_model object from the file my_model.model.
```

## License
This project is licensed under the MIT License - see the LICENSE.md file for details.
VDBforGenAI 0.23
A simple package for generating and querying Vector Databases for Generative AI as well any other reason
Requires Python: >=3.6
Keywords: Vector Database,Generative AI

# VDBforGenAI

VDBforGenAI is a Python package for building vector databases of text for use in natural language processing applications.

## Usage

To use VDBforGenAI, first install the package and its dependencies:

```commandline
pip install git+https://github.com/JakubJDolezal/VDBforGenAI.git
```
Next, create an instance of the VectorDatabase class by passing in a list of strings, which represent the context you care about. Each string can contain multiple sentences.


## Minimal example
You instantiate a database and then tell it where to load
```python
from VDBforGenAI.VectorDatabase import VectorDatabase

vdb = VectorDatabase(splitting_choice="length")
vdb.load_all_in_directory('./ExampleFolder')


```
Once you have a VectorDatabase instance, you can use the get_context_from_entire_database method to retrieve the context that is most similar to a given input text.

```python
context = vdb.get_context_from_entire_database('What does parma ham go well with?')

print(context)
```
This retrieves the most similar piece of text to "What does parma ham go well with?" from your indexed directory
You can also specify which level and which directory on that level you wish to search
```python
context_selection=vdb.get_index_and_context_from_selection('Who made this?', 2, 'SubfolderOfLies')

```
The directory level and value structure is saved in 
```python
print(vdb.dlv)
```


Dependencies

VDBforGenAI has the following dependencies:
```
        "faiss-cpu",
        "transformers",
        "torch",
        "numpy","PyPDF2",'docx','python-docx
```


Contributions are welcome! If you have any suggestions or issues, please create an issue or pull request on the GitHub repository.
License

VDBforGenAI is licensed under the MIT License.

# More Usage -
## How to add new strings



## Passing an encoder and tokenizer from Hugging Face's Transformers library:


```
from transformers import AutoTokenizer, AutoModel
from VDBforGenAI import VectorDatabase

[//]: # ( Initialize the tokenizer and encoder)
tokenizer = AutoTokenizer.from_pretrained('bert-base-uncased')
encoder = AutoModel.from_pretrained('bert-base-uncased')

[//]: # ( Initialize the VectorDatabase)
vdb = VectorDatabase( encoder=encoder, tokenizer=tokenizer)

```
Similarly, you can pass your own encoder as a torch model if you provide a tokenizer and the 0th output is the encoding.
ML-modelSaver 1.5.0
A class for saving and loading machine learning models

## Class ModelSaver
The ModelSaver class is a utility for saving and loading trained machine learning models in Python. It allows you to save any Python object as a binary file, which can be loaded later to restore the original object. This class is especially useful for saving trained models, as you can save the entire model architecture and trained parameters in a single file, which can be loaded and used to make predictions later.

## Installation
You can install the ModelSaver class using pip. Simply run the following command:

```
pip install model-saver
```
## Usage
To use the ModelSaver class, you first need to import it in your Python script:

```python
from model_saver import ModelSaver
Then, you can create an instance of the class and use it to save your trained model:
```

```python
my_model = ...  # Trained model object
saver = ModelSaver('my_model.model')
saver.save(my_model)
This will save the my_model object to a file named my_model.model in binary format.
```
To load the saved model, you can use the load method of the ModelSaver class:

```python
saver = ModelSaver('my_model.model')
my_model = saver.load()
This will load the my_model object from the file my_model.model.
```

## License
This project is licensed under the MIT License - see the LICENSE.md file for details.
blivedm 0.1.1
Python获取bilibili直播弹幕的库，使用WebSocket协议
Requires Python: >=3.8,<4.0

# blivedm

Python获取bilibili直播弹幕的库，使用WebSocket协议

[协议解释](https://blog.csdn.net/xfgryujk/article/details/80306776)（有点过时了，总体是没错的）

基于本库开发的一个应用：[blivechat](https://github.com/xfgryujk/blivechat)

## 使用说明

1. 需要Python 3.8及以上版本
2. 安装依赖

    ```sh
    pip install -r requirements.txt
    ```

3. 例程看[sample.py](./sample.py)
ethconnect 1.1.1
ETH-Connect Python SDK
Requires Python: >=3.7

# ETH-Connect Python SDK

## Overview

Ethereum accounts, signatures, and transactions have an additional layer of complexity over traditional cryptographic keys and signatures. [Zymbit](https://www.zymbit.com/)'s ETH-Connect SDK aims to abstract away this complexity, enabling you to seamlessly integrate with Ethereum and EVM compatible chains without having to deal with their technical intricacies.

**NOTE:** Only compatible with [HSM6](https://www.zymbit.com/hsm6/), [SCM](https://www.zymbit.com/scm/), and [SEN](https://www.zymbit.com/secure-compute-node/)

## Installation

```
pip install ethconnect
```

## Documentation:

[ETH-Connect Python SDK Documentation](https://docs.zymbit.com/eth-connect/eth-connect-py/)
bottle-cors2 0.0.1
CORS plugin for Bottle
Requires Python: >=3.8

# BottleCORS
CORS plugin for Bottle

## Installation
### Pip
```bash
```

### Source
```bash
wget https://raw.githubusercontent.com/thepure12/bottle-cors/main/src/bottle_cors/bottle_cors.py
```

## Usage
### Install Plugin
```python
from bottle import Bottle
from bottle_cors import EnableCors
app = Bottle()
plugin = EnableCors()
app.install(plugin)
```
nonebot-plugin-yuefu 0.1.1
AI乐府Nonebot插件
Requires Python: >=3.9,<4.0

<div align="center">
  <a href="https://v2.nonebot.dev/store"><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
  <br>
  <p><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/NoneBotPlugin.svg" width="240" alt="NoneBotPluginText"></p>
</div>

<div align="center">

# nonebot-plugin-yuefu

_✨ NoneBot 插件简单描述 ✨_


<a href="./LICENSE">
    <img src="https://img.shields.io/github/license/zmq175/nonebot-plugin-yuefu.svg" alt="license">
</a>
<a href="https://pypi.python.org/pypi/nonebot-plugin-yuefu">
    <img src="https://img.shields.io/pypi/v/nonebot-plugin-yuefu.svg" alt="pypi">
</a>
<img src="https://img.shields.io/badge/python-3.8+-blue.svg" alt="python">

</div>

这是一个 nonebot2 版本的AI乐府插件

## 📖 介绍

Nonebot2的AI乐府插件，让乐府替你说话！

## 💿 安装

<details>
<summary>使用 nb-cli 安装</summary>
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装

    nb plugin install nonebot-plugin-yuefu

</details>

<details>
<summary>使用包管理器安装</summary>
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令

<details>
<summary>pip</summary>

    pip install nonebot-plugin-yuefu
</details>
<details>
<summary>pdm</summary>

    pdm add nonebot-plugin-yuefu
</details>
<details>
<summary>poetry</summary>

    poetry add nonebot-plugin-yuefu
</details>
<details>
<summary>conda</summary>

    conda install nonebot-plugin-yuefu
</details>

打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入

    plugins = ["nonebot_plugin_example"]

</details>

## ⚙️ 配置

在 nonebot2 项目的`.env`文件中添加下表中的必填配置

| 配置项 | 必填 | 默认值 | 说明 |
|:-----:|:----:|:----:|:----:|
| 配置项1 | 是 | 无 | 配置说明 |
| 配置项2 | 否 | 无 | 配置说明 |

## 🎉 使用
### 指令表
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|:-----:|:----:|:----:|:----:|:----:|
| 指令1 | 主人 | 否 | 私聊 | 指令说明 |
| 指令2 | 群员 | 是 | 群聊 | 指令说明 |
### 效果图
如果有效果图的话
bism 0.0.6
Biomedical Image Segmentation Models (BISM)
Requires Python: >=3.10

# bism - Biomedical Image Segmentation Models

This is a collection of generic PyTorch model constructors usefull for biomedical segmentation tasks. 
Something akin to the `timm` package for 2D image tasks. 
When at all possible, each model will offer a 2D or 3D implementation, however we will not provide pre-trained model files. 

Current Models
---------------

| Model          | 2D  | 3D  | Scriptable |
|----------------|-----|-----|------------|
| UNet           | ✓   | ✓   | ✓          |
| UNeXT          | ✓   | ✓   | ✓          |
| Recurrent UNet | ✓   | ✓   | ✓          |
| Residual UNet  |     |     |            |
| Unet++         | ✓   | ✓   | ✓          |
| CPnet          | ✓   | ✓   | ✓          |


Current Generic Blocks
----------------------

| BLOCK NAME           | 2D   | 3D  |
|----------------------|------|-----|
| UNeXT Block          | ✓    | ✓   |
| ConcatConv           | ✓    | ✓   |
| Recurrent UNet BLock | ✓    | ✓   |
| Residual UNet BLock  | ✓    | ✓   |
| DropPath             | ✓    | ✓   |
| LayerNorm            | ✓    | ✓   |
| UpSample             | ✓    | ✓   |
| ViT Block            |      |     |

Segmentation Implementation
----------------------

| APPROACH            | 2D   | 3D  |
|---------------------|------|-----|
| Cellpose            |     |   |
| Affinities          |     | ✓   |
| Local Shape Desc.   |     | ✓   |
funcgpt 1.1.1
A library to easily create functions based on OpenAI's GPT
Requires Python: >=3.10

# funcgpt: Python library for creating functions with OpenAI's GPT

funcgpt is an easy-to-use Python library that allows you to quickly create Python functions using the power of OpenAI's GPT models. With just a few lines of code, you can create functions that generate human-like responses, answer questions, or anything else that GPT is capable of.

## Features

- Easy to use decorator for creating functions based on GPT models
- Supports different GPT model versions
- Customize GPT's behavior with adjustable temperature values
- Generate responses in streaming or non-streaming modes

## Installation

To install funcgpt, use pip:

```bash
pip install funcgpt
```

## Usage

To create a function that answers questions like a pirate, you can use the following snippet:

```python
from funcgpt import gpt

@gpt
def answer_like_pirate(message: str) -> str:
    """Answer questions like a pirate."""
    ...

```

Usage:

```python
>>> answer_like_pirate("How are you doing today?")
"Arrr, I be doin' fine, matey."
```

To do the same thing, but with a function that streams responses, you can use the following snippet:

```python
from typing import Iterator
from funcgpt import gpt

@gpt
def stream_like_pirate(message: str) -> Iterator[str]:
    """Answers questions like a pirate."""
    ...

```

Usage:

```python
>>> for token in stream_like_pirate("How are you doing today?"):
...     print(token, end="", flush=True)
...
Arrr, I be doin' fine, matey.
```

For defining a function that returns a boolean value, you can use the following snippet:

```python
from funcgpt import gpt

@gpt
def is_pirate(message: str) -> bool:
    """Returns true if the message is from a pirate."""
    ...

```

Usage:

```python
>>> is_pirate("Arrr, I be doin' fine, matey.")
True
```

For choosing a different model or temperature, you can use the `model` and `temperature` keyword arguments:

```python
from funcgpt import gpt

@gpt(model="gpt-4", temperature=0)
def answer_like_pirate(message: str) -> str:
    """Answer questions like a pirate."""
    ...

```

## Contributing

We welcome contributions! Please feel free to fork the repository, make changes, and submit pull requests. If you have any questions or ideas, don't hesitate to open an issue.

## License

funcgpt is released under the MIT License. See the [LICENSE](LICENSE) file for more details.
rpc-reader 0.9
Application to read MTS PRC3 files
Requires Python: >=3.7

# rpc_reader

[![PyPI version](https://img.shields.io/pypi/v/rpc-reader.svg)](https://pypi.org/project/rpc-reader/)
[![Build Status](https://gitlab.com/t8237/rpc_reader/badges/master/pipeline.svg)](https://gitlab.com/t8237/rpc_reader/-/commits/master)
[![coverage report](https://gitlab.com/t8237/rpc_reader/badges/RC_0.9/coverage.svg)](https://gitlab.com/t8237/rpc_reader/-/commits/RC_0.9)


A RPC III file is a data file conforming to the RPC III file specification developed by MTS corporation. This utility reads RPC format and store the data using Numpy arrays. 

This reader does not have the capacity to read all variants specified in the [documentation](https://corp.mts.com/cs/groups/public/documents/library/mts_007569.pdf) provided by MTS.

## Installation
This program can be installed from PyPi or from Gitlab.com
```bash
# From PyPi
python -m pip install rpc-reader  

# From gitlab.com
python -m pip install git+https://gitlab.com/t8237/rpc_reader.git
```


## Usage
### Python module

```python
import pathlib
import rpc_reader

# Set path to file
rpc_file_path = pathlib.Path('rpc_file_path.rpc')

# Instantiate reader object
rpc_object = rpc_reader.ReadRPC(rpc_file_path)

# Import data
rpc_object.import_rpc_data_from_file()

# Export data to numpy as compressed npz file
rpc_object.save_npy_data_to_file()

# Get headers
headers = rpc_object.get_headers()

# Get channels
channels = rpc_object.get_channels()

# Get measurement data as a numpy array
data = rpc_object.get_data()
```

### Command line usage
The command line version will read the content of the rpc-file and export it as a Numpy compressed npz file.

```bash
# This will export source data to path_to_file.npz
rpc_reader path_to_file.rpc

# Add extra headers missing in the source data and export it to path_to_file.npz
rpc_reader path_to_file.rpc --extra-header MY_HEADER MY_HEADER_VALUE --extra-header ENGINEER_NAME BAT_MAN
```

# Version history
## 0.9
 - Bug fixes for FLOATING_POINT DATA_TYPE
 - Type hints introduced
## 0.8
 - Added possibility to add extra headers from command line
## 0.7
 - Minor cleanup of code
## 0.6
 - Corrected header reading
 - Allow for reading of demultiplexed data
## 0.5
 - Allow for multiple data types from header DATA_TYPE
 - Contributed by: Zhang Xing Jing
## 0.4
 - First  public version with working basic functionality

# Contribution and bug reports
Please use this issue tracker in the on gitlab.com for issues and enhancements!
[rpc-reader issues](https://gitlab.com/t8237/rpc_reader/-/issues)  

## Contributors
Niklas Melin \
Michal Galuszka \
Zhang Xing Jing