#NEWLINE# def __init__( self , time_period , tick_interval ) : #NEWLINE# #INDENT# '\n        time_unit is the period of time on which the moving average is computed,\n        expressed in minutes\n        ' #NEWLINE# self . time_period = time_period #NEWLINE# self . tick_interval = tick_interval #NEWLINE# self . rate = 0.0 #NEWLINE# self . value = 0 #NEWLINE# self . initialized = False #NEWLINE# self . alpha = self . compute_alpha ( tick_interval , tick_interval ) #NEWLINE# self . lock = threading . Lock ( )