semvec/pypi-packages huggingface dataset:
aiopaykassa 0.0.1a3
Paykassa.pro asyncio python client
License: MIT
Requires Python: >=3.10,<4.0

# aiopaykassa
paykassa.pro Api Python Async Library

Wrapper for Paykassa.pro API and SCI methods

API example:
```python
from aiopaykassa.clients import PayKassaApi

api = PayKassaApi(api_id=<your_api_id>, api_key=<your_api_key>, shop=<your_merchant_id>)  # test_mode=True for testing

async def print_bitcoin_btc_balance():
    balance = await api.get_shop_balance()
    print(balance.bitcoin_btc)

def main():
    loop = asyncio.get_event_loop()
    loop.run_until_complete(print_bitcoin_btc_balance())
```

SCI example:
```python
import decimal

from aiopaykassa.clients import PayKassaSci
from aiopaykassa.types import NewOrder

sci = PayKassaSci(sci_id=<your_merchant_id>, sci_key=<your_merchant_password>)  # test_mode=True for testing

async def create_order_btc(order_id: int, amount: decimal.Decimal, comment: str) -> NewOrder:
    new_order = await sci.create_order(
        order_id=order_id,
        amount=amount,
        currency=Currency.BTC,
        system=System.BITCOIN,
        comment=comment
    )
    return new_order

def main():
    loop = asyncio.get_event_loop()
    loop.run_until_complete(create_order_btc(1, decimal.Decimal(0.00001), "test"))
```
kdlines 0.1
Kernel density estimation and heatmap visualisation on many lines, time series or 2D data using scikit-learn.
License: MIT
Requires Python: >=3.8

# kdlines
Density heatmaps of many (time-)series using kernel density estimation using scikit-learn.

This package is at alpha stage and experimental.

## Requirements

    scikit-learn
    numpy
    matplotlib

## Installation

`pip install kdlines`
## Basic example

```python
"""
A simple example based on numpy arrays and pandas DataFrame
"""

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

from kdlines import KernelDensityLines

# generate test data, 1000 series each of length 100
x_n = 100
y_n = 1000

# resolution of the heatmap y axis (i.e. number of grid cells)
y_res = 100

# arrays and generated data
x = np.linspace(0, x_n, x_n)
ys = np.empty((y_n, x_n))
randg = np.random.default_rng(seed=645)
for i in range(y_n):
    ys[i] = np.sin(-x / 3) + 0.5 * randg.standard_normal(1) + x * 0.1 + 11

# Data frames with datetime index to simulate time series with timestamps
ys_df = pd.DataFrame(index=x, data=ys.T)
ys_df.index = pd.date_range("2020-01-01", periods=x_n, freq="D")

# Estimation on the pandas DataFrame
kde_df = KernelDensityLines(
    y_res=y_res, kde_kernel='linear', bandwidth='scott'
)
kde_df.fit(y_lines=ys_df)

# Plotting as subplot
# sharex is False in this case since imshow is not plotted, only labeled, 
# with timestamps
fig, axs = plt.subplots(2, 1, figsize=(8, 8), sharey=True, sharex=False)
axs[0].plot(ys_df.index, ys_df.to_numpy(), lw=1)
kde_df.plot(ax=axs[1])
fig.tight_layout()
```
![example_kde_df](https://github.com/rhkarls/kdlines/blob/main/examples/example_simple_kde_df.png)

MIT License

Copyright (c) 2022 Reinert Huseby Karlsen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.