stouputils 1.9.5__tar.gz → 1.9.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {stouputils-1.9.5 → stouputils-1.9.6}/PKG-INFO +1 -1
- {stouputils-1.9.5 → stouputils-1.9.6}/pyproject.toml +1 -1
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/parallel.py +12 -4
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/parallel.pyi +6 -4
- {stouputils-1.9.5 → stouputils-1.9.6}/.gitignore +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/LICENSE +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/README.md +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/__init__.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/__init__.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/__main__.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/_deprecated.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/_deprecated.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/all_doctests.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/all_doctests.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/applications/__init__.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/applications/__init__.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/applications/automatic_docs.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/applications/automatic_docs.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/applications/upscaler/__init__.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/applications/upscaler/__init__.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/applications/upscaler/config.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/applications/upscaler/config.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/applications/upscaler/image.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/applications/upscaler/image.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/applications/upscaler/video.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/applications/upscaler/video.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/archive.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/archive.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/backup.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/backup.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/collections.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/collections.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/continuous_delivery/__init__.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/continuous_delivery/__init__.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/continuous_delivery/cd_utils.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/continuous_delivery/cd_utils.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/continuous_delivery/github.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/continuous_delivery/github.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/continuous_delivery/pypi.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/continuous_delivery/pypi.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/continuous_delivery/pyproject.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/continuous_delivery/pyproject.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/continuous_delivery/stubs.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/continuous_delivery/stubs.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/ctx.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/ctx.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/config/get.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/config/set.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/__init__.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/auto_contrast.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/axis_flip.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/bias_field_correction.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/binary_threshold.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/blur.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/brightness.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/canny.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/clahe.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/common.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/contrast.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/curvature_flow_filter.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/denoise.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/histogram_equalization.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/invert.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/laplacian.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/median_blur.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/noise.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/normalize.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/random_erase.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/resize.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/rotation.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/salt_pepper.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/sharpening.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/shearing.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/threshold.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/translation.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/zoom.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image_augmentation.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image_preprocess.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/prosthesis_detection.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/technique.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/dataset/__init__.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/dataset/dataset.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/dataset/dataset_loader.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/dataset/grouping_strategy.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/dataset/image_loader.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/dataset/xy_tuple.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/metric_dictionnary.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/metric_utils.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/mlflow_utils.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/abstract_model.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/all.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/base_keras.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras/all.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras/convnext.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras/densenet.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras/efficientnet.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras/mobilenet.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras/resnet.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras/squeezenet.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras/vgg.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras/xception.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras_utils/callbacks/__init__.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras_utils/callbacks/colored_progress_bar.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras_utils/callbacks/learning_rate_finder.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras_utils/callbacks/model_checkpoint_v2.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras_utils/callbacks/progressive_unfreezing.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras_utils/callbacks/warmup_scheduler.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras_utils/losses/__init__.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras_utils/losses/next_generation_loss.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras_utils/visualizations.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/model_interface.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/sandbox.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/range_tuple.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/scripts/augment_dataset.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/scripts/exhaustive_process.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/scripts/preprocess_dataset.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/scripts/routine.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/utils.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/decorators.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/decorators.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/image.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/image.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/installer/__init__.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/installer/__init__.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/installer/common.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/installer/common.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/installer/downloader.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/installer/downloader.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/installer/linux.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/installer/linux.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/installer/main.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/installer/main.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/installer/windows.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/installer/windows.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/io.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/io.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/print.py +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/print.pyi +0 -0
- {stouputils-1.9.5 → stouputils-1.9.6}/stouputils/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stouputils
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.6
|
|
4
4
|
Summary: Stouputils is a collection of utility modules designed to simplify and enhance the development process. It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers, and many more.
|
|
5
5
|
Project-URL: Homepage, https://github.com/Stoupy51/stouputils
|
|
6
6
|
Project-URL: Issues, https://github.com/Stoupy51/stouputils/issues
|
|
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "stouputils"
|
|
8
|
-
version = "1.9.
|
|
8
|
+
version = "1.9.6"
|
|
9
9
|
description = "Stouputils is a collection of utility modules designed to simplify and enhance the development process. It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers, and many more."
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
requires-python = ">=3.10"
|
|
@@ -40,7 +40,7 @@ def multiprocessing(
|
|
|
40
40
|
use_starmap: bool = False,
|
|
41
41
|
chunksize: int = 1,
|
|
42
42
|
desc: str = "",
|
|
43
|
-
max_workers: int = CPU_COUNT,
|
|
43
|
+
max_workers: int | float = CPU_COUNT,
|
|
44
44
|
delay_first_calls: float = 0,
|
|
45
45
|
color: str = MAGENTA,
|
|
46
46
|
bar_format: str = BAR_FORMAT,
|
|
@@ -61,7 +61,8 @@ def multiprocessing(
|
|
|
61
61
|
(Defaults to 1 for proper progress bar display)
|
|
62
62
|
desc (str): Description displayed in the progress bar
|
|
63
63
|
(if not provided no progress bar will be displayed)
|
|
64
|
-
max_workers (int):
|
|
64
|
+
max_workers (int | float): Number of workers to use (Defaults to CPU_COUNT), -1 means CPU_COUNT.
|
|
65
|
+
If float between 0 and 1, it's treated as a percentage of CPU_COUNT.
|
|
65
66
|
delay_first_calls (float): Apply i*delay_first_calls seconds delay to the first "max_workers" calls.
|
|
66
67
|
For instance, the first process will be delayed by 0 seconds, the second by 1 second, etc.
|
|
67
68
|
(Defaults to 0): This can be useful to avoid functions being called in the same second.
|
|
@@ -109,6 +110,9 @@ def multiprocessing(
|
|
|
109
110
|
# Handle parameters
|
|
110
111
|
if max_workers == -1:
|
|
111
112
|
max_workers = CPU_COUNT
|
|
113
|
+
if isinstance(max_workers, float):
|
|
114
|
+
assert 0 < max_workers <= 1, "max_workers as float must be between 0 and 1 (percentage)"
|
|
115
|
+
max_workers = int(max_workers * CPU_COUNT)
|
|
112
116
|
verbose: bool = desc != ""
|
|
113
117
|
desc, func, args = _handle_parameters(func, args, use_starmap, delay_first_calls, max_workers, desc, color)
|
|
114
118
|
if bar_format == BAR_FORMAT:
|
|
@@ -148,7 +152,7 @@ def multithreading(
|
|
|
148
152
|
args: list[T],
|
|
149
153
|
use_starmap: bool = False,
|
|
150
154
|
desc: str = "",
|
|
151
|
-
max_workers: int = CPU_COUNT,
|
|
155
|
+
max_workers: int | float = CPU_COUNT,
|
|
152
156
|
delay_first_calls: float = 0,
|
|
153
157
|
color: str = MAGENTA,
|
|
154
158
|
bar_format: str = BAR_FORMAT,
|
|
@@ -167,7 +171,8 @@ def multithreading(
|
|
|
167
171
|
True means the function will be called like func(\*args[i]) instead of func(args[i])
|
|
168
172
|
desc (str): Description displayed in the progress bar
|
|
169
173
|
(if not provided no progress bar will be displayed)
|
|
170
|
-
max_workers (int):
|
|
174
|
+
max_workers (int | float): Number of workers to use (Defaults to CPU_COUNT), -1 means CPU_COUNT.
|
|
175
|
+
If float between 0 and 1, it's treated as a percentage of CPU_COUNT.
|
|
171
176
|
delay_first_calls (float): Apply i*delay_first_calls seconds delay to the first "max_workers" calls.
|
|
172
177
|
For instance with value to 1, the first thread will be delayed by 0 seconds, the second by 1 second, etc.
|
|
173
178
|
(Defaults to 0): This can be useful to avoid functions being called in the same second.
|
|
@@ -213,6 +218,9 @@ def multithreading(
|
|
|
213
218
|
# Handle parameters
|
|
214
219
|
if max_workers == -1:
|
|
215
220
|
max_workers = CPU_COUNT
|
|
221
|
+
if isinstance(max_workers, float):
|
|
222
|
+
assert 0 < max_workers <= 1, "max_workers as float must be between 0 and 1 (percentage)"
|
|
223
|
+
max_workers = int(max_workers * CPU_COUNT)
|
|
216
224
|
verbose: bool = desc != ""
|
|
217
225
|
desc, func, args = _handle_parameters(func, args, use_starmap, delay_first_calls, max_workers, desc, color)
|
|
218
226
|
if bar_format == BAR_FORMAT:
|
|
@@ -10,7 +10,7 @@ CPU_COUNT: int
|
|
|
10
10
|
T = TypeVar('T')
|
|
11
11
|
R = TypeVar('R')
|
|
12
12
|
|
|
13
|
-
def multiprocessing(func: Callable[..., R] | list[Callable[..., R]], args: list[T], use_starmap: bool = False, chunksize: int = 1, desc: str = '', max_workers: int = ..., delay_first_calls: float = 0, color: str = ..., bar_format: str = ..., ascii: bool = False) -> list[R]:
|
|
13
|
+
def multiprocessing(func: Callable[..., R] | list[Callable[..., R]], args: list[T], use_starmap: bool = False, chunksize: int = 1, desc: str = '', max_workers: int | float = ..., delay_first_calls: float = 0, color: str = ..., bar_format: str = ..., ascii: bool = False) -> list[R]:
|
|
14
14
|
''' Method to execute a function in parallel using multiprocessing
|
|
15
15
|
|
|
16
16
|
\t- For CPU-bound operations where the GIL (Global Interpreter Lock) is a bottleneck.
|
|
@@ -26,7 +26,8 @@ def multiprocessing(func: Callable[..., R] | list[Callable[..., R]], args: list[
|
|
|
26
26
|
\t\t\t(Defaults to 1 for proper progress bar display)
|
|
27
27
|
\t\tdesc\t\t\t\t(str):\t\t\t\tDescription displayed in the progress bar
|
|
28
28
|
\t\t\t(if not provided no progress bar will be displayed)
|
|
29
|
-
\t\tmax_workers\t\t\t(int):\t\
|
|
29
|
+
\t\tmax_workers\t\t\t(int | float):\t\tNumber of workers to use (Defaults to CPU_COUNT), -1 means CPU_COUNT.
|
|
30
|
+
\t\t\tIf float between 0 and 1, it\'s treated as a percentage of CPU_COUNT.
|
|
30
31
|
\t\tdelay_first_calls\t(float):\t\t\tApply i*delay_first_calls seconds delay to the first "max_workers" calls.
|
|
31
32
|
\t\t\tFor instance, the first process will be delayed by 0 seconds, the second by 1 second, etc.
|
|
32
33
|
\t\t\t(Defaults to 0): This can be useful to avoid functions being called in the same second.
|
|
@@ -64,7 +65,7 @@ def multiprocessing(func: Callable[..., R] | list[Callable[..., R]], args: list[
|
|
|
64
65
|
\t\t\t. )
|
|
65
66
|
\t\t\t[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
66
67
|
\t'''
|
|
67
|
-
def multithreading(func: Callable[..., R] | list[Callable[..., R]], args: list[T], use_starmap: bool = False, desc: str = '', max_workers: int = ..., delay_first_calls: float = 0, color: str = ..., bar_format: str = ..., ascii: bool = False) -> list[R]:
|
|
68
|
+
def multithreading(func: Callable[..., R] | list[Callable[..., R]], args: list[T], use_starmap: bool = False, desc: str = '', max_workers: int | float = ..., delay_first_calls: float = 0, color: str = ..., bar_format: str = ..., ascii: bool = False) -> list[R]:
|
|
68
69
|
''' Method to execute a function in parallel using multithreading, you should use it:
|
|
69
70
|
|
|
70
71
|
\t- For I/O-bound operations where the GIL is not a bottleneck, such as network requests or disk operations.
|
|
@@ -78,7 +79,8 @@ def multithreading(func: Callable[..., R] | list[Callable[..., R]], args: list[T
|
|
|
78
79
|
\t\t\tTrue means the function will be called like func(\\*args[i]) instead of func(args[i])
|
|
79
80
|
\t\tdesc\t\t\t\t(str):\t\t\t\tDescription displayed in the progress bar
|
|
80
81
|
\t\t\t(if not provided no progress bar will be displayed)
|
|
81
|
-
\t\tmax_workers\t\t\t(int):\t\
|
|
82
|
+
\t\tmax_workers\t\t\t(int | float):\t\tNumber of workers to use (Defaults to CPU_COUNT), -1 means CPU_COUNT.
|
|
83
|
+
\t\t\tIf float between 0 and 1, it\'s treated as a percentage of CPU_COUNT.
|
|
82
84
|
\t\tdelay_first_calls\t(float):\t\t\tApply i*delay_first_calls seconds delay to the first "max_workers" calls.
|
|
83
85
|
\t\t\tFor instance with value to 1, the first thread will be delayed by 0 seconds, the second by 1 second, etc.
|
|
84
86
|
\t\t\t(Defaults to 0): This can be useful to avoid functions being called in the same second.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/__init__.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/auto_contrast.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/axis_flip.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/brightness.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/canny.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/clahe.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/common.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/contrast.py
RENAMED
|
File without changes
|
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/denoise.py
RENAMED
|
File without changes
|
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/invert.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/laplacian.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/median_blur.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/noise.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/normalize.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/random_erase.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/resize.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/rotation.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/salt_pepper.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/sharpening.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/shearing.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/threshold.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image/translation.py
RENAMED
|
File without changes
|
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image_augmentation.py
RENAMED
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/data_processing/image_preprocess.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras_utils/losses/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{stouputils-1.9.5 → stouputils-1.9.6}/stouputils/data_science/models/keras_utils/visualizations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|