c585a9779e5d8ae0b0b148792f8a7f8cecf73532,tools/make_examples.py,,run_script,#,141

Before Change


def run_script():
    namespace = {}
    t1 = time()
    exec(open(script).read(), namespace)
    t2 = time()
    print("That took %.2f seconds to run" % (t2 - t1))
    plt.close("all")
    del namespace

After Change


def run_script():
    namespace = {}
    t1 = time()
    with io.open(script, encoding="utf8") as f:
        exec(f.read(), namespace)
    t2 = time()
    print("That took %.2f seconds to run" % (t2 - t1))
    plt.close("all")
    del namespace
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: nipy/dipy
Commit Name: c585a9779e5d8ae0b0b148792f8a7f8cecf73532
Time: 2019-02-12
Author: skab12@gmail.com
File Name: tools/make_examples.py
Class Name:
Method Name: run_script


Project Name: RasaHQ/rasa
Commit Name: a75820dd72bf9bcc24df894ec87c45a559f0138f
Time: 2019-01-27
Author: tom@rasa.com
File Name: setup.py
Class Name:
Method Name:


Project Name: yzhao062/pyod
Commit Name: 71f60ac1afd5942e0981fc98cd3e534c3dc24a78
Time: 2018-11-26
Author: yuezhao@cs.toronto.edu
File Name: setup.py
Class Name:
Method Name: