Skip to main content

classy.utils.commons

Functions​

add_noise_to_value​

def add_noise_to_value(
    value: int,
    noise_param: float,
)

chunks​

def chunks(
    lst,
    n,
)

Yield successive n-sized chunks from lst.

execute_bash_command​

def execute_bash_command(
    command: str,
) ‑> Optional[str]

flatten​

def flatten(
    lst: Iterable[list],
) ‑> list

get_local_ip_address​

def get_local_ip_address() ‑> str

grouper​

def grouper(
    iterable,
    n,
)

split_by_first​

def split_by_first(
    text: str,
    split: str,
) ‑> Tuple[str, str]