semvec/pypi-packages huggingface dataset:
pypbbot 0.4a8
Python implementation for ProtobufBot Server.
Requires Python: >=3.7

# PyProtobufBot

<p align="center">
  <img src="https://pypbbot.kale1d0.space/assets/logo_large.png" width="200">
</p>
<div align="center">
Pypbbot：一个高效、跨平台、可扩展的<a href="https://github.com/PHIKN1GHT/pypbbot">开源</a> Python QQ 机器人服务端框架（基于 <a href="https://github.com/ProtobufBot/onebot_idl">
  ProtobufBot</a> 协议）。<br/>
<a href="https://pypbbot.kale1d0.space/"><b>文档主页</b></a><br/>
注意，本项目仍处于<b>早期开发阶段</b>，暂不适合用于生产环境。
</div>
<br/>
<p align="center">
  <img alt="License" src="https://img.shields.io/badge/license-MIT-blue.svg" />
  <img alt="Version" src="https://img.shields.io/pypi/v/pypbbot.svg" />
  <img alt="Downloads" src="https://img.shields.io/pypi/dm/pypbbot" />
</p>

# 如何使用

首先，运行 `pip install --upgrade pypbbot` 以安装本项目或更新至最新版本。

## 普通用户

在工作目录内（一般是`plugins`文件夹所在的目录）执行`pypbbot`即可启动插件服务器。

```cmd
使用方法: pypbbot [选项]

选项列表:
  --host TEXT             服务器地址  [默认值: localhost]
  --port INTEGER          服务器端口  [默认值: 8080]
  --plugin_path TEXT      插件文件夹  [默认值: plugins]
  --reload / --no-reload  是否启用热重载（插件更新时立刻重启服务，建议仅调试时启用）  [默认值: no-reload]
```

## 插件开发者

### 类驱动模式

如果仅需要编写一些简单的逻辑，可直接导入该库，按照文档内容编写机器人程序后直接运行即可。

