parahash


Nameparahash JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/VermiIIi0n/parahash
SummaryNone
upload_time2024-05-27 10:14:27
maintainerNone
docs_urlNone
authorVermiIIi0n
requires_python<4.0,>=3.12
licenseMIT
keywords utilities
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Collection of some hash functions implemented with `torch`/`numpy`/`tensorflow`

WORK IN PROGRESS!

## Installation

```bash
pip install parahash
```

or clone this repo and run

```bash
pip install -U poetry
poetry install -E all

# To install to your current environment, do
# pip install .
```

Some dependencies are optional when installing because they are not required or you may need a custom-built version of `torch`/`tensorflow`/`numpy`. Make sure to install them if you need them.

## MD5

```python
import parahash
from bitarray import bitarray

device = "cpu"
# device = "cuda"

data = [b'hello', "world", bitarray('1101010101010101010101010101010101010101010101010101010101010101')]

for out in parahash.md5.md5(data, device=device):
    print(parahash.md5.hexdigest(out))
```

Current implementation with enough batch size can get 20 million hashes per second on a single RTX3090 GPU, 16 million hashes per second on a single RTX4070TiS GPU and 750K hashes per second on a single 7950x CPU.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/VermiIIi0n/parahash",
    "name": "parahash",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": "utilities",
    "author": "VermiIIi0n",
    "author_email": "dungeon.behind0t@icloud.com",
    "download_url": "https://files.pythonhosted.org/packages/48/19/2bbbd8bcfc0bc6a4d39e8050ba6b169ad5c6fbd30476dac8205c370534d0/parahash-0.1.0.tar.gz",
    "platform": null,
    "description": "# Collection of some hash functions implemented with `torch`/`numpy`/`tensorflow`\n\nWORK IN PROGRESS!\n\n## Installation\n\n```bash\npip install parahash\n```\n\nor clone this repo and run\n\n```bash\npip install -U poetry\npoetry install -E all\n\n# To install to your current environment, do\n# pip install .\n```\n\nSome dependencies are optional when installing because they are not required or you may need a custom-built version of `torch`/`tensorflow`/`numpy`. Make sure to install them if you need them.\n\n## MD5\n\n```python\nimport parahash\nfrom bitarray import bitarray\n\ndevice = \"cpu\"\n# device = \"cuda\"\n\ndata = [b'hello', \"world\", bitarray('1101010101010101010101010101010101010101010101010101010101010101')]\n\nfor out in parahash.md5.md5(data, device=device):\n    print(parahash.md5.hexdigest(out))\n```\n\nCurrent implementation with enough batch size can get 20 million hashes per second on a single RTX3090 GPU, 16 million hashes per second on a single RTX4070TiS GPU and 750K hashes per second on a single 7950x CPU.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": null,
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/VermiIIi0n/parahash",
        "Issues": "https://github.com/VermiIIi0n/parahash/issues"
    },
    "split_keywords": [
        "utilities"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f93cd54556bdc06862d77d16b29c18df4300e6dcc1d28fa4078ffb4ea8d9e528",
                "md5": "0ca62f6d98dc54682c9b3ec8c7a854cb",
                "sha256": "c4b4ad0197e80541fe1922c4f3855dca93c6b3e63843fc71af144f19cdb6f8d5"
            },
            "downloads": -1,
            "filename": "parahash-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0ca62f6d98dc54682c9b3ec8c7a854cb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 4525,
            "upload_time": "2024-05-27T10:14:24",
            "upload_time_iso_8601": "2024-05-27T10:14:24.983700Z",
            "url": "https://files.pythonhosted.org/packages/f9/3c/d54556bdc06862d77d16b29c18df4300e6dcc1d28fa4078ffb4ea8d9e528/parahash-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "48192bbbd8bcfc0bc6a4d39e8050ba6b169ad5c6fbd30476dac8205c370534d0",
                "md5": "0e41cae9ed5144796e2e3f93c194cc77",
                "sha256": "fe18e214694b17c82c5b09fae5f0364dae6ffc705914ab04ff5151b7151dc8e8"
            },
            "downloads": -1,
            "filename": "parahash-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0e41cae9ed5144796e2e3f93c194cc77",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.12",
            "size": 4670,
            "upload_time": "2024-05-27T10:14:27",
            "upload_time_iso_8601": "2024-05-27T10:14:27.693993Z",
            "url": "https://files.pythonhosted.org/packages/48/19/2bbbd8bcfc0bc6a4d39e8050ba6b169ad5c6fbd30476dac8205c370534d0/parahash-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-27 10:14:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "VermiIIi0n",
    "github_project": "parahash",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "parahash"
}
        
Elapsed time: 1.13781s