semvec/pypi-packages huggingface dataset:
stimuli 1.1.0
Precise auditory stimuli.
Requires Python: >=3.11
Keywords: audio, auditory, python, stimuli, trigger

[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![codecov](https://codecov.io/gh/mscheltienne/stimuli/graph/badge.svg?token=92BKRPSD0V)](https://codecov.io/gh/mscheltienne/stimuli)
[![tests](https://github.com/mscheltienne/stimuli/actions/workflows/pytest.yaml/badge.svg?branch=main)](https://github.com/mscheltienne/stimuli/actions/workflows/pytest.yaml)
[![doc](https://github.com/mscheltienne/stimuli/actions/workflows/doc.yaml/badge.svg?branch=main)](https://github.com/mscheltienne/stimuli/actions/workflows/doc.yaml)
[![PyPI version](https://badge.fury.io/py/stimuli.svg)](https://badge.fury.io/py/stimuli)
[![Downloads](https://static.pepy.tech/personalized-badge/stimuli?period=total&units=international_system&left_color=grey&right_color=blue&left_text=pypi%20downloads)](https://pepy.tech/project/stimuli)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/stimuli.svg)](https://anaconda.org/conda-forge/stimuli)
[![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/stimuli.svg)](https://anaconda.org/conda-forge/stimuli)
[![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/stimuli.svg)](https://anaconda.org/conda-forge/stimuli)

# Stimuli

This repository contains auditory stimuli that do not require
[PsychoPy](https://www.psychopy.org/). The auditory stimuli use the python
[sounddevice](https://python-sounddevice.readthedocs.io/en/latest/) library.

# Installation

This repository is available for `python ≥ 3.11` on `pip` with the command
`pip install stimuli` or on `conda-forge` with the command
`conda install -c conda-forge stimuli`.

# Usage

## Audio stimulus

```
from stimuli.audio import Tone
from stimuli.time import sleep
from stimuli.trigger import ParallelPortTrigger

trigger = ParallelPortTrigger("/dev/parport0")
sound = Tone(frequency=1000, volume=80, duration=1)
sound.play(when=0.2)
sleep(0.2)
trigger.signal(1)
```
kumori 0.0.4
Calling Tencent Cloud API in a easier way

# kumori - 更自由地调用腾讯云API

[![Python 3](https://img.shields.io/badge/python-3-blue.svg)](https://www.python.org/downloads/release/python-368/) [![](https://img.shields.io/pypi/v/kumori
)](https://pypi.org/project/kumori/)

腾讯云的python sdk很冗长，而且更新不及时，甚至有些API不会出现在sdk里，用着不是很巴适。因此包装了一下腾讯云的API的调用方式，以实现调用更多API的目的。

## Installation

```bash
pip install kumori
```

## Usage

```python
import os
from kumori.qcloud import User
# 创建一个用户
user = User(os.getenv('QCLOUD_SID'), os.getenv('QCLOUD_SKEY'), 'ap-guangzhou')
# 调用 API
resp = user.cvm.DescribeInstances(Limit=20, Offset=0)
print(resp)
```

默认情况下，如果API返回Error、代码将会抛出Exception。可以通过 `console.suppress_errors()` 屏蔽掉

```python
from kumori.qcloud import console

with console.suppress_errors():
    # 不会抛出异常
    resp = user.cvm.DescribeInstances(Unknown="Key")
# 这里会抛出异常
user.cvm.DescribeInstances(Unknown="Key")
```

## Advanced

kumori 内置了 [cvm 在内的若干个产品的调用](./src/kumori/qcloud/core.py#L142)。如果你想要调用的产品在这里没出现，可以手动添加：

```python
from kumori.qcloud import console, User

console.add_service('abc', '2025-04-29')

user = User(
  # sid=...
  # skey=...
)

user.abc.DescribeYourPPT(Limit=10, Offset=2)
```

## TODO
- [ ] v3 signature
- [ ] cos