样例程序源代码： [simple_class_driver.py](https://github.com/PHIKN1GHT/pypbbot/blob/main/pypbbot_examples/simple_class_driver.py)

（可在项目根目录下使用 `python -m pypbbot_examples.simple_class_driver` 执行）

### 插件驱动模式

插件开发时建议启动热重载。其余选项同普通用户，见上。

`pypbbot --reload`

# 里程碑

- [x] 类驱动器
- [x] 测试组件
- [x] 插件化
- [x] 事务处理
- [x] 命令行工具：服务启动
- [ ] 命令行工具：插件安装
lz4-flex_py 0.1.3
A Python wrapper for lz4_flex Rust crate

lz4_flex python wrapper
=======================

Usage
-----
```python
>>> import lz4_flex
>>> compressed = lz4_flex.compress_prepend_size(b"foo")
>>> lz4_flex.decompress_size_prepended(compressed)
b'foo'
```

Development
-----------

Preparations:
```sh
pip install maturin
python -m venv .venv
source .venv/bin/activate
```
Install the package:
```sh
maturin develop
```

Test it:
```sh
python -c'import lz4_flex'
```

Publishing to pypi:
```sh
maturin publish
```
simpleitem 0.0.2
A simple simple item
Requires Python: >=3.0

SimpleItem
---------------------------

Python SimpleItem Library.

Installing
----------

Install and update using `pip3`_:

.. code-block:: text

    $ pip3 install simpleitem

Python 3 and newer.

.. _pip3: https://pip.pypa.io/en/stable/quickstart/


SimpleItem Example
------------------

Easy to define and use features.

.. code-block:: python

    >> from simpleitem import SimpleItem

    >> item1 = SimpleItem()

    >> item1.node1 = 1

    >> item1['node2']node3 = 3

    >> item1['node1']
    1

    >> item1.node2.node3
    3

    >> item1['node2'].node3
    3

    >> item1.node2['node3']
    3

    >> item1['node2']['node3']
    3

Other Usage Examples

.. code-block:: python

    >> item2 = SimpleItem()
    >> item2['node1'] = 1
    >> item2['node2']['node3'] = 3

    >> item3 = SimpleItem(node1=1, node2={'node3': 3})

    >> item4 = SimpleItem(**{'node1': 1, 'node2': {'node3': 3}})

    >> item5 = SimpleItem()
    >> item5(node1=1, node2={'node3': 3})

    >> item6 = SimpleItem()
    >> item6(**{'node1': 1, 'node2': {'node3': 3}})

path; test.yaml

    settings:
        username: admin

        host: 0.0.0.0

.. code-block:: python

    >> item = SimpleItem()
    >> item.from_yaml(path)

    >> item.setting.username
    admin

    >> setting = item.setting
    >> setting.host
    0.0.0.0


MemoryStorage Example
-----------------------

MemoryStorage designed as singleton pattern, define somewhere use everywhere.

.. code-block:: python

    >> from simpleitem import MemoryStorage

    >> storage = MemoryStorage()

    >> settings = storage.settings
    >> settings.sleep = 1
    >> settings.sleep
     1

    >> settings(debug=True)
    >> storage.settings.debug
     True

Support
-------

*   Python 3.x
*   Supports all operating systems

Links
-----

*   License: `MIT License <https://github.com/dinceraslancom/simpleitem/blob/master/LICENSE>`_
*   Code: https://github.com/dinceraslancom/simpleitem
bminference 0.0.2
A toolkit for big model inference
Requires Python: >=3.6

# BMInference

English | [简体中文]

[简体中文]: ./README-ZH.md

BMInference (Big Model Inference) is a low-resource inference package for large-scale pretrained language models (PLMs).

- **Low Resource.** Instead of running on large-scale GPU clusters, the package enables the running of the inference process for large-scale pretrained language models on personal computers!
- **Open.** Model parameters and configurations are all publicly released, you don't need to access a PLM via online APIs, just run it on your computer! 
- **Green.** Run pretrained language models with fewer machines and GPUs, also with less energy consumption.

## Demo
Here we provide an online demo based on the package with CPM2.

## Install

- From source: ``python setup.py install``

- From docker: ``docker build . -f docker/base.Dockerfile``

Here we list the minimum and recommended configurations for running BMInference. 

| | Minimum Configuration | Recommended Configuration |
|-|-|-|
| Memory | 16GB | 24GB
| GPU | NVIDIA GeForce GTX 1060 6GB | NVIDIA Tesla V100 16GB
| PCI-E |  PCI-E 3.0 x16 |  PCI-E 3.0 x16

## Quick Start

Here we provide a esay script for using BMInference. 

Firstly, import a model from the model base (e.g. CPM1, CPM2, EVA2).
```python
import bigmodels
cpm2 = bigmodels.models.CPM2()
```

Then define the text and use the ``<span>`` token to denote the blank to fill in.
```python
text = "北京环球度假区相关负责人介绍，北京环球影城指定单日门票将采用<span>制度，即推出淡季日、平季日、旺季日和特定日门票。<span>价格为418元，<span>价格为528元，<span>价格为638元，<span>价格为<span>元。北京环球度假区将提供90天滚动价格日历，以方便游客提前规划行程。"
```

Use the ``generate`` function to obtain the results and replace ``<span>`` tokens with the results.

```python
for result in cpm2.generate(text, 
    top_p=1.0,
    top_n=10, 
    temperature=0.9,
    frequency_penalty=0,
    presence_penalty=0
):
    value = result["text"]
    text = text.replace("<span>", "\033[0;32m" + value + "\033[0m", 1)
print(text)
```
Finally, you can get the predicted text. For more examples, go to the ``examples`` folder.

## Performances

Here we report the speeds of CPM2 encoder and decoder we have tested on different platforms. You can also run ``benchmark/cpm2/encoder.py`` and ``benchmark/cpm2/decoder.py`` to test the speed on your machine!

| GPU | Encoder Speed (tokens/s) | Decoder Speed (tokens/s) |
|-|-|-|
| NVIDIA GeForce GTX 1060 | 533 | 1.6
| NVIDIA GeForce GTX 1080Ti | 1200 | 12

## Contributing
Links to the user community and contributing guidelines.

## License

The package is released under the [Apache 2.0](./LICENSE) License.