#NEWLINE# @ staticmethod #NEWLINE# def add_memory( data , starting_time , ending_time ) : #NEWLINE# #INDENT# conn = r . connect ( 'localhost' , 28015 ) #NEWLINE# r . db ( 'test' ) . table ( 'hearing_memory' ) . insert ( [ { #NEWLINE# #INDENT# 'starting_time' : starting_time . strftime ( '%Y-%m-%d %H:%M:%S.%f' ) , #NEWLINE# 'ending_time' : ending_time . strftime ( '%Y-%m-%d %H:%M:%S.%f' ) , #NEWLINE# 'data' : r . binary ( data ) , #NEWLINE# #UNINDENT# } ] ) . run ( conn ) #NEWLINE# r . db ( 'test' ) . table ( 'hearing_timestamps' ) . insert ( [ { #NEWLINE# #INDENT# 'starting_time' : starting_time . strftime ( '%Y-%m-%d %H:%M:%S.%f' ) , #NEWLINE# 'ending_time' : ending_time . strftime ( '%Y-%m-%d %H:%M:%S.%f' ) , #NEWLINE# #UNINDENT# } ] ) . run ( conn ) #NEWLINE# conn . close ( )