An open API service indexing awesome lists of open source software.

https://github.com/tripleee/entro.py

Simple entropy calculation tool for Python
https://github.com/tripleee/entro.py

Last synced: 11 months ago
JSON representation

Simple entropy calculation tool for Python

Awesome Lists containing this project

README

          

entro.py
========

Simple command-line entropy calculation tool for Python.

The tool can calculate entropy for bits, nybbles, bytes, or
Unicode code points. Try with --verbose to see the progress
of the calculation.

To use from a library,

from entro import H, Bit, Nybble, Str, Utf8
bit_entropy = H(Bit(data))
nybble_entropy = H(Nybble(data))
byte_entropy = H(Str(data))
utf8_entropy = H(Utf8(data))

History / Credits
-----------------

Adapted from http://pythonfiddle.com/shannon-entropy-calculation/
which in turn features the following comment:

Stolen from Ero Carrera
http://blog.dkbza.org/2007/05/scanning-data-for-entropy-anomalies.html

LICENSE
-------

2-clause BSD license, as generated by the friendly Github repository creator.