INNER CODE UNIT · Python

_clear_rotation_signal

lebinh/ngxtop · ngxtop/ngxtop.py:240

def _clear_rotation_signal():
    """Clear the rotation request flag."""
    global _rotation_requested
    _rotation_requested = False


def map_field(field, func, dict_sequence):
    """
    Apply given function to value of given key in every dictionary in sequence and
    set the result as new value for that key.
    """
    for item in dict_sequence:
        try:
            item[field] = func(item.get(field, None))
            yield item
        except ValueError:
            pass

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…