e08fcab00157590859a9a19bd483825e9ba75c18,bin/lib.py,,convert_pdf,#Any#,126

Before Change



def convert_pdf(f):
    args = ["pdf2txt.py", f]
    pipe = subprocess.Popen(
        args,
        stdout=subprocess.PIPE, stderr=subprocess.PIPE,
    )

    stdout, stderr = pipe.communicate()
    return stdout.decode("utf-8")


After Change


    pdf2text.main(args=[f, "--outfile", output_filepath])

    // Return contents of intermediate output file
    return open(output_filepath).read()



Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: bjherger/ResumeParser
Commit Name: e08fcab00157590859a9a19bd483825e9ba75c18
Time: 2019-03-29
Author: 13herger@gmail.com
File Name: bin/lib.py
Class Name:
Method Name: convert_pdf


Project Name: studioml/studio
Commit Name: 580a99bfb656a6f6b99133c9986252e619713fe1
Time: 2017-08-15
Author: peter.zhokhov@Peters-MBP.geneticfinance.com
File Name: studio/model.py
Class Name: FirebaseProvider
Method Name: _get_experiment_logtail


Project Name: MTG/freesound
Commit Name: 99a1522f89b93b12917087ae7ae7d910cf0c2cf1
Time: 2018-07-18
Author: phil.tgun@gmail.com
File Name: sounds/models.py
Class Name: Sound
Method Name: compute_crc