semvec/pypi-packages huggingface dataset:
ambisafe 0.28.2
Ambisafe KeyServer client library
Keywords: ambisafe,bitcoin

Ambisafe client
===============

Install
-------

Use pip

::

    pip install ambisafe

Usage
-----

Create client
~~~~~~~~~~~~~

Import Client and create client object

::

    from ambisafe import Client

    client = Client(ambisafe_server_url, secret, api_key, api_secret)

You can set prefix for account id

::

    client = Client(ambisafe_server_url, secret, api_key, api_secret, account_id_prefix='prefix')

You can provide read and connect timeout (in seconds)

::

    client = Client(ambisafe_server_url, secret, api_key, api_secret, connect_timeout=2.5, read_timeout=5)

Create account
~~~~~~~~~~~~~~

Simple security schema
^^^^^^^^^^^^^^^^^^^^^^

::

    account = client.create_simple_account(account_id, currency='BTC')

Wallet4 security schema
^^^^^^^^^^^^^^^^^^^^^^^

Generate operator container using secret and create user container from
public\_key, data (encrypted private key), iv and salt

::

    from ambisafe import Container

    operator_container = Container.generate(client.secret)
    user_container = Container(public_key, data, iv, salt)

Create account for security schema "Wallet4" and "BTC" currency

::

    account = client.create_wallet4_account(account_id, user_container=user_container, 
                                            operator_container=operator_container, 
                                            currency='BTC')

Update Wallet4 account
~~~~~~~~~~~~~~~~~~~~~~

Create new containers and update account

::

    account = client.update_wallet4_account(account_id, user_container=user_container, 
                                            operator_container=operator_container, 
                                            currency='BTC')

Get balance
~~~~~~~~~~~

Get balance in float

::

    balance = client.get_balance(account_id, 'BTC')

Get account
~~~~~~~~~~~

::

    account = client.get_account(account_id, 'BTC')

Make payment
~~~~~~~~~~~~

For Simple account
^^^^^^^^^^^^^^^^^^

Build and submit transaction

::

    transaction = client.build_transaction(account_id, 'BTC', address, amount)
    result = client.submit(account_id, transaction, 'BTC')

For Wallet4 accounts
^^^^^^^^^^^^^^^^^^^^

Build transaction

::

    transaction = client.build_transaction(account_id, 'BTC', address, amount)

Sign this transaction by user, then sing by operator and submit it

::

    transaction = client.sign_wallet4_transaction(transaction, account_id, 'BTC')
    client.submit(account_id, transaction, 'BTC')

    # or

    result = client.cosign_wallet4_and_submit(transaction, account_id, 'BTC')

Build recovery transaction
~~~~~~~~~~~~~~~~~~~~~~~~~~

::

    transaction = client.build_recovery_transaction(account_id, currency, old_address)

Disclaimer
----------

The library still in BETA. There can be changes without backward
compatibility.
external-counter-dilshan 1.0.4
Python API for USB seven segment display module

# Python API for USB external display module

This Python API is designed to work with USB based external display module 
available in [here](https://github.com/dilshan/usb-external-display). 
This library works with Python 3.6 or newer versions and it supports many 
operating systems, including Linux, Windows, and Mac.

Python API library uses the serial communication channel established by 
the display module for communication. To use this library display module 
must be in "*API mode*".

This package also has a configuration utility which is useful to 
configure some parameters of the display unit such as idle mode message, 
system time, etc.

The complete documentation of this API is available at 
[GitHub Wiki](https://github.com/dilshan/usb-external-display-python/wiki).
dataManager 0.2.2
A simple library to simplify data handling in deep learning environments. With an API non dissimilar to PyTorch DataLoader

# DataManager

A simple library to simplify data handling in deep learning environments. With an API non dissimilar to PyTorch DataLoader

## Usage

```python
    from dataManager import Manager as DataManager

    dataFunction = lambda x: (reduceImageSize(inputImages,x), inputLabels[x], ...)
    # Initialize Data Providers
    dataManger = DataManger(
        data = dataFunction,
        bz = 32,  
        stochasticSampling = True,
        indexingShape = [dataInput.shape[0]] 
    )

    # provide the data for the tenth batch
    i = 10
    dataManger(i, stochastic = False).shape
    # > (32, ...)
```

## API

### ```__init__(data, indexingShape = None, bz = 32, stochasticSampling = True)```

* ```data: numpy.array or function```: Data to be used during training. If a numpy array is provided the data will be wrapped in a function. The input function should only take one argument which are the indexes of the elements for the data batch.

* ```indexingShape: array```: Array of size 1 or 2. Used to provide the data at each batch. If the array had dim 1, then a list of indexes will be provided. If ```stochasticSampling``` is set to false then the indexes will be ordered from 0 to  (indexingShape - indexingShape%bz), else if the array is dim 2 the indexes will be provided from left to right and from top to bottom of the 2d matrix, in this case we also only provide as many indexes as is possible to provide with full batches.

* ```stochasticSampling: bool```: if true, the indexes provided are sampled in a totally random way with equal probability for each element. For each batch all indexes will be different, but uniqueness of indexes is not guaranteed though batches.

### ```__call__(i, stochastic = None)```
- ```i: integer```: index of the current batch, starting from 0
- ```stochastic: bool```: if stochasticSampling is to be used or not

## Notes:
StochasticSampling overwrites ordered indexing.

## Undocumented Functions:
StochasticSampling overwrites ordered indexing.
* self.getBatch(self, step, bz): return an ordered batch of indexes at a given step
* self.getBatch(self, step, bz): return an ordered batch of indexes at a given step
* self.getStochasticBatch(self, shape, bz): return a randomly picked set of elements with equal probability. Shape is the specific shape defaults to indexingShape if nothing given.