deepaugment/lib/decorators.py
def timer(func):
        """Decorator prints running time of the function it decorates.
        """
        import time

        @wraps(func)
        def wrapper(*args, **kwargs):
            t1 = time.time()
            result = func(*args, **kwargs)
            t2 = time.time()
            print(
                "{}()'s runtime:  {} sec.".format(func.__name__, np.round((t2 - t1), 4))
            )
            return result

        return wrapper
Decorator prints running time of the function it decorates.
        
Decorator prints running time of the function it decorates.
Decorator prints running time of the function it decorates .
def timer(func):
        import time
        @wraps(func)
        def wrapper(*args, **kwargs):
            t1 = time.time()
            result = func(*args, **kwargs)
            t2 = time.time()
            print(
                "{}()'s runtime:  {} sec.".format(func.__name__, np.round((t2 - t1), 4))
            )
            return result
        return wrapper
def timer ( func ) : import time @ wraps ( func ) def wrapper ( * args , ** kwargs ) : t1 = time . time ( ) result = func ( * args , ** kwargs ) t2 = time . time ( ) print ( "{}()'s runtime:  {} sec." . format ( func . __name__ , np . round ( ( t2 - t1 ) , 4 ) ) ) return result return wrapper
Decorator prints running time of the function it decorates.
Decorator prints running time of the function it decorates .
"""Decorator prints running time of the function it decorates.
        """
func