if not vb: print "SWAP: only reporting minimal stdout" one_by_one = tonights.parameters['one_by_one'] report = tonights.parameters['report'] if report: print "SWAP: will make plots and write report at the end" else: print "SWAP: postponing reporting until the last minute" # From when shall we take classifications to analyze? if tonights.parameters['start'] == 'the_beginning': t1 = datetime.datetime(1978, 2, 28, 12, 0, 0, 0) elif tonights.parameters['start'] == 'dont_bother': print "SWAP: looks like there is nothing more to do!" swap.set_cookie(False) print swap.doubledashedline return else: t1 = datetime.datetime.strptime(tonights.parameters['start'], '%Y-%m-%d_%H:%M:%S') print "SWAP: updating all subjects classified between "+tonights.parameters['start'] # When will we stop considering classifications? if tonights.parameters['end'] == 'the_end_of_time': t2 = datetime.datetime(2100, 1, 1, 12, 0, 0, 0) else: t2 = datetime.datetime.strptime(tonights.parameters['end'], '%Y-%m-%d_%H:%M:%S') print "SWAP: and "+tonights.parameters['end'] # How many classifications do we look at per batch? try: N_per_batch = tonights.parameters['N_per_batch']
one_by_one = tonights.parameters['one_by_one'] report = tonights.parameters['report'] plots = tonights.parameters['plot'] if report: print "SWAP: will write a report at the end" else: print "SWAP: postponing reporting until the last minute" # From when shall we take classifications to analyze? if tonights.parameters['start'] == 'the_beginning': t1 = datetime.datetime(1978, 2, 28, 12, 0, 0, 0) elif (tonights.parameters['start'] == 'dont_bother') or \ (tonights.parameters['start'] == tonights.parameters['end']): print "SWAP: looks like there is nothing more to do!" swap.set_cookie(False, cookie_name=survey) print swap.doubledashedline return else: t1 = datetime.datetime.strptime(tonights.parameters['start'], '%Y-%m-%d_%H:%M:%S') print "SWAP: updating all subjects classified between "+\ tonights.parameters['start'] # When will we stop considering classifications? if tonights.parameters['end'] == 'the_end_of_time': tstop = datetime.datetime(2100, 1, 1, 12, 0, 0, 0) else: tstop = datetime.datetime.strptime(tonights.parameters['end'], '%Y-%m-%d_%H:%M:%S') print "SWAP: and "+tonights.parameters['end']
if not vb: print "SWAP: only reporting minimal stdout" one_by_one = tonights.parameters['one_by_one'] report = tonights.parameters['report'] if report: print "SWAP: will make plots and write report at the end" else: print "SWAP: postponing reporting until the last minute" # From when shall we take classifications to analyze? if tonights.parameters['start'] == 'the_beginning': t1 = datetime.datetime(1978, 2, 28, 12, 0, 0, 0) elif tonights.parameters['start'] == 'dont_bother': print "SWAP: looks like there is nothing more to do!" swap.set_cookie(False) print swap.doubledashedline return else: t1 = datetime.datetime.strptime(tonights.parameters['start'], '%Y-%m-%d_%H:%M:%S') print "SWAP: updating all subjects classified between " + tonights.parameters[ 'start'] # When will we stop considering classifications? if tonights.parameters['end'] == 'the_end_of_time': t2 = datetime.datetime(2100, 1, 1, 12, 0, 0, 0) else: t2 = datetime.datetime.strptime(tonights.parameters['end'], '%Y-%m-%d_%H:%M:%S') print "SWAP: and " + tonights.parameters['end']
one_by_one = tonights.parameters['one_by_one'] report = tonights.parameters['report'] plots = tonights.parameters['plot'] if report: print "SWAP: will write a report at the end" else: print "SWAP: postponing reporting until the last minute" # From when shall we take classifications to analyze? if tonights.parameters['start'] == 'the_beginning': t1 = datetime.datetime(1978, 2, 28, 12, 0, 0, 0) elif (tonights.parameters['start'] == 'dont_bother') or \ (tonights.parameters['start'] == tonights.parameters['end']): print "SWAP: looks like there is nothing more to do!" swap.set_cookie(False,cookie_name=survey) print swap.doubledashedline return else: t1 = datetime.datetime.strptime(tonights.parameters['start'], '%Y-%m-%d_%H:%M:%S') print "SWAP: updating all subjects classified between "+\ tonights.parameters['start'] # When will we stop considering classifications? if tonights.parameters['end'] == 'the_end_of_time': tstop = datetime.datetime(2100, 1, 1, 12, 0, 0, 0) else: tstop = datetime.datetime.strptime(tonights.parameters['end'], '%Y-%m-%d_%H:%M:%S') print "SWAP: and "+tonights.parameters['end']