cef99445ab551931fed507518b85034b97c946ee,src/search_suspect_places.py,,search_suspicious_around_companies,#Any#,130

Before Change


    with futures.ThreadPoolExecutor(max_workers=40) as executor:
        future_to_search_suspicious = dict()
        for index, company in companies.iterrows():
            future = executor.submit(search_suspicious_around_company, company)
            future_to_search_suspicious[future] = company
        for future in futures.as_completed(future_to_search_suspects):
            company = future_to_search_suspicious[future]
            if future.exception() is not None:
                warn("{} raised an exception: {}".format(company["cnpj"],
                                                      future.exception()))
            elif future.result() is not None:

After Change


    total = len(rows)
    count = 0
    with Pool(processes=4) as pool:
        for company in pool.imap(search_suspicious_around_company, rows):
            count += 1
            print_status(total, count)
            if company:
                write_csv(company)


def search_suspicious_around_company(company):
    
    :param company: (dict)
    :return: suspect
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


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: Qiskit/qiskit-aqua
Commit Name: 3810857dbc914921127a3f7ca5e3fd9a4f48a147
Time: 2020-10-13
Author: Manoel.Marques@ibm.com
File Name: qiskit/aqua/utils/run_circuits.py
Class Name:
Method Name: run_on_backend


Project Name: okfn-brasil/serenata-de-amor
Commit Name: e1d39a4c9158c9a9db1218cb5be9946152e2ca1b
Time: 2017-04-14
Author: marcus.rehm@gmail.com
File Name: src/fetch_cnpj_info.py
Class Name:
Method Name: