| OLD | NEW |
| 1 import itertools | 1 import itertools |
| 2 | 2 |
| 3 from _init_environment import SetHostMTurkConnection | 3 from _init_environment import SetHostMTurkConnection |
| 4 | 4 |
| 5 def description_filter(substring): | 5 def description_filter(substring): |
| 6 return lambda hit: substring in hit.Title | 6 return lambda hit: substring in hit.Title |
| 7 | 7 |
| 8 def disable_hit(hit): | 8 def disable_hit(hit): |
| 9 return conn.disable_hit(hit.HITId) | 9 return conn.disable_hit(hit.HITId) |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 map(dispose_hit, hits_to_dispose) | 36 map(dispose_hit, hits_to_dispose) |
| 37 | 37 |
| 38 total_hits = len(all_hits) | 38 total_hits = len(all_hits) |
| 39 hits_processed = len(hits_to_process) | 39 hits_processed = len(hits_to_process) |
| 40 skipped = total_hits - hits_processed | 40 skipped = total_hits - hits_processed |
| 41 fmt = 'Processed: %(total_hits)d HITs, disabled/disposed: %(hits_process
ed)d, skipped: %(skipped)d' | 41 fmt = 'Processed: %(total_hits)d HITs, disabled/disposed: %(hits_process
ed)d, skipped: %(skipped)d' |
| 42 print fmt % vars() | 42 print fmt % vars() |
| 43 | 43 |
| 44 if __name__ == '__main__': | 44 if __name__ == '__main__': |
| 45 cleanup() | 45 cleanup() |
| OLD | NEW |