00e131977b4e2cbe134f8832f3fbac7940644586,beginner_source/hybrid_frontend/introduction_to_hybrid_frontend_tutorial.py,,,#,185

Before Change


filename = os.path.join("data", url.split("/")[-1])

// Download file if it doesn"t already exist
if not os.path.exists(filename):
    os.makedirs("data")
    print("Downloading...")
    wget.download(url, filename)
    print("Download complete!")
else:
    print("File exists, skipping download.")

// Print 10 random lines
with open(filename, "r") as datafile:
    lines = datafile.readlines()
    // Last line in file is empty, we"ll deal with this later
    lines = lines[:-1]

After Change


filename = "data/iris.data"

// Print 10 random lines
try:
    datafile = open(filename, "r")
except IOError:
    print("Cannot open data file: {}. Have you downloaded it yet?".format(filename))
    exit()
lines = datafile.readlines()
// Last line in file is empty, we"ll deal with this later
lines = lines[:-1]
random.shuffle(lines)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: pytorch/tutorials
Commit Name: 00e131977b4e2cbe134f8832f3fbac7940644586
Time: 2018-08-29
Author: minkawhich@fb.com
File Name: beginner_source/hybrid_frontend/introduction_to_hybrid_frontend_tutorial.py
Class Name:
Method Name:


Project Name: idaholab/raven
Commit Name: f40a8edd60e4d5f3f47e83af4013e0efddf56ebf
Time: 2019-10-18
Author: Jia.Zhou@inl.gov
File Name: framework/CodeInterfaces/RAVEN/RAVENparser.py
Class Name: RAVENparser
Method Name: copySlaveFiles


Project Name: NifTK/NiftyNet
Commit Name: d67181e84370f11479e2872271cae56cc2f3b8b3
Time: 2017-08-22
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/application_driver.py
Class Name: ApplicationDriver
Method Name: _summary_dir