96416b889c76f3b6d15af0e3dfd0d4cb2b8b2d23,examples/paillier_logistic_regression.py,,download_data,#,40

Before Change


        // Second folder -> test set
        print("Downloading 2/2:", url2)
        with urlopen(url2) as remotedata:
            with open(foldertar, "wb") as tar:
                tar.write(remotedata.read())

        with tarfile.open(foldertar) as tar:

After Change



    n_datasets = 2

    for d in range(1, n_datasets):
        if not os.path.isdir("examples/enron%d" % d):

            print("Downloading %d/%d:" % (d, n_datasets), url1)
            foldertar = "examples/emails.tar.gz"

            with urlopen(url1) as remotedata:
                with open(foldertar, "wb") as tar:
                    tar.write(remotedata.read())

            with tarfile.open(foldertar) as tar:
                tar.extractall("examples/")
            os.remove(foldertar)


def preprocess_data():
    
    Get the Enron emails from disk.
    Represent them as bag-of-words.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: data61/python-paillier
Commit Name: 96416b889c76f3b6d15af0e3dfd0d4cb2b8b2d23
Time: 2017-06-15
Author: giorgio.patrini@anu.edu.au
File Name: examples/paillier_logistic_regression.py
Class Name:
Method Name: download_data


Project Name: kubeflow/kubeflow
Commit Name: d5caf230ff50260c1a6565db35edeeddd5d407e6
Time: 2018-02-08
Author: mitake.hitoshi@gmail.com
File Name: build/boilerplate/boilerplate.py
Class Name:
Method Name: get_refs


Project Name: dmlc/gluon-cv
Commit Name: 4b8716fd4bd6f462a9db9eee958f2508576ec019
Time: 2018-06-15
Author: cheungchih@gmail.com
File Name: gluoncv/utils/metrics/coco_detection.py
Class Name: COCODetectionMetric
Method Name: __init__