A Python parallel computing library
Project description
CPU-Heater
A Python parallel computing library.
Install
pip install cpu-heater
Usage
Multiprocessing:
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=10,
desc="test",
not_none=True,
extend_mode=False,
)
assert sorted(results) == sorted([i + i for i in range(114514)])
Multithreading:
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,
desc="test",
not_none=True,
extend_mode=False,
)
assert sorted(results) == sorted([i + i for i in range(114514)])
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cpu_heater-0.2.1.tar.gz.
File metadata
- Download URL: cpu_heater-0.2.1.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4dc4ff909e946e04272a825d9488deb1c07c1b88bac9982e615513575f8b0033
|
|
| MD5 |
5ec107a1a5e41873df1ec0982e2b18bb
|
|
| BLAKE2b-256 |
7395fe40c54d274b04d016bf486b9f2a806529342f26e60cd9307cf3b294a1d1
|
Provenance
The following attestation bundles were made for cpu_heater-0.2.1.tar.gz:
Publisher:
python-publish.yml on SunBK201/cpu-heater
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cpu_heater-0.2.1.tar.gz -
Subject digest:
4dc4ff909e946e04272a825d9488deb1c07c1b88bac9982e615513575f8b0033 - Sigstore transparency entry: 286556452
- Sigstore integration time:
-
Permalink:
SunBK201/cpu-heater@a6143e525278f1099dcfea0ed8feb0320759d180 -
Branch / Tag:
refs/tags/0.2.1 - Owner: https://github.com/SunBK201
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@a6143e525278f1099dcfea0ed8feb0320759d180 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cpu_heater-0.2.1-py3-none-any.whl.
File metadata
- Download URL: cpu_heater-0.2.1-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c7195e2d72c2a7ed45195808b288a7c33b6d776663961830451a3775768e21f
|
|
| MD5 |
32e1eeac8a1c6a7c5be51429df46f8f5
|
|
| BLAKE2b-256 |
519571265d594298d0d49e296c83a3285a9368eb8fab2fa8f50eaa76ea898ac2
|
Provenance
The following attestation bundles were made for cpu_heater-0.2.1-py3-none-any.whl:
Publisher:
python-publish.yml on SunBK201/cpu-heater
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cpu_heater-0.2.1-py3-none-any.whl -
Subject digest:
9c7195e2d72c2a7ed45195808b288a7c33b6d776663961830451a3775768e21f - Sigstore transparency entry: 286556495
- Sigstore integration time:
-
Permalink:
SunBK201/cpu-heater@a6143e525278f1099dcfea0ed8feb0320759d180 -
Branch / Tag:
refs/tags/0.2.1 - Owner: https://github.com/SunBK201
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@a6143e525278f1099dcfea0ed8feb0320759d180 -
Trigger Event:
push
-
Statement type: