semvec/pypi-packages huggingface dataset:
splashlab 0.1.3
A package for fluid mechanic experimentalists
License: MIT
Keywords: Fluid Dynamics, Experiment

# SplashLab
Python packages intended to assist with experimental research in the field of fluid dynamics. The tools are divided into
two categories: computer vision and dimensional analysis. The entire package can be installed with:
```
pip install splashlab
```
There are two main modules: computer vision and dimensional analysis. As their names suggest computer vision contacts 
classes and functions to assist with computer vision tasks; it is mostly built on top of OpenCV. Dimensional analysis 
has function and classes intended to assist with tasks such as keeping track of units during calculations and finding 
nondimensional groups.

## Computer Vision
### Reading and Displaying Images
The computer vision module contains several functions and classes that assist mainly with processing image and video 
data. The first example shows how to use `read_image_folder` to convert all images in a directory to a single numpy 
array and  display the images with `animate_images`:
```
import splashlab.computer_vision as vision

images = vision.read_image_folder(folder_path, file_extension='.tif', start=0, end=None, step=1, read_color=False)
vision.animate_images(images, wait_time=10, wait_key=False, BGR=True, close=True)
```

## Dimensional Analysis
Dimensional analysis, as the name suggests, helps with dimensional analysis, like applying Buckingham Pi Theorem.
nonebot-plugin-status 0.9.0
Check your server status (CPU, Memory, Disk Usage) via nonebot
License: MIT
Requires Python: <4.0,>=3.9
Keywords: nonebot, nonebot2, server, status

<!--
 * @Author         : yanyongyu
 * @Date           : 2020-11-15 14:40:25
 * @LastEditors    : yanyongyu
 * @LastEditTime   : 2023-10-02 17:14:11
 * @Description    : None
 * @GitHub         : https://github.com/yanyongyu
-->

<!-- markdownlint-disable MD033 MD036 MD041 -->

<p align="center">
  <a href="https://nonebot.dev/"><img src="https://nonebot.dev/logo.png" width="200" height="200" alt="nonebot"></a>
</p>

<div align="center">

# nonebot-plugin-status

_✨ NoneBot 服务器状态（CPU, Memory, Disk Usage）查看插件 ✨_

</div>

<p align="center">
  <a href="https://raw.githubusercontent.com/cscs181/QQ-Github-Bot/master/LICENSE">
    <img src="https://img.shields.io/github/license/cscs181/QQ-Github-Bot.svg" alt="license">
  </a>
  <a href="https://pypi.python.org/pypi/nonebot-plugin-status">
    <img src="https://img.shields.io/pypi/v/nonebot-plugin-status.svg" alt="pypi">
  </a>
  <img src="https://img.shields.io/badge/python-3.8+-blue.svg" alt="python">
</p>

## 使用方式

通用:

- 发送 Command `状态` 或者 `status`

OneBot:

- 向机器人发送戳一戳表情
- 双击机器人头像戳一戳

## 配置项

