semvec/pypi-packages huggingface dataset:
sensirion-shdlc-driver 1.0.2
Base Driver for Communicating With SHDLC Devices
Requires Python: <4.0,>=3.8
Keywords: driver, sensirion, shldc

# Python Driver for Sensirion SHDLC Devices

This repository contains the base driver for Sensirion SHDLC devices as a Python
package. For details, please read the package description in
[README.rst](https://github.com/Sensirion/python-shdlc-driver/blob/master/README.rst).

## Usage

See package description in [README.rst](https://github.com/Sensirion/python-shdlc-driver/blob/master/README.rst) and user manual at
https://sensirion.github.io/python-shdlc-driver/.

## Development

We develop and test this driver using our company internal tools (version
control, continuous integration, code review etc.) and automatically
synchronize the `master` branch with GitHub. But this doesn't mean that we
don't respond to issues or don't accept pull requests on GitHub. In fact,
you're very welcome to open issues or create pull requests :)

### Check coding style

The coding style can be checked with [`flake8`](http://flake8.pycqa.org/):

```bash
pip install -e .[test]  # Install requirements
flake8                  # Run style check
```

In addition, we check the formatting of files with
[`editorconfig-checker`](https://editorconfig-checker.github.io/):

```bash
pip install editorconfig-checker==2.0.3   # Install requirements
editorconfig-checker                      # Run check
```

### Run tests

Unit tests can be run with [`pytest`](https://pytest.org/):

```bash
pip install -e .[test]                          # Install requirements
pytest -m "not (needs_serialport or needs_tcp)" # Run tests without hardware
pytest                                          # Run all tests
```

To run the tests which access connected hardware, you need to pass following
arguments to `pytest`:

- `--serial-port`: The serial port where a device is connected (e.g. `COM7`)
- `--serial-bitrate`: The bitrate of the device connected to the serial port
  (e.g. `460800`)
- `--serial-address`: The slave address of the device connected to the serial
  port (e.g. `0`)
- `--tcp-port`: The TCP IP address where a device is connected (e.g.
  `192.168.100.209`)
- `--tcp-port`: The port of the device connected via TCP (e.g. `10001`)
- `--tcp-address`: The slave address of the device connected via TCP (e.g. `0`)


### Build documentation

The documentation can be built with [Sphinx](http://www.sphinx-doc.org/):

```bash
python setup.py install                        # Install package
pip install -r docs/requirements.txt           # Install requirements
sphinx-versioning build docs docs/_build/html  # Build documentation
```

## License

See [LICENSE](https://github.com/Sensirion/python-shdlc-driver/blob/master/LICENSE).
tdl-client-python 0.33.1
tdl-client-python
Keywords: kata, activemq, rpc


[![Python Version](http://img.shields.io/badge/Python-3.12-blue.svg)](https://www.python.org/downloads/release/python-370/)
[![PyPi Version](http://img.shields.io/pypi/v/tdl-client-python.svg)](https://pypi.python.org/pypi/tdl-client-python)

# tdl-client-python Development

### Submodules

Project contains a submodule as mentioned in the `.gitmodules` file:
- tdl-client-spec (gets cloned into test/features)

### Getting started

Requirements:
- `Python 3.12` (support for `Python 2.x` has been dropped)
- `pip` (ensure it supports `Python 3.10`)

Python client to connect to the central kata server.

Update submodules
```
git submodule update --init
```

Setting up a development environment:
```
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
```
Your virtualenv will be created in `./venv/`


# Testing
 
All test require the ActiveMQ broker and Wiremock to be started.

Start ActiveMQ
```shell
export ACTIVEMQ_CONTAINER=apache/activemq-classic:6.1.0
docker run -d -it --rm -p 28161:8161 -p 21613:61613 -p 21616:61616 --name activemq ${ACTIVEMQ_CONTAINER}
```

The ActiveMQ web UI can be accessed at:
http://localhost:28161/admin/
use admin/admin to login

Start two Wiremock servers
```shell
export WIREMOCK_CONTAINER=wiremock/wiremock:3.7.0
docker run -d -it --rm -p 8222:8080 --name challenge-server ${WIREMOCK_CONTAINER}
docker run -d -it --rm -p 41375:8080 --name recording-server ${WIREMOCK_CONTAINER}
```

The Wiremock admin UI can be found at:
http://localhost:8222/__admin/
and docs at
http://localhost:8222/__admin/docs


# Cleanup

Stop dependencies
```
docker stop activemq
docker stop recording-server
docker stop challenge-server
```


# Tests

Running all the tests,
```
behave
```

Pass arguments to behave, e.g. to run a specific scenario,

```
$ behave test/features/queue/QueueRunner.feature:154
```

or

```
$ behave -n "Process message then publish"
```

See `behave` [docs](https://python-behave.readthedocs.io/en/latest/behave.html) for more details.

## Distributable

Run the below to generate a distributable archive:

```bash
python3 -m build
```

The `tdl-client-python-x.xx.x.tar.gz` archive can be found in the `dist` folder.



# To release

Set version manually in `setup.py`:
```
VERSION = "0.29.1"
```

Commit the changes
```
export RELEASE_TAG="v$(cat setup.py | grep "VERSION =" | cut -d "\"" -f2)"
echo ${RELEASE_TAG}

git add --all
git commit -m "Releasing version ${RELEASE_TAG}"

git tag -a "${RELEASE_TAG}" -m "${RELEASE_TAG}"
git push --tags
git push
```

Wait for the Github build to finish, then go to:
https://pypi.org/project/tdl-client-python/

## To manually build the PyPi files

TODO
ropt-nomad 0.25.0
A NOMAD plugin for the ropt robust optimization package
Requires Python: >=3.11

# A NOMAD optimizer plugin for ropt
This package installs a plugin for the [ropt](https://github.com/tno-ropt/ropt)
ensemble optimizer package, giving access to algorithms from the
[NOMAD](https://www.gerad.ca/en/software/nomad/) optimization package.

See also the online [`ropt`](https://tno-ropt.github.io/ropt/) and
[`ropt-nomad`](https://tno-ropt.github.io/ropt-nomad/) manuals for more
information.


## Dependencies
This code has been tested with Python versions 3.11-3.13 on linux.

The backend requires the [NOMAD](https://www.gerad.ca/en/software/nomad/)
optimizer, which will be installed as a dependency from PyPI.


## Installation
From PyPI:
```bash
pip install ropt-nomad
```

## Development
The `ropt-nomad` source distribution can be found on
[GitHub](https://github.com/tno-ropt/ropt-nomad). It uses a standard
`pyproject.toml` file, which contains build information and configuration
settings for various tools. A development environment can be set up with
compatible tools of your choice.

The `ropt-nomad` package uses [ruff](https://docs.astral.sh/ruff/) (for
formatting and linting), [mypy](https://www.mypy-lang.org/) (for static typing),
and [pytest](https://docs.pytest.org/en/stable/) (for running the test suite).
ropt-dakota 0.25.0
A Dakota optimizer plugin for ropt
Requires Python: >=3.11

# A Dakota optimizer plugin for `ropt`
This package installs a plugin for the
[`ropt`](https://github.com/TNO-ropt/ropt) robust optimization package,
providing access to algorithms from the Dakota optimization package.

`ropt-dakota` is developed by the Netherlands Organisation for Applied
Scientific Research (TNO). All files in this repository are released under the
GNU General Public License v3.0 (a copy is provided in the LICENSE file).

See also the online [`ropt`](https://tno-ropt.github.io/ropt/) and
[`ropt-dakota`](https://tno-ropt.github.io/ropt-dakota/) manuals for more
information.


## Dependencies
This code has been tested with Python versions 3.11-3.13.

The plugin is based on the [Dakota](https://dakota.sandia.gov/) optimizer and
depends on the [Carolina](https://github.com/equinor/Carolina) Python wrapper.


## Installation
From PyPI:
```bash
pip install ropt-dakota
```


## Development
The `ropt-dakota` source distribution can be found on
[GitHub](https://github.com/tno-ropt/ropt-dakota). It uses a standard
`pyproject.toml` file, which contains build information and configuration
settings for various tools. A development environment can be set up with
compatible tools of your choice.

The `ropt-dakota` package uses [ruff](https://docs.astral.sh/ruff/) (for
formatting and linting), [mypy](https://www.mypy-lang.org/) (for static typing),
and [pytest](https://docs.pytest.org/en/stable/) (for running the test suite).
ropt 0.25.0
The ropt ensemble optimizer module
Requires Python: >=3.11

# `ropt`
`ropt` is a Python module for running robust optimization workflows.

`ropt` is developed by the Netherlands Organisation for Applied Scientific
Research (TNO). All files in this repository are released under the GNU General
Public License v3.0 (a copy is provided in the LICENSE file).

Detailed documentation and examples can be found in the online
[manual](https://tno-ropt.github.io/ropt/).


## Dependencies
`ropt` has been tested with Python versions 3.11-3.14.

`ropt` requires one or more optimization plugins to function. By default, a
plugin based on optimizers included with [SciPy](https://scipy.org/) is
installed.


## Installation
From PyPI:
```bash
pip install ropt
```

To enable support for `pandas` export, you can install the `pandas` dependency:
```bash
pip install ropt[pandas]
```


## Development
The `ropt` source distribution can be found on
[GitHub](https://github.com/tno-ropt/ropt). It uses a standard `pyproject.toml`
file, which contains build information and configuration settings for various
tools. A development environment can be set up with compatible tools of your
choice.

The [uv](https://docs.astral.sh/uv/) package manager offers an easy way to
install `ropt` in its own virtual environment:

```bash
uv sync               # or:
uv sync --all-extras  # To add all optional dependencies
```

The `ropt` package uses [ruff](https://docs.astral.sh/ruff/) (for formatting and
linting), [mypy](https://www.mypy-lang.org/) (for static typing), and
[pytest](https://docs.pytest.org/en/stable/) (for running the test suite).

The documentation is written using [MkDocs](https://www.mkdocs.org/) and
[mkdocstrings](https://mkdocstrings.github.io/). To view the documentation
locally, start the built-in server within the `ropt` distribution directory:

```bash
mkdocs serve
```

All development and documentation tools are declared in `pyproject.toml` as `uv`
development dependencies and can be installed using the `--dev` flag:

```bash
uv sync --dev
```
pysentio 0.0.54b2
Python library for Sentio Pro Sauna Controller
Requires Python: >=3.12

# pysentio
Library for Sentio Pro sauna controller

Designed for use with Homeassistant. Provides the api to a Sentio Pro Sauna controller with RS-485 serial interface.


## Example for test and debug
```python
from pysentio import SentioPro

ss = SentioPro('/dev/ttyUSB0', 57600)
ri = ss._write_read('get info\n')
print(ri)
print(ss._type)
print(ss._version)
```
rhythmic_segments 0.1.12
Research code for basic Rhythmic Segment Analysis.
Requires Python: <3.14,>=3.11
Keywords: rhythm, segments, music, analysis

[![CI](https://github.com/bacor/rhythmic-segments/actions/workflows/ci.yaml/badge.svg)](https://github.com/bacor/rhythmic-segments/actions/workflows/ci.yaml)
[![docs](https://github.com/bacor/rhythmic-segments/actions/workflows/docs.yaml/badge.svg)](https://github.com/bacor/rhythmic-segments/actions/workflows/docs.yaml)


# Rhythmic Segments

This project provides some basic code to simplify **Rhythmic Segment Analysis** in Python. 
A rhythmic segment analysis (RSA) analyzes every fixed-length segment of a sequence of time intervals: the short groups you obtain by sliding a window across the data. Each segment has a *duration* and a *pattern*. The pattern captures the relative durations of a segment’s intervals, either as a normalized vector or as a ratio. For example, the segment (2, 4, 4) has the pattern (.2, .4, .4) or 1 : 2 : 2; both descriptions are interchangeable. Thinking of patterns as normalized vectors shows that all patterns of a given length live on a simplex: a line for length 2, a triangle for length 3, and so on. The goal is to study rhythmic material by analysing how its segments are distributed of that simplex.

Computing patterns is as simple as normalising the segment, and so you can absolutely do a rhythmic segment analysis without using this package. This package however provides some utilities that make things easier: the RhythmicSegments class allows you to conveniently store large numbers of segments and handle associated metadata.

[For more details, have a look at the docs.](https://bacor.github.io/rhythmic-segments)



## Installation

The package has been tested with Python 3.11 and 3.12.
You can install the package using pip:

```sh
pip install rhythmic-segments
```

## Getting started

```python
from rhythmic_segments import RhythmicSegments

intervals = [1, 2, 3, 4, 5, 6, 7, 8, 9]
rs = RhythmicSegments.from_intervals(intervals, length=3)
rs.segments
# array([[1., 2., 3.], [2., 3., 4.], [3., 4., 5.], ... ])
```

## License

The code is distributed under an MIT license.

## Contributing

Feel free to contribute via GitHub: https://github.com/bacor/rhythmic-segments

## Citation

A paper describing the idea in more details is currently in preparation. Until a formal reference is available, please cite the repository:

```bibtex
@misc{cornelissen_rhythmic_segments,
  author = {Bas Cornelissen},
  title = {rhythmic_segments},
  howpublished = {\url{https://github.com/bascornelissen/rhythmic-segments}},
  year = {2025},
  note = {Version 0.1.3}
}
stackit-intake 0.4.0
STACKIT Intake API
Requires Python: <4.0,>=3.9

# stackit.intake
This API provides endpoints for managing Intakes.



This package is part of the STACKIT Python SDK. For additional information, please visit the [GitHub repository](https://github.com/stackitcloud/stackit-sdk-python) of the SDK.


## Installation & Usage
### pip install

```sh
pip install stackit-intake
```

Then import the package:
```python
import stackit.intake
```

## Getting Started

[Examples](https://github.com/stackitcloud/stackit-sdk-python/tree/main/examples) for the usage of the package can be found in the [GitHub repository](https://github.com/stackitcloud/stackit-sdk-python) of the SDK.
npyt 0.4.3
NPY file format with Tail
Requires Python: >=3.8

# NPY file format with Tail

带小尾巴的`NPY`文件格式

## 项目特点

1. 与`Numpy`的`NPY`文件格式兼容, 可以用原生的`np.load`函数加载
2. 支持`memmap`模式, 可以跨进程一写多读。`append`
3. 支持调整文件大小`resize`，但不移动数据
4. 支持`tell`、`seek`、`rewind`、`read`等操作
5. 支持无限写入`NPY8`

## 安装

```bash
pip install npyt
```

## 使用

```python
import numpy as np

from npyt import NPYT

arr = np.array([1, 2, 3, 4, 5, 6])

file = "tmp.npy"
# 创建文件
nt1 = NPYT(file).save(arr, capacity=10, end=0).load(mmap_mode="r+")
# 只读加载文件
nt2 = NPYT(file).load(mmap_mode="r")
nt3 = NPYT(file).load(mmap_mode="r")

nt1.append(arr)
print(nt2.data())

nt1.append(arr[0:1])
print(nt3.data())

```

## 项目背景

本人需要一种准实时的行情存储方式，考虑`arrow`或`np.memmap()`

1. `arrow`，列式存储，并不适合行情数据。因为要将新数据写入到不同的位置
2. `np.memmap()`，内存映射，行式存储，适合行情数据。但还是有不足
    1. 需另行维护`dtype`，`shape`等信息
    2. 文件大小随数据量而增大，不能动态调整大小

所以如果初始时创建一个大文件，然后维护一个标记，用来记录数据的位置，就能实现数据增长了。

标记是放在同一文件，还是放在不同文件呢？

最开始是放在不同文件，这样代码实现方便，但是要维护两个文件。
后来发现`np.load`函数支持`mmap_mode`参数，可以直接加载内存映射文件，并且还是直接带了`dtype`和`shape`信息。为何不直接用呢？ 只要把额外信息放在`NPY`文件的尾部就可以了。

## 额外信息

额外信息放在`NPY`文件的尾部，多加个5个`uint64`数字。

1. start: 开始位置
2. end: 结束位置
3. update_timestamp: 更新时间。可处理end不变，但数据变化的情况
4. offset: 数据区开始位置，方便其他语言快速定位并写入
5. magic: 魔术数，用来判断是否`NPYT`格式文件

## 如何实现修改文件大小而不移动数据

`NPY`文件头有`shape`信息的字符串，例如；

```text
(20, 3)
(200, 3)
```

很明显，这两个字符串的长度是不一样的。而`NPYT`项目修改了此部分，让字符串长度一致，例如；

```text
(                    20, 3)
(                   200, 3)
```

这样就可以直接修改数据大小而不用移动数据区。

## 兼容性

1. `np.load`可以打开`NPYT.save`保存的文件。`NPYT.load`可以打开`np.save`保存的文件, 取原始数据`NPYT._raw()`
2. `np.save`保存的文件大小不可修改。`NPYT.save`保存的文件，可用`NPYT.resize`修改
3. `np.load`后`dtype`缺失`align`属性。`NPYT.load`后`dtype`还原了`align`属性。(numpy 2.2.5)
    - 当`array`要传给`numba.jit`函数，函数中需要对`array`进行修改，由于`align`属性缺失，可能导致修改时出现数据复制，复制出来的对象是只读
    - https://github.com/numpy/numpy/issues/28973

## 无限写入模式NPY8

最开始提供了`RingBuffer`模式。但存在不足

1. 编写过于复杂
    - `c++`版读写都是单行数据读取，可以用`%`算法来实现环形
    - `numpy`版。都是多行整体写入和读取，无法用`%`算法来实现，导致需要写大量判断语句，逻辑复杂
2. 无法零拷贝
    - start<end，零拷贝
    - start>end，数据分成了两段，需要拷贝

所以，`NPY8`模式诞生了，可以`7*24`写入数据

它本质是创建一个文件夹和一个`.lock`文件，通过`.lock`来维护文件夹中**最新的几个**`NPYT`文件。

1. 写入数据时，从`.lock`文件尾，读取最新的`NPYT`文件，如果文件已满，创建新的`NPYT`文件，并写入`.lock`文件
2. `.lock`文件会限定文件数量，比如8个文件，多于8个文件时，文件移出队列不再维护
3. `read`时，从`.lock`文件头开始，读取单个文件，已读完，切换下一个文件，直到`.lock`文件尾
4. `tail`时，从`.lock`文件尾开始，读取单个文件，已读完，但数量不够，继续读取上一个文件，直到`.lock`文件头

## 优化建议

1. `NPY8.tail`是跨文件的，如果能取的是单个文件，就能减少拷贝
    1. 返回的是`np.ndarray`列表，一个个按需使用比`concat`后使用更好
    2. `capacity_per_file`设置得大一些，越大越能减少跨文件的概率`(tail-1)/capacity`。例如：
        - capacity=100,tail=100,则99%的概率跨文件
        - capacity=100,tail=50,则49%的概率跨文件
        - capacity=50,tail=1,则0%的概率跨文件

   `tail`由自己的策略所决定，根据用户能接受的概率，文件大小，记录时长来设置`capacity_per_file`

2. `NPY8.read`一次只读取一个文件，适合遍历场景。`capacity`很大时。可以认为与`tail`功能接近
    - `read(n=1000, prefetch=100)` 最多返回`1000+100`条数据

3. `NPY8`是跨文件的，适合外汇、数字货币场景。股票、期货这类，一个大`NPYT`文件更好用
weerlive-api 0.2.3
Asynchronous Python client for the Weerlive API
Requires Python: <3.15,>=3.14

# Python Weerlive

[![PyPI version][pypi_badge]][pypi_link]
[![License][license_badge]][license_link]
[![Codecov][codecov_badge]][codecov_link]
[![Sonar quality gate][sonar_badge]][sonar_link]
[![GitHub repo stars][stars_badge]][stars_link]
[![Buy me a coffee][buymecoffee_badge]][buymecoffee_link]

Asynchronous Python client for the Weerlive API.

Easily integrate Weerlive's services into your Python application using this client, and enjoy enhanced type safety and autocomplete support.

For more details about the APIs, visit the [Weerlive API page](https://weerlive.nl/delen.php), where you can sign up and get your API key.

## Installation

You can install this package using your preferred package manager. For example, using pip:

```sh
pip install weerlive-api
```

## Usage

To use the Weerlive API, you can import it in your Python scripts and start interacting with the Weerlive API. Here is a simple example:

```python
import asyncio

from weerlive import WeerliveApi


async def main():
    """Show example of fetching weather info from Weerlive API."""
    async with WeerliveApi(api_key="demo") as weerlive:
        weather = await weerlive.city("Amsterdam")
        print(weather)


if __name__ == "__main__":
    asyncio.run(main())

```

## Contributing

Contributions are welcome! Please familiarize yourself with the [contribution guidelines](CONTRIBUTING.md). This document will also help you set up your development environment.

---

Thank you for your interest in the Python Weerlive client! If you have any questions or need further assistance, feel free to open an issue or submit a pull request.

[pypi_link]: https://pypi.org/project/weerlive-api/
[pypi_badge]: https://img.shields.io/pypi/v/weerlive-api?style=for-the-badge
[license_link]: https://github.com/golles/python-weerlive/blob/main/LICENSE
[license_badge]: https://img.shields.io/github/license/golles/python-weerlive.svg?style=for-the-badge
[codecov_link]: https://app.codecov.io/gh/golles/python-weerlive
[codecov_badge]: https://img.shields.io/codecov/c/github/golles/python-weerlive?style=for-the-badge
[sonar_link]: https://sonarcloud.io/project/overview?id=golles_python-weerlive
[sonar_badge]: https://img.shields.io/sonar/quality_gate/golles_python-weerlive?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge
[stars_link]: https://github.com/golles/python-weerlive/stargazers
[stars_badge]: https://img.shields.io/github/stars/golles/python-weerlive?style=for-the-badge
[buymecoffee_link]: https://www.buymeacoffee.com/golles
[buymecoffee_badge]: https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg?style=for-the-badge