semvec/pypi-packages huggingface dataset:
pyhll 0.2.4
Small library for in-memory cardinality computing.
License: BSD
Keywords: thrift soa

==================================================================
pyhll - simple library for cardinality detection using HyperLogLog
==================================================================

CI status: |cistatus|

.. |cistatus| image:: https://secure.travis-ci.org/blackwithwhite666/pyhll.png?branch=master

pyhll can be used to compute cardinality, i.e. the unique number of elements in some set using HyperLogLog.
This library is a thin python wrapper around HyperLogLog implementation in https://raw.github.com/armon/hlld

Installing
==========

pyhll can be installed via pypi:

::

    pip install pyhll


Building
========

Get the source:

::

    git clone https://github.com/blackwithwhite666/pyhll.git


Compile extension:

::

     python setup.py build_ext --inplace



Usage
=====

::

    from pyhll import Cardinality
    c = Cardinality()
    c.add(b'foo')
    assert 1 == len(c)
    c.add(b'bar')
    assert 2 == len(c)
    c.add(b'bar')
    assert 2 == len(c)
    c.update([b'bar', b'buzz'])
    assert 3 == len(c)


Running the test suite
======================

Use Tox to run the test suite:

::

    tox


References
==========

Here are some related works which we make use of:

* HyperLogLog in Practice: Algorithmic Engineering of a State of The Art Cardinality Estimation Algorithm : http://research.google.com/pubs/pub40671.html
* HyperLogLog: The analysis of a near-optimal cardinality estimation algorithm : http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.142.9475


Changelog
=========

0.2.4
-----

- Add dump and load support;

0.2.3
-----

- Add support for fluent iface;

0.2.1-0.2.2
-----------

- Fix build on CentOS;

0.2.0
-----

- Add ability to union sets;
- Add serialization support;

0.1.1
-----

- Exclude autoconf artifacts from sdist.

0.1.0 (initial release)
-----------------------

- Prototype.
pystat 0.2.4
Small library for in-memory aggregation.
License: BSD
Keywords: thrift soa

=================================================
pystat - simple library for in-memory aggregation
=================================================

CI status: |cistatus|

.. |cistatus| image:: https://secure.travis-ci.org/blackwithwhite666/pystat.png?branch=master

This library is a thin python wrapper around counter and timer implementation in https://raw.github.com/armon/statsite

Installing
==========

pystat can be installed via pypi:

::

    pip install pystat


Building
========

Get the source:

::

    git clone https://github.com/blackwithwhite666/pystat.git


Compile extension:

::

     python setup.py build_ext --inplace



Usage
=====

Counter example:

::

    from pystat import Counter
    counter = Counter()
    counter.add()
    assert 1 == int(counter)
    counter.add()
    assert 2 == int(counter)
    counter.add(5)
    assert 7 == int(counter)
    assert 3 == len(counter)
    assert 5.0 == counter.max
    assert 1.0 == counter.min
    assert 2.333.. == counter.mean
    assert 2.309.. == counter.stddev

Timer example:

::

    from pystat import Timer
    timer = Timer()
    timer.add(1.0)
    assert 1 == int(timer)
    timer.add(1.0)
    assert 2 == int(timer)
    timer.add(5)
    assert 7 == int(timer)
    assert (0.5, 0.95, 0.99) == timer.quantiles
    assert 5.0 == timer.query(0.99)
    assert 1.0 == timer.query(0.5)


Running the test suite
======================

Use Tox to run the test suite:

::

    tox



Changelog
=========

0.2.4
-----

- Add support for load and dump;
- Check for overflow in __len__;

0.2.3
-----

- Support for fluent interface;

0.2.2
-----

- `PlainCounter` implementation;

0.2.1
-----

- `Counter` can take some iterable to constructor;

0.2.0
-----

- Add serialization support for `Counter`;
- Add union support for `Counter`;

0.1.0 (initial release)
-----------------------

- Prototype.