#NEWLINE# def analyze_email_confirmations( ) : #NEWLINE# #INDENT# confirmed = user_collection . find ( { #NEWLINE# #INDENT# 'unclaimed_records' : { #NEWLINE# #INDENT# '$ne' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# 'is_claimed' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# dates_confirmed = [ user [ 'date_confirmed' ] for user in dates_confirmed ] #NEWLINE# if ( not dates_confirmed ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# fig = plot_dates ( dates_confirmed ) #NEWLINE# plt . title ( 'confirmed email invitations ({}) total)' . format ( len ( dates_confirmed ) ) ) #NEWLINE# plt . savefig ( os . path . join ( FIG_PATH , 'email-invite-confirmations.png' ) ) #NEWLINE# plt . close ( )