semvec/pypi-packages huggingface dataset:
audresample 1.3.5
Resample and remix an audio signal
Requires Python: >=3.10
Keywords: audio, dsp, resample, remix

===========
audresample
===========

|tests| |coverage| |docs| |python-versions| |license|

**audresample** remixes or resamples your signals.

Resampling is supported
for signals in single precision floating-point format,
and based on the `soxr`_ implementation
as provided by `audresamplelib`_.

Have a look at the installation_ and usage_ instructions.

.. code-block:: python

    >>> import numpy as np
    >>> import audresample
    >>> signal = np.zeros((2, 8000), dtype='float32')
    >>> signal.shape
    (2, 8000)
    >>> audresample.remix(signal, mixdown=True).shape
    (1, 8000)
    >>> audresample.remix(signal, channels=[0, 0, 1, 1]).shape
    (4, 8000)
    >>> audresample.resample(signal, 8000, 16000).shape
    (2, 16000)

.. _soxr: https://sourceforge.net/projects/soxr/
.. _audresamplelib: https://github.com/audeering/audresamplelib
.. _installation: https://audeering.github.io/audresample/install.html
.. _usage: https://audeering.github.io/audresample/usage.html


.. badges images and links:
.. |tests| image:: https://github.com/audeering/audresample/workflows/Test/badge.svg
    :target: https://github.com/audeering/audresample/actions?query=workflow%3ATest
    :alt: Test status
.. |coverage| image:: https://codecov.io/gh/audeering/audresample/branch/main/graph/badge.svg?token=NPQDJ5T7HI
    :target: https://codecov.io/gh/audeering/audresample/
    :alt: code coverage
.. |docs| image:: https://img.shields.io/pypi/v/audresample?label=docs
    :target: https://audeering.github.io/audresample/
    :alt: audresample's documentation
.. |license| image:: https://img.shields.io/badge/license-MIT-green.svg
    :target: https://github.com/audeering/audresample/blob/main/LICENSE
    :alt: audresample's MIT license
.. |python-versions| image:: https://img.shields.io/pypi/pyversions/audresample.svg
    :target: https://pypi.org/project/audresample/
    :alt: audresamples's supported Python versions
smoloki 0.1.2
Tiny library to push logs to `Grafana Loki` in `logfmt` format.
Requires Python: >=3.7
Keywords: library, loki

# smoloki

