b454cebbbe5abd2066ed231c34704ed4f85d4160,jarbas/core/management/commands/receipturls.py,Command,handle,#Command#,12
Before Change
fields = ("pk", "applicant_id", "year", "document_id")
documents = Document.objects.only(*fields).iterator()
for url, updated, error in map(self.update_url, documents):
progress["count"] += 1
if updated:
progress["updated"] += 1
if url:
progress["valid"] +=1
if error:
progress["errors"].append(error)
print(self.summary(**progress), end="\r")
print("\r\n")
print(self.summary(**progress))
print("==> Errors:")
for count, error in enumerate(progress["errors"]):
After Change
documents = Document.objects.only(*fields).iterator()
with Pool(processes=options["processes"]) as pool:
for url, updated, error in pool.imap(update_url, documents) :
self.update_progress(url, updated, error)
print(self.summary(), end="\r")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: okfn-brasil/serenata-de-amor
Commit Name: b454cebbbe5abd2066ed231c34704ed4f85d4160
Time: 2016-09-22
Author: cuducos@gmail.com
File Name: jarbas/core/management/commands/receipturls.py
Class Name: Command
Method Name: handle
Project Name: okfn-brasil/serenata-de-amor
Commit Name: cef99445ab551931fed507518b85034b97c946ee
Time: 2016-11-09
Author: cuducos@gmail.com
File Name: src/search_suspect_places.py
Class Name:
Method Name: search_suspicious_around_companies
Project Name: EpistasisLab/tpot
Commit Name: ef7718f02b743dbecfee08b9427a09e8b49a0fab
Time: 2017-02-22
Author: weixuanf@mail.med.upenn.edu
File Name: tpot/base.py
Class Name: TPOTBase
Method Name: _evaluate_individuals