cpu-heater


Namecpu-heater JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryA Python parallel computing library
upload_time2024-09-10 12:33:30
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CPU-Heater

A Python parallel computing library.

## Install

```py
pip install cpu-heater
```

## Usage

Multiprocessing:

```py
import cpu_heater

def adder(x, y):
    return x + y

def test_cpu_heater():
    args_list = [(i, i) for i in range(114514)]
    results = cpu_heater.multiprocess(adder, args_list, max_workers=8, show_progress=True, timeout=5)
    assert sorted(results) == sorted([i + i for i in range(114514)])
```

Multithreading:

```py
import cpu_heater

def adder(x, y):
    return x + y

def test_cpu_heater():
    args_list = [(i, i) for i in range(114514)]
    results = cpu_heater.multithreads(adder, args_list, max_workers=8, show_progress=True)
    assert sorted(results) == sorted([i + i for i in range(114514)])
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cpu-heater",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "SunBK201 <sunbk201gm@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/57/ed/c88bade4c15805d0c277c7c8ca8b46d29e58824ce1232ab578fabd01855f/cpu_heater-0.1.0.tar.gz",
    "platform": null,
    "description": "# CPU-Heater\n\nA Python parallel computing library.\n\n## Install\n\n```py\npip install cpu-heater\n```\n\n## Usage\n\nMultiprocessing:\n\n```py\nimport cpu_heater\n\ndef adder(x, y):\n    return x + y\n\ndef test_cpu_heater():\n    args_list = [(i, i) for i in range(114514)]\n    results = cpu_heater.multiprocess(adder, args_list, max_workers=8, show_progress=True, timeout=5)\n    assert sorted(results) == sorted([i + i for i in range(114514)])\n```\n\nMultithreading:\n\n```py\nimport cpu_heater\n\ndef adder(x, y):\n    return x + y\n\ndef test_cpu_heater():\n    args_list = [(i, i) for i in range(114514)]\n    results = cpu_heater.multithreads(adder, args_list, max_workers=8, show_progress=True)\n    assert sorted(results) == sorted([i + i for i in range(114514)])\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python parallel computing library",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/SunBK201/cpu-heater",
        "Issues": "https://github.com/SunBK201/cpu-heater/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dcb52d00107317474be75894ac605b80897c2c5c0d0749b20c7636c23259afb3",
                "md5": "112dd6667fe0b5e55c4fb3601a2ede95",
                "sha256": "40c4aa198cbfede87dfa33b52c7569ad4b0a04ff3a6fc081373b13e6faaf26fb"
            },
            "downloads": -1,
            "filename": "cpu_heater-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "112dd6667fe0b5e55c4fb3601a2ede95",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 14888,
            "upload_time": "2024-09-10T12:33:29",
            "upload_time_iso_8601": "2024-09-10T12:33:29.271366Z",
            "url": "https://files.pythonhosted.org/packages/dc/b5/2d00107317474be75894ac605b80897c2c5c0d0749b20c7636c23259afb3/cpu_heater-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "57edc88bade4c15805d0c277c7c8ca8b46d29e58824ce1232ab578fabd01855f",
                "md5": "a00fa19e9202c3c73e11fb6a7848c98b",
                "sha256": "07d101bbde51dd21d7f13b4f572912e44d9c5ba1552989376287555126bfecce"
            },
            "downloads": -1,
            "filename": "cpu_heater-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a00fa19e9202c3c73e11fb6a7848c98b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 14785,
            "upload_time": "2024-09-10T12:33:30",
            "upload_time_iso_8601": "2024-09-10T12:33:30.584711Z",
            "url": "https://files.pythonhosted.org/packages/57/ed/c88bade4c15805d0c277c7c8ca8b46d29e58824ce1232ab578fabd01855f/cpu_heater-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-10 12:33:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "SunBK201",
    "github_project": "cpu-heater",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "cpu-heater"
}
        
Elapsed time: 0.31996s