circe/helpers.py
def yield_chunk_jitter(obj: Sequence, avg_len: int, jitter: float) -> Iterator:
    """ Yields slices of varying lengths on [length - jitter%, length + jitter%] from a sized iterable.

    This function is simply a front-end for yield_chunk_randrange to re-express the idea with a different API.

    Args:
        obj (sequence): An subscriptable object supporting __len__ and __getitem__ (list, tuple, string, bytes, etc.)
        avg_len (int): The desired average length of a data chunk / slice
        jitter (float): Desired variance in the length of a data chunk / slice expressed as a float / percentage
            Ex: if length is 1000 and jitter is 0.2, this function will yield slices between 800 and 1200 elements.

    Yields:
        Slices of varying length from the obj iterable
    """
    difference = int(avg_len * jitter)
    _min = avg_len - difference
    _max = avg_len + difference
    return yield_chunk_randrange(obj, _min, _max)
 Yields slices of varying lengths on [length - jitter%, length + jitter%] from a sized iterable.

    This function is simply a front-end for yield_chunk_randrange to re-express the idea with a different API.

    Args:
        obj (sequence): An subscriptable object supporting __len__ and __getitem__ (list, tuple, string, bytes, etc.)
        avg_len (int): The desired average length of a data chunk / slice
        jitter (float): Desired variance in the length of a data chunk / slice expressed as a float / percentage
            Ex: if length is 1000 and jitter is 0.2, this function will yield slices between 800 and 1200 elements.

    Yields:
        Slices of varying length from the obj iterable
    
Yields slices of varying lengths on [length - jitter%, length + jitter%] from a sized iterable.
This function is simply a front-end for yield_chunk_randrange to re-express the idea with a different API.
Yields slices of varying lengths on [ length - jitter% length + jitter% ] from a sized iterable . This function is simply a front - end for yield_chunk_randrange to re - express the idea with a different API .
def yield_chunk_jitter(obj: Sequence, avg_len: int, jitter: float) -> Iterator:
    difference = int(avg_len * jitter)
    _min = avg_len - difference
    _max = avg_len + difference
    return yield_chunk_randrange(obj, _min, _max)
def yield_chunk_jitter ( obj : Sequence , avg_len : int , jitter : float ) -> Iterator : difference = int ( avg_len * jitter ) _min = avg_len - difference _max = avg_len + difference return yield_chunk_randrange ( obj , _min , _max )
Yields slices of varying lengths on [length - jitter%, length + jitter%] from a sized iterable.
Yields slices of varying lengths on [ length - jitter% length + jitter% ] from a sized iterable .
""" Yields slices of varying lengths on [length - jitter%, length + jitter%] from a sized iterable.

    This function is simply a front-end for yield_chunk_randrange to re-express the idea with a different API.

    Args:
        obj (sequence): An subscriptable object supporting __len__ and __getitem__ (list, tuple, string, bytes, etc.)
        avg_len (int): The desired average length of a data chunk / slice
        jitter (float): Desired variance in the length of a data chunk / slice expressed as a float / percentage
            Ex: if length is 1000 and jitter is 0.2, this function will yield slices between 800 and 1200 elements.

    Yields:
        Slices of varying length from the obj iterable
    """
Slices of varying length from the obj iterable
Slices of varying length from the obj iterable
obj
Sequence
An subscriptable object supporting __len__ and __getitem__ (list, tuple, string, bytes, etc.)
An subscriptable object supporting __len__ and __getitem__ ( list tuple string bytes etc . )
avg_len
int
The desired average length of a data chunk / slice
The desired average length of a data chunk / slice
jitter
float
Desired variance in the length of a data chunk / slice expressed as a float / percentage
Ex: if length is 1000 and jitter is 0.2, this function will yield slices between 800 and 1200 elements.
Desired variance in the length of a data chunk / slice expressed as a float / percentage Ex : if length is 1000 and jitter is 0 . 2 this function will yield slices between 800 and 1200 elements .