scatcluster.helper¶
ScatCluster Helper
Attributes¶
Functions¶
Check if the GPU is available. |
|
|
Rounds a number x to the nearest multiple of a. |
|
A function to check if the code is running in a Jupyter notebook or IPython terminal. |
A function that imports the tqdm module based on the current environment. |
|
|
Normalize signal with median absolute deviation. |
Generates all possible strings of uppercase letters of increasing length. |
|
|
Generates a list of strings of length 'number_letters' using itertools.islice and iter_all_strings. |
Module Contents¶
- scatcluster.helper.is_notebook() bool[source]¶
A function to check if the code is running in a Jupyter notebook or IPython terminal.
- Returns:
True if running in a Jupyter notebook or qtconsole, False otherwise.
- Return type:
- scatcluster.helper.tqdm_importer()[source]¶
A function that imports the tqdm module based on the current environment.
- scatcluster.helper.demad(x, factor=10.0)[source]¶
Normalize signal with median absolute deviation.
- Parameters:
x (np.ndarray) – The input signal.
factor (float, optional) – An additional normalization factor.
- Return type:
The data normalized with median absolute deviation.
- scatcluster.helper.COLORS = ['0.8', '#222222', '#F3C300', '#875692', '#F38400', '#A1CAF1', '#BE0032', '#C2B280', '#848482',...[source]¶
- scatcluster.helper.iter_all_strings()[source]¶
Generates all possible strings of uppercase letters of increasing length.
- Returns:
A generator that yields all possible strings.