{ "info": { "author": "Naereen", "author_email": "naereen@crans.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Scientific/Engineering :: Information Analysis", "Topic :: Scientific/Engineering :: Mathematics" ], "description": "Python implementation of Lempel-Ziv Complexity\n==============================================\n\nThis repository contains a small, simple and efficient implement of the `Lempel-Ziv complexity `__ algorithm.\n\nExamples\n--------\n\nSimple usage\n~~~~~~~~~~~~\n\nIf the `lempel_ziv_complexity.py `__ file is accessible in your PATH or in Python's path:\n\n.. code:: python\n\n >>> from lempel_ziv_complexity import lempel_ziv_complexity\n >>> s = '1001111011000010'\n >>> lempel_ziv_complexity(s) # 1 / 0 / 01 / 1110 / 1100 / 0010\n 6\n\n\nDocumentation\n~~~~~~~~~~~~~\n\nSee `this file `__.\n\nWith the C extension\n~~~~~~~~~~~~~~~~~~~~\n\nIf the `lempel_ziv_complexity.so `__ file is accessible in your PATH or in Python's path, the same can be used.\n\nSmall benchmark\n~~~~~~~~~~~~~~~\n\nThere is also a Cython version, to have a faster implementation:\n\n.. code:: python\n\n $ ipython\n ...\n >>> s = '1001111011000010'\n >>> %timeit lempel_ziv_complexity(s)\n 6.1 \u00b5s \u00b1 33.6 ns per loop (mean \u00b1 std. dev. of 7 runs, 100000 loops each)\n >>> %timeit lempel_ziv_complexity_cython(s)\n 132 ns \u00b1 2.55 ns per loop (mean \u00b1 std. dev. of 7 runs, 10000000 loops each)\n\n\nThe speedup is typically between x50 and x100.\nIt is not shipped with the `PyPi` version, see `directly on GitHub `_ if needed.\n\nDemo on a `Jupyter notebook `__\n---------------------------------------------------------\n\nSee this notebook: `on nbviewever `__.\n\n--------------\n\nInstall and build\n-----------------\n\nManually ?\n~~~~~~~~~~\n\nEasy!\n\nClone this repository, go in the folder, compile, test, and if it works,\ninstall it.\n\n.. code:: bash\n\n cd /tmp/\n git clone https://GitHub.com/Naereen/Lempel-Ziv_Complexity\n cd Lempel-Ziv_Complexity/src/\n make build\n make test # should pass\n make install # mv the build/lib*/*.so files where you need them\n\n\nBe sure to include the dynamic library when you need it, or in a folder\naccessible by your Python interpreter (somewhere in ``sys.path``). The\nfile is ``lempel_ziv_complexity_cython.so`` (for Python 2) or the\n``lempel_ziv_complexity_cython.cpython-35m-x86_64-linux-gnu.so`` (for\nPython 3.5, or higher, adapt the name).\n\nWith pip ?\n----------\n\nThis project is hosted on `the Pypi package repository `__.\n\n\n.. code:: bash\n\n sudo pip install lempel_ziv_complexity\n python -c \"from lempel_ziv_complexity import lempel_ziv_complexity; print(lempel_ziv_complexity('1001111011000010') == 6)\" # test\n\n--------------\n\nAbout\n-----\n\nLanguage?\n~~~~~~~~~\n\nPython v2.7+ or Python v3.1+.\n\n- `Numba `__ can be used to speed up the pure\n Python version.\n- `Cython `__ is *needed* to build the C extension\n (faster).\n\nLicense ?\n~~~~~~~~~\n\n`MIT Licensed `__ (file\n`LICENSE `__). \u00a9 `Lilian\nBesson `__, 2017.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Naereen/Lempel-Ziv_Complexity", "keywords": "", "license": "OSI Approved :: MIT License", "maintainer": "", "maintainer_email": "", "name": "Lempel-Ziv_Complexity", "package_url": "https://pypi.org/project/Lempel-Ziv_Complexity/", "platform": "", "project_url": "https://pypi.org/project/Lempel-Ziv_Complexity/", "project_urls": { "Homepage": "https://github.com/Naereen/Lempel-Ziv_Complexity" }, "release_url": "https://pypi.org/project/Lempel-Ziv_Complexity/0.1/", "requires_dist": null, "requires_python": ">=2.7, >=3.1", "summary": "Lempel-Ziv complexity for a binary sequence, in naive Python code.", "version": "0.1" }, "last_serial": 2916685, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "d3bd85025121298abe841a79f41b7382", "sha256": "79c133fffd335f26f8149fc7430dbc0706303ba804a351e0af20ace55d5d515f" }, "downloads": -1, "filename": "Lempel_Ziv_Complexity-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d3bd85025121298abe841a79f41b7382", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, >=3.1", "size": 6376, "upload_time": "2017-06-01T12:40:23", "url": "https://files.pythonhosted.org/packages/98/28/4624d91a7e367606e85db02040223b24998a1c2a08345522d5769d9cf359/Lempel_Ziv_Complexity-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a5f0713115a60901982cdda778ede4d7", "sha256": "628ed5a7405c6b19c7461030c776e53dd51fb87cb7883d6633501aed6606e3dd" }, "downloads": -1, "filename": "Lempel-Ziv_Complexity-0.1.tar.gz", "has_sig": false, "md5_digest": "a5f0713115a60901982cdda778ede4d7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, >=3.1", "size": 2395, "upload_time": "2017-06-01T12:40:33", "url": "https://files.pythonhosted.org/packages/d1/21/4945184b513f7831348763e2cc1787dcd51a55b05b8a0a20e1e8ebb71caa/Lempel-Ziv_Complexity-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d3bd85025121298abe841a79f41b7382", "sha256": "79c133fffd335f26f8149fc7430dbc0706303ba804a351e0af20ace55d5d515f" }, "downloads": -1, "filename": "Lempel_Ziv_Complexity-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d3bd85025121298abe841a79f41b7382", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, >=3.1", "size": 6376, "upload_time": "2017-06-01T12:40:23", "url": "https://files.pythonhosted.org/packages/98/28/4624d91a7e367606e85db02040223b24998a1c2a08345522d5769d9cf359/Lempel_Ziv_Complexity-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a5f0713115a60901982cdda778ede4d7", "sha256": "628ed5a7405c6b19c7461030c776e53dd51fb87cb7883d6633501aed6606e3dd" }, "downloads": -1, "filename": "Lempel-Ziv_Complexity-0.1.tar.gz", "has_sig": false, "md5_digest": "a5f0713115a60901982cdda778ede4d7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, >=3.1", "size": 2395, "upload_time": "2017-06-01T12:40:33", "url": "https://files.pythonhosted.org/packages/d1/21/4945184b513f7831348763e2cc1787dcd51a55b05b8a0a20e1e8ebb71caa/Lempel-Ziv_Complexity-0.1.tar.gz" } ] }