#NEWLINE# def analyze_email_invites( ) : #NEWLINE# #INDENT# invited = user_collection . find ( { #NEWLINE# #INDENT# 'unclaimed_records' : { #NEWLINE# #INDENT# '$ne' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# dates_invited = [ user [ 'date_registered' ] for user in invited ] #NEWLINE# if ( not dates_invited ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# fig = plot_dates ( dates_invited ) #NEWLINE# plt . title ( 'email invitations ({}) total)' . format ( len ( dates_invited ) ) ) #NEWLINE# plt . savefig ( os . path . join ( FIG_PATH , 'email-invites.png' ) ) #NEWLINE# plt . close ( )