[![PyPI version](https://badge.fury.io/py/smoloki.svg)](https://badge.fury.io/py/smoloki)
[![npm version](https://badge.fury.io/js/smoloki.svg)](https://badge.fury.io/js/smoloki)

Tiny library to push logs to `Grafana Loki` in `logfmt` format.

## CLI

```text
usage: smoloki [-h] [-b BASE_ENDPOINT] [-H HEADERS] labels information

cli for pushing to loki

positional arguments:
  labels            json-encoded string with labels
  information       json-encoded string with information

optional arguments:
  -h, --help        show this help message and exit
  -b BASE_ENDPOINT  base address of loki server
  -H HEADERS        json-encoded string with headers for request to loki server
```

## Usage in Python

```py
import smoloki


def as_request_completed():
    smoloki.push_sync(
        {'service': 'web'},
        {'level': 'info', 'event': 'request_completed'},
    )
```

## Usage in Python via client

```py
from smoloki import SmolokiAsyncClient


async def push_via_client():
    async with SmolokiAsyncClient(
        base_endpoint = 'https://example.com',
        headers = {...}
    ) as client:
        await client.push(
            {'service': 'web'},
            {'level': 'info', 'event': 'request_completed'},
        )
        
        # or push in background
        await client.push_in_background(
            {'service': 'web'},
            {'level': 'info', 'event': 'request_completed'},
        )

```

## Usage in NodeJS

```js
const smoloki = require('smoloki');

async function as_request_completed() {
    await smoloki.push({ service: 'web' }, { level: 'info', event: 'request_completed' });
}
```

## Implementation details

- Calls to `push` method will never throw. Any exception will just be
    logged using `logging`.
- Keys in labels and information must be strings. If `None` is provided as
    value in case of python, it will be serialized as empty string.
- Values in labels and information must be string, integers or floats.
- If no `base_endpoint` provided (using parameter or env), nothing will happen.
- When using SmolokiAsyncClient, the context manager waits for all background
    tasks to be completed when exiting.

## Configuration

- `SMOLOKI_BASE_ENDPOINT` – base address of loki server.
- `SMOLOKI_HEADERS` - headers for request to loki server (can be used for authorization).
- `SMOLOKI_BASE_LABELS` - base labels that will be added to logs.
- `SMOLOKI_BASE_INFORMATION` - base information that will be added to logs.
chia-puzzles-py 0.20.3
A collection of the currently deployed ChiaLisp puzzles.
Requires Python: <4.0,>=3.8

# Chia Puzzles

This is a collection of the standard Chia puzzles.
These are the puzzles which are deployed on chain and therefore cannot change.

This repository tracks the source code, the compiled hex, and a hash of the compiled hex to ensure continuity.

All puzzles are kept in the `puzzles` folder as both a `.clsp` and `.clsp.hex` file.

The Python and Rust bindings are created by running `generate_chialisp_constants.py`

## Adding Bindings for a New Puzzle

1. Add the `.clsp` and `.clsp.hex` files into the `programs` folder.
2. Add the puzzle name, path, and shatree hash into the list in `generate_chialisp_constants.py`.
3. Run `generate_chialisp_constants.py`.
4. Commit your changes, including to the outputted `programs.py` and `programs.rs`.

# Testing

This project is managed with `poetry` for Python and `cargo` for Rust.

To run the Python tests:

```
python -m venv venv

pip install poetry
. ./venv/bin/activate
poetry install
pytest chia_puzzles_py/tests
```

If you're on Windows activate the venv with `. venv\Scripts\activate` instead

To run the Rust tests:

```
cargo test --all
```
ziniao-oapi 0.1.1
紫鸟开放接口
Requires Python: >=3.7

# sdk-python

安装

`pip install requests` 

`pip install rsa`

> Crypto安装
> 
> 1.`pip install pycryptodome`
> 
> 2.python安装路径下找到文件夹\Lib\site-packages\crypto, 将crypto重命名为Crypto

## biz_model和params_model使用场景：
GET请求   使用biz_model             如：rpa_tasks_results_get.py
POST、 PUT、DELETE请求：
    Body参数  使用biz_model         如：rpa_plans_post.py
    Query参数 使用params_model      如：rpa_plans_drivers_post.py, rpa_plans_drivers_delete.py

### 2023.5.16
更新OpenClient.py、RequestTypes.py、BaseRequest.py。
支持流式接口调用

### 2022.5.26
更新OpenClient.py、RequestTypes.py、BaseRequest.py。
通过参数params_model = {}设置url携带参数(GET请求以外有效)


## 接口封装步骤

比如查询计划详情接口

- 接口名：/rpa/plans
- 参数：planId 要查询的计划Id
- 返回信息
```
{
        "msg": "SUCCESS",
        "code": "0",
        "data": {
            "name": "任务名称repeat",
            "platformId": "0",
            "actionType": "REPEAT_BY_WEEK"
        },
        "requestId": "765656",
}
```

针对这个接口，封装步骤如下：

1.在`model`包下新建一个类，定义业务参数

```python
class RpaPlansGetModel:
    """查询计划详情"""

    # 要查询的计划Id
    planId = None
```

2.在`request`包下新建一个请求类，继承`BaseRequest`

重写`get_method()`方法，填接口名。

重写`get_request_type()`方法，填接口请求方式。

```python
class RpaPlansGetRequest(BaseRequest):
    """查询计划详情"""

    def __init__(self):
        BaseRequest.__init__(self)

    def get_method(self):
        return '/rpa/plans'

    def get_request_type(self):
        return RequestTypes.GET
```

3.调用方式

```python
    
# 自用API-查询计划详情
def rpa_plans_get():
    # 创建请求客户端
    client = OpenClient(Config.app_id, Config.private_key, Config.url)

    # 创建请求
    request = RpaPlansGetRequest()
    # 请求参数，方式一
    model = RpaPlansGetModel()
    model.planId = 5070
    request.biz_model = JsonUtil.to_json_string(model)
    # 请求参数，方式二
    # request.biz_model = {
    #     'planId': 5070
    # }

    # 调用请求
    response = client.execute(request, user_token='填写user_token')

    if response.is_success():
        print('response: ', response)
        print('data: ', response.data)
    else:
        print("response: ", response)
        print('请求失败,request_id:%s, code:%s, msg:%s, sub_code:%s, sub_msg:%s' % \
              (response.request_id, response.code, response.msg, response.sub_code, response.sub_msg))

```

## 流式接口调用方式

```python
        # 调用请求，设置stream=True
        response = client.execute(request, app_token='填写app_token', stream=True)
        # 迭代获取流结果
        for item in response.iter_content():
            if item.is_success():
                print(item.get_content())
                print(item.data)
            else:
                print('请求失败,request_id:%s, code:%s, msg:%s, sub_code:%s, sub_msg:%s' %
                      (item.request_id, item.code, item.msg, item.sub_code, item.sub_msg))
```