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

Before Change


    
    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: 9

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: PIQuIL/QuCumber
Commit Name: d8e36306e055a69328b67372615b1e05abb298c2
Time: 2019-07-11
Author: emerali@users.noreply.github.com
File Name: qucumber/utils/training_statistics.py
Class Name:
Method Name: rotate_psi


Project Name: scikit-optimize/scikit-optimize
Commit Name: b0699b34e2b16cb3abbd22c397077cc6c21ef279
Time: 2016-11-30
Author: mks542@nyu.edu
File Name: skopt/optimizer/base.py
Class Name:
Method Name: base_minimize