semvec/pypi-packages huggingface dataset:
DiamondCoin 0.0.6
A package to easy use API Diamond Coin API

# DiamondCoin

DiamondCoin is a Python library for working with the [DiamondCoin API](https://vk.com/@diamondcoinnn-diamond-api).

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install DiamondCoin.

```bash
pip install DiamondCoin
```

## Usage

```python
import DiamondCoin as dc

merchant = dc.DiamondCoin(user_id='your_user_id', key='your_key')

# Send payment
merchant.send_payment(to_id='receiver_user_id', amount='1000')

# Get payment URL
merchant.get_payment_url(amount=100)

# Get transactions
merchant.get_transactions(tx=[1])

# Get balance
merchant.get_balance()

# Remove callback endpoint
merchant.remove_callback_endpoint()

# Set callback endpoint
merchant.set_callback_endpoint(ip='your_ip_address', port=8080)

# Get top users
merchant.get_top(top_type='user')

# Run callback server
merchant.run_callback()

# Payment handler
@merchant.payment_handler(handler_type='longpoll')
def payment_callback_handler(payment_data):
    print(payment_data)

merchant.run_longpoll(tx=[1])
or 
merchant.run_longpoll(tx=[2])
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)
uinspect 0.0.5
Ultra-fast inspect functions for Python
Requires Python: >=3.8

uinspect
========

This is a small Python package that offers fast runtime inspection similar to that of ``inspect`` module in Python. To install, simply do

::

   pip install uinspect

benchmark
=========

The following benchmark is generated from running the scripts in ``benchmark/``.

+-----------------+-----------------------------------------------------+------------------------------+---------+---------+--------------+
| Task name       | uinspect method1                                    | uinspect method2             | inspect | speedup | Cost (us/op) |
+=================+=====================================================+==============================+=========+=========+==============+
| Source location | ``uinspect.get_location()`` - 0.21s                 | ``uinspect.Frame()`` - 0.48s | 16.43s  | 79.7x   | 0.21 us/op   |
+-----------------+-----------------------------------------------------+------------------------------+---------+---------+--------------+
| Locals          | ``uinspect.Frame().locals`` - 0.99s                 | N/A                          | 0.82s   | 0.82x   | 0.99 us/op   |
+-----------------+-----------------------------------------------------+------------------------------+---------+---------+--------------+
| Locals diff     | ``uinspect.Frame(2).collect_vars()`` - 2.94s        | N/A                          | 1.20s   | 0.41x   | 2.94 us/op   |
+-----------------+-----------------------------------------------------+------------------------------+---------+---------+--------------+
| Frame walking   | ``uinspect.FrameWalker({}).get_location()`` - 1.45s | N/A                          | 52.27s  | 35.9x   | 1.46 us/op   |
+-----------------+-----------------------------------------------------+------------------------------+---------+---------+--------------+

It turns out that the ``uinspect`` does not speed up the local variable calculation. This is because we have to run an expensive Python C API call regardless of whether itâ€™s ``uinspect`` or ``inspect``. As a result, the overhead is caused by the fact that ``uinspect`` needs to convert Python object to C++ object.

The lesson is to use ``inspect`` module for any local variables related manipulation since itâ€™s faster, but use ``uinspect`` to obtain source location.

install from source
===================

::

   git clone https://github.com/Kuree/uinspect.git
   cd uinspect
   git submodule update --init
   python setup.py install