semvec/pypi-packages huggingface dataset:
honeydb 1.5.0
A Python API wrapper and CLI tool for the HoneyDB.
License: MIT
Keywords: wrapper library honeydb api cli

HoneyDB
==================

.. image:: https://img.shields.io/pypi/v/honeydb.svg
    :target: https://pypi.python.org/pypi/honeydb/
    :alt: Latest Version

To learn more about HoneyDB visit `About HoneyDB`_.

To lean more about the HoneyDB API visit `HoneyDB REST API`_.

The ``honeydb`` command is a CLI tool for interacting with the HoneyDB API. 

Installation
------------
.. code-block:: bash

    $ pip install honeydb


CLI usage
---------
.. code-block:: bash

    $ export HONEYDB_API_ID=<your api id>
    $ export HONEYDB_API_KEY=<your api key>
    $ honeydb --bad-hosts


Module usage
------------
.. code-block:: python

    from honeydb import api
    honeydb = api.Client('api_id', 'api_key')
    print(honeydb.bad_hosts())

More details and the latest updates can be found on the `GitHub Project Page`_.

.. _About HoneyDB: https://honeydb.io/#about
.. _HoneyDB REST API: https://honeydb.io/#threats
.. _GitHub Project Page: https://github.com/honeydbio/honeydb-python
numpyslicesplit 0.10
Splits a numpy array or a list based on the given indices or ranges and returns the split arrays.
License: MIT
Keywords: numpy


# Splits a numpy array or a list based on the given indices or ranges and returns the split arrays.

### pip install numpyslicesplit

#### Tested against Windows 10 / Python 3.11 / Anaconda

### How to use it in Python 

```python


Parameters:
a (numpy array/list): The input array/list to be split.
splits (list): The indices or ranges to split the array on.
delete (bool, optional): If True, removes the specified indices from the split arrays,
if not it keeps them and deletes the others
Defaults to True.

Returns:
list: A list of numpy arrays split based on the given indices or ranges.

Example:
from numpyslicesplit import np_slice_split
a = np.arange(1000).reshape(100, 10)[..., 0]
splits = [(3, 5), (9, 14), (24, 30), (41, 43)]
s1 = np_slice_split(a, splits, delete=True)
print(f"{s1=}")
s2 = np_slice_split(a, splits, delete=False)
print(f"{s2=}")

splits = [3, 4, 5, 65, 7, 4, 6, 63, 2, 5, (0, 10)]
s1 = np_slice_split(a.tolist(), splits, delete=True)
print(f"{s1=}")
s2 = np_slice_split(a.tolist(), splits, delete=False)
print(f"{s2=}")


# s1=[array([ 0, 10, 20]), array([50, 60, 70, 80]),
#     array([140, 150, 160, 170, 180, 190, 200, 210, 220, 230]),
#     array([300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400]),
#     array([430, 440, 450, 460, 470, 480, 490, 500, 510, 520, 530, 540, 550,
#        560, 570, 580, 590, 600, 610, 620, 630, 640, 650, 660, 670, 680,
#        690, 700, 710, 720, 730, 740, 750, 760, 770, 780, 790, 800, 810,
#        820, 830, 840, 850, 860, 870, 880, 890, 900, 910, 920, 930, 940,
#        950, 960, 970, 980, 990])]


# s1=[[100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230,
# 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380
# , 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500,
# 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620],
#  [640], [660, 670, 680, 690, 700, 710, 720, 730, 740, 750, 760,
#  770, 780, 790, 800, 810, 820, 830, 840, 850, 860, 870, 880, 890,
#  900, 910, 920, 930,
# 940, 950, 960, 970, 980, 990]]
# s2=[[0, 10, 20, 30, 40, 50, 60, 70, 80, 90], [630], [650]]
```