688e56c09d028c0a956d1434ee16c60aea820de1,scripts/ina_speech_segmenter.py,,,#,37

Before Change


    warnings.simplefilter("ignore")
    
    for i, e in enumerate(input_files):
        print("processing file %d/%d: %s" % (i+1, len(input_files), e))
        base, _ = os.path.splitext(os.path.basename(e))
        seg2csv(seg(e), "%s/%s.csv" % (odir, base))

After Change


input_files = []
for e in args.input:
    if e.startswith("http"):
        input_files += [e]
    else:
        input_files += glob.glob(e)
assert len(input_files) > 0, "No existing media selected for analysis! Bad values provided to -i ({})".format(args.input)

odir = args.output_directory
assert os.access(odir, os.W_OK), "Directory %s is not writable!" % odir

// Do processings
from inaSpeechSegmenter import Segmenter, seg2csv, to_parse

// load neural network into memory, may last few seconds
seg = Segmenter()

// case of a file of files
files = to_parse(input_files)

with warnings.catch_warnings():
    warnings.simplefilter("ignore")
    //print("processing file %d/%d: %s" % (i+1, len(input_files), e))
    base = [os.path.splitext(os.path.basename(e)) for e in files]
    base = [base[i][0] for i in range(len(base))]
    if len(odir) > 0:
        fout = ["%s/%s.csv" % (odir, elem) for elem in base]
    seg2csv(seg(files), fout)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: ina-foss/inaSpeechSegmenter
Commit Name: 688e56c09d028c0a956d1434ee16c60aea820de1
Time: 2018-04-19
Author: eliottlechapt@yahoo.fr
File Name: scripts/ina_speech_segmenter.py
Class Name:
Method Name:


Project Name: kubeflow/kubeflow
Commit Name: 99c94d88c96c2b0a45bbbef4c8a126fa018ce513
Time: 2018-10-11
Author: 37601826+kunmingg@users.noreply.github.com
File Name: bootstrap/build.py
Class Name:
Method Name: main


Project Name: rasbt/mlxtend
Commit Name: c9e82bb1ab323d4a79793e47dbdd9204302e36af
Time: 2015-04-06
Author: se.raschka@me.com
File Name: mlxtend/file_io/find.py
Class Name:
Method Name: find_filegroups