#NEWLINE# def make_ois( self , count = 1000 ) : #NEWLINE# #INDENT# incidents = [ ] #NEWLINE# for x in range ( 0 , count ) : #NEWLINE# #INDENT# assignment = self . generate_assignment ( ) #NEWLINE# incidents . append ( { #NEWLINE# #INDENT# 'opaqueId' : self . hash ( random_string ( 10 ) ) , #NEWLINE# 'serviceType' : self . generate_service_type ( ) , #NEWLINE# 'occuredDate' : random_date ( datetime ( 2014 , 1 , 1 ) , datetime ( 2016 , 1 , 1 ) ) . strftime ( '%Y-%m-%d 0:0:00' ) , #NEWLINE# 'occuredTime' : '' , #NEWLINE# 'division' : assignment [ 'division' ] , #NEWLINE# 'precinct' : assignment [ 'precinct' ] , #NEWLINE# 'shift' : assignment [ 'shift' ] , #NEWLINE# 'beat' : assignment [ 'beat' ] , #NEWLINE# 'disposition' : self . generate_disposition ( ) , #NEWLINE# 'residentRace' : self . generate_race ( ) , #NEWLINE# 'residentSex' : self . generate_sex ( ) , #NEWLINE# 'residentAge' : str ( random . randint ( 15 , 70 ) ) , #NEWLINE# 'residentWeaponUsed' : self . generate_ois_resident_force_type ( ) , #NEWLINE# 'residentCondition' : self . generate_condition ( ) , #NEWLINE# 'officerIdentifier' : self . hash ( random_string ( 10 ) ) , #NEWLINE# 'officerForceType' : self . generate_ois_officer_force_type ( ) , #NEWLINE# 'officerRace' : self . generate_race ( ) , #NEWLINE# 'officerSex' : self . generate_sex ( ) , #NEWLINE# 'officerAge' : str ( random . randint ( 23 , 50 ) ) , #NEWLINE# 'officerYearsOfService' : random . randint ( 0 , 27 ) , #NEWLINE# 'officerCondition' : self . generate_condition ( ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# return incidents