> [!WARNING]
> GitHub 仓库中的文档为最新 DEV 版本，配置方式请参考 [PyPI](https://pypi.org/project/nonebot-plugin-status/) 上的文档。

配置方式：直接在 NoneBot 全局配置文件中添加以下配置项即可。

### server_status_enabled

- 类型：`bool`
- 默认值：`True`
- 说明：是否启用服务器状态查看功能

### server_status_truncate

- 类型：`bool`
- 默认值：`True`
- 说明：是否启用模板变量按需注入功能（节约时间）

### server_status_only_superusers

- 类型: `bool`
- 默认: `True`
- 说明: 是否仅允许超级用户使用

> 超级用户需在配置文件中如下配置:
>
> ```dotenv
> SUPERUSERS=["your qq id"]
> ```

### server_status_template

- 类型: `str`
- 默认: 请参考示例
- 说明：发送的消息模板，支持的方法、变量以及类型如下：
  - relative_time (`Callable[[datetime], timedelta]`): 获取相对时间
  - humanize_date (`Callable[[datetime], str]`): [人性化时间](https://python-humanize.readthedocs.io/en/latest/time/#humanize.time.naturaldate)
  - humanize_delta (`Callable[[timedelta], str]`): [人性化时间差](https://python-humanize.readthedocs.io/en/latest/time/#humanize.time.precisiondelta)
  - cpu_usage (`float`): CPU 使用率
  - per_cpu_usage (`List[float]`): 每个 CPU 核心的使用率
  - memory_usage (`svmem`): 内存使用情况，包含 total, available, percent, used, free(, active, inactive, buffers, cached, shared) 属性
  - swap_usage (`sswap`): 内存使用情况，包含 total, used, free, percent, sin, sout 属性
  - disk_usage (`Dict[str, psutil._common.sdiskusage]`): 磁盘使用率，包含 total, used, free, percent 属性
  - uptime (`datetime`): 服务器运行时间
  - runtime (`datetime`): NoneBot 运行时间
  - bot_connect_time (`Dict[str, datetime]`): 机器人连接时间

配置文件示例（默认模板）

```dotenv
SERVER_STATUS_TEMPLATE='
CPU: {{ "%02d" % cpu_usage }}%
Memory: {{ "%02d" % memory_usage.percent }}%
Runtime: {{ runtime | relative_time | humanize_delta }}
{% if swap_usage.total %}Swap: {{ "%02d" % swap_usage.percent }}%{% endif %}
Disk:
{% for name, usage in disk_usage.items() %}
  {{ name }}: {{ "%02d" % usage.percent }}%
{% endfor %}
'
```
devstack 0.1.3
A tool for managing docker swarm stacks
License: MIT
Requires Python: <4.0,>=3.10
Keywords: docker, swarm, stack, dev

# devstack

A tool for managing docker stacks.

It reads a yaml file in the docker-compose (for swarm) format and creates the following things:
- a stack name using the 'stem' part of the file (ex: omg.yml → stack name = omg)
- create every external network defined in the file before starting the stack.
- deploy the stack using `docker stack deploy`

In the spirit of kubectl command, `devstack` command take a yaml file as argument.

## List of currently implemented commands:

```
Usage: devstack [OPTIONS] COMMAND [ARGS]...

Options:
  --install-completion [bash|zsh|fish|powershell|pwsh]
                                  Install completion for the specified shell.
  --show-completion [bash|zsh|fish|powershell|pwsh]
                                  Show completion for the specified shell, to
                                  copy it or customize the installation.
  --help                          Show this message and exit.

Commands:
  logs
  create
  status
  destroy
```

* devstack create {stack file}.yml
* devstack status {stack file}.yml
* devstack logs {stack file}.yml {service defined in stack}
* devstack destroy {stack file}.yml

## Example

Go to examples directory a play with the `devstack` command:

```
# cd examples
# devstack create test.yml
Creating service test_nginx
# devstack status test.yml
ID             NAME         MODE         REPLICAS   IMAGE          PORTS
t952y8uhg7wk   test_nginx   replicated   1/1        nginx:alpine   *:8088->80/tcp
# curl http://127.0.0.1:8088
<!DOCTYPE html>
<html lang="en">
<body>
    <h1>Hello world!</h1>
</body>
</html>
# devstack logs test.yml nginx
...
test_nginx.1.1aeijjmut4rh@thosil02    | 2024/03/13 13:28:10 [notice] 1#1: start worker process 46
test_nginx.1.1aeijjmut4rh@thosil02    | 2024/03/13 13:28:10 [notice] 1#1: start worker process 47
test_nginx.1.1aeijjmut4rh@thosil02    | 2024/03/13 13:28:10 [notice] 1#1: start worker process 48
test_nginx.1.1aeijjmut4rh@thosil02    | 2024/03/13 13:28:10 [notice] 1#1: start worker process 49
test_nginx.1.1aeijjmut4rh@thosil02    | 10.0.0.2 - - [13/Mar/2024:13:28:35 +0100] "GET / HTTP/1.1" 200 81 "-" "curl/8.2.1" "-"
^C
Aborted.
# devstack destroy test.yml
Removing service test_nginx
```

## Contributing

This is a python project, with [poetry](https://python-poetry.org/) as package manager

- [install poetry](https://python-poetry.org/docs/#installation)
- install deps: `poetry install`
- make yourself confident with [Typer](https://github.com/tiangolo/typer)
 

Have fun