semvec/pypi-packages huggingface dataset:
theonionbox 20.2
The Onion Box: Dashboard to monitor Tor node operations.
License: MIT
Requires Python: >=3.6

The Onion Box
=============

*The Onion Box* provides a web interface to monitor the operation of a
`Tor <https://www.torproject.org>`__ node. It is able to monitor any Tor
node operated as relay, as bridge and even as client - as long as it can
establish a connection to the node and authenticate successfully.

The connection to the Tor node to be monitored may be established via a
local ``ControlSocket`` or a ``ControlPort`` (local or remote). Advanced
users may establish a connection via the Tor network to a node proving
access to it’s ``ControlPort`` by means of a Hidden Service - supporting
on demand as well `Hidden Service Client
Authorization <https://www.torproject.org/docs/tor-manual.html.en#HiddenServiceAuthorizeClient>`__.

*The Onion Box* supports whatever authentication method the Tor node
provides.

A single instance of *The Onion Box* is able to provide monitoring
functionality for as many nodes as you like.

Above that, *The Onion Box* is able to display Tor network status
protocol data for any Tor node known by
`Onionoo <http://onionoo.torproject.org>`__.
pyqueues 1.2
A library for Priory-Queues containing Indexed-Priority-Queue and Simple Priority-Queue
License: MIT
Keywords: pyqueues,queues,queue,priority queue,priority,pq,heap

pyqueues
=================================

A library for Priority-Queues containing Indexed-Priority-Queue and Simple Priority-Queue.

--Installation:

clone the this reporitory using,
`https://github.com/abecus/Queue.git`

or, install using pip,
`pip install pyqueues`

Works with Python 3.x and PyPy.

## Overview
Both, the Indexed priority queue and the queue has been implemented as a min binary heap to use it as a max heap or to uea it with custome key pass the values as a tuple in the heaps eg. (key, value). The time complexities are,

- peek highest priority element: O(1) 

- pop highest priority element: O(log n) 

- push new element: O(log n) 

additionally for Indexed Priority Queue,

- lookup of any item by key: O(1)

- remove element by key: O(log n) 

- update element by key: O(log n) 

## Usage

		from pyqueues.indexedPriorityQueue import IndexedPriorityQueue
		from pyqueues.heap import heapify, heapPop, heapPush

- to heapify a list (does not changes the original list, but heapifies internally),

		arr = [10, 20, 15, 12, 40, 25, 18, 40]
		pq = IndexedPriorityQueue(arr)
		pq.heapify()

- to push items into the priority queue,	

		pq.push(2)
		pq.push(-1)
    	
- to update a item using key (we an saperatly keep track of the key of the values using a dict by mapping values to the arrSize arrtibute of the priority queue)
    	
		pq.update(pq.arrSize-1, 100)    # updates -1 to 100
		pq.update(pq.arrSize-2, -1)     # updates 2 to -1

"similarly use pq.decreaseKey() and pq.increaseKey() methods (works in half of, the time required for update method), when we know that we are increseing or decresing the values while updating."

- to remove a values from priority queue,

		pq.remove(pq.arrSize-1)    # removes 100

- to pop highest priority element,

		pq.pop()        # pops -1

## License
-------
MIT License

Copyright (c) 2020 abecus

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.