semvec/pypi-packages huggingface dataset:
nqlib 1.0.1
NQLib: Library to design noise shaping quantizer for discrete-valued input control.
Requires Python: >=3.11
Keywords: discrete-valued input control, control theory, quantizer, control system design, quantization, simulation

# NQLib

[![Test NQLib](https://github.com/knttnk/NQLib/actions/workflows/test-python-package.yml/badge.svg)](https://github.com/knttnk/NQLib/actions/workflows/test-python-package.yml)
[![PyPI Downloads](https://static.pepy.tech/personalized-badge/nqlib?period=total&units=INTERNATIONAL_SYSTEM&left_color=GRAY&right_color=BLUE&left_text=PyPI+downloads)](https://pepy.tech/projects/nqlib)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/nqlib/badges/downloads.svg)](https://anaconda.org/conda-forge/nqlib)


NQLib is a <a href="https://www.python.org/" target="_blank">Python</a> library to design noise shaping quantizer for discrete-valued input control.

## What can I do with NQLib?

In the real world, a dynamic system may have to be controlled by discrete-valued signals due to the inclusion of actuators that are driven by ON/OFF or network with capacity limitations. In such a case, a good output may be obtained by converting continuous-valued input to discrete-valued input with a quantizer designed by NQLib.

## Install

You can install NQLib by using pip

```sh
pip install nqlib
```

or conda.

```sh
conda install -c conda-forge nqlib
```

## Documentation

All the documentation is available at <a href="https://knttnk.github.io/NQLib/" target="_blank">NQLib documentation page</a>.

Examples of usage are available at <a href="https://colab.research.google.com/drive/1Ui-XqaTZCjwqRXC3ZeMeMCbPqGxK9YXO" target="_blank">example (Google Colab)</a>.

## References

NQLib is a Python library version of <a href="https://github.com/rmorita-jp/odqtoolbox" target="_blank">ODQ Toolbox</a>,
which were developed in <a href="https://www.mathworks.com/products/matlab.html" target="_blank">MATLAB</a>.

The algorithms used in NQLib are based on the following paper.

- [1] S. Azuma and T. Sugie: Synthesis of optimal dynamic quantizers for discrete-valued input control;IEEE Transactions on Automatic Control, Vol. 53,pp. 2064–2075 (2008)
- [2] S. Azuma, Y. Minami and T. Sugie: Optimal dynamic quantizers for feedback control with discrete-level actuators; Journal of Dynamic Systems, Measurement, and Control, Vol. 133, No. 2, 021005 (2011)
- [3] 南，加嶋：システムの直列分解に基づく動的量子化器設計；計測自動制御学会論文集，Vol. 52, pp. 46–51(2016)
- [4] R. Morita, S. Azuma, Y. Minami and T. Sugie: Graphical design software for dynamic quantizers in control systems; SICE Journal of Control, Measurement, and System Integration, Vol. 4, No. 5, pp. 372-379 (2011)
- [5] Y. Minami and T. Muromaki: Differential evolution-based synthesis of dynamic quantizers with fixed-structures; International Journal of Computational Intelligence and Applications, Vol. 15, No. 2, 1650008 (2016)

## License

This software is released under the MIT License, see LICENSE.txt.
pathtmpl 0.3
Path Template
Requires Python: >=3.13

# Path Template

## Install

```shell
poetry add pathtmpl
```


## Usage

```python
import uuid
from pathlib import PurePath
from datetime import date as Date
from pathtmpl import Context, get_evaluated_path


path_tmpl = """
  /Tax/{{ year }}/{{ file_name }}
"""
context = Context(
    id=uuid.uuid4(),
    title="My Tax Declaration",
    file_name="elster_doc.pdf",
    category="Taxes",
    year=2025,
    month=12,
    day=11,
)

ev_path = get_evaluated_path(context, path_template=path_tmpl)
assert ev_path == PurePath("/Tax/2025/elster_doc.pdf")
```

Another example:
```python
import uuid
from pathlib import PurePath
from pathtmpl import Context, get_evaluated_path


context = Context(
        file_name="receipt.pdf",
        title="Receipt from ALDI",
        id=uuid.uuid4(),
        year=2025,
        day=11,
        month=12,
        category="Grocery Receipts"
)
ev_path = get_evaluated_path(
    context,
    path_template="/{{ category }}/{{ year }}/{{ file_name }}",
)

expected_path = PurePath(
    "/Grocery Receipts/2025/receipt.pdf"
)
assert PurePath(ev_path) == expected_path
```

In its simplest form:

```python
import uuid
from pathlib import PurePath
from pathtmpl import Context, get_evaluated_path


context = Context(
    title="coco",
    id=uuid.uuid4(),
    year=2025,
    day=11,
    month=12,
    file_name="invoice.pdf",
    category="Invoice"
)
ev_path = get_evaluated_path(context, path_template="/My Documents/Receipt/")

assert ev_path == "/My Documents/Receipt/"
```

## Tests

```shell
poetry run pytest
```
pyRedNoise 1.0.0
A package performing power spectrum analysis, and comparing the given signal with red noise
Requires Python: >=3.9

```
class RedNoiseAnalysis(
    signal,
    lag = 1,
    chunk_size = 1825,
    n_red_noise_ens = 1000,
    red_noise_simulate_length = 365000
)
```
This is a package that performing temporal power spectrum analysis, and comparing given signal with theoretical red noise and simulated red noise.

## Usage
Calculating power spectrum of given signal, and red noise which has similar memory with given signal.
```
from pyRedNoise.RedNoiseAnalysis import RedNoiseAnalysis
signal = np.load("signal.npy")

rna = RedNoiseAnalysis(signal)
rna.get_power_spectrum()

# Given signal
rna.signal

# power spectrum of given signal
rna.sp

# frequencies of given signal
rna.freq

# theoretical red noise power spectrum
rna.sp_theo

# theoretical red noise frequencies
rna.freq_theo

# simulated red noise power spectrum
rna.sp_red

# simulated red noise frequencies
rna.freq_red
```

Fast visualization. If you have specific plotting needs, calling this method is not suggested.
```
rna.plot_power_spectrum() # show and save the plot at the same time
```

## Notes
Details of derivation, theory, and implementation can be found in https://github.com/Prcpltwfkwd-TW/Power_Spectrum_Analysis.git
cheez-semg-pico 1.1.6
SDK for CheezPico USB/BLE Devices
Requires Python: >=3.7


# Cheez SDK

## Installation

```bash
pip install cheez_semg_pico
```

## Quick Start

```python
from cheez_semg_pico import CheezPico   
import asyncio  

async def main():  
    sEMG = CheezPico()  
    device = None   
    device = sEMG.connect()                     # 连接设备   

    await sEMG.set_device_id(2)                 # 设置设备ID:0~255   
    # 配置采样率:100 Hz, 200 Hz, 500 Hz, 1000 Hz
    await sEMG.set_sampling_rate(200)     
    await sEMG.set_wear_detection(enable=False) # 设置是否开启佩戴检测  
    await sEMG.set_filter_state(enable=True)    # 设置是否开启滤波  
 
    while True:  
        data = await device.read_data()         # 读取设备  
        print(f"data:{data},sps({device.get_packet_rate()})")
 

if __name__ == "__main__":  
    asyncio.run(main())   

```

## Features

- Easy device port discovery
- Simple serial connection management
- Async data reading
- Configurable logging
- Error handling and validation