6880ee0c2c46573cfc77444e2970aa8695140076,thumt/scripts/shuffle_corpus.py,,main,#,24

Before Change



    for fdr, fdw in zip(stream, newstream):
        fdr.close()
        fdw.close()


if __name__ == "__main__":
    parsed_args = parseargs()

After Change


    if args.num_shards == 1:
        newstream = [[open(item + suffix, "w") for item in name]]
    else:
        newstream = [[open(item + "-%s-of-%s" % (i, args.num_shards), "w")
                      for item in name] for i in range(args.num_shards)]

    for idx in indices.tolist():
        lines = [item[idx] for item in data]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: THUNLP-MT/THUMT
Commit Name: 6880ee0c2c46573cfc77444e2970aa8695140076
Time: 2019-02-14
Author: playinf@stu.xmu.edu.cn
File Name: thumt/scripts/shuffle_corpus.py
Class Name:
Method Name: main


Project Name: openeventdata/mordecai
Commit Name: 580af77a96d8c6b306ad4425eafd7768df00338a
Time: 2018-06-27
Author: ahalterman0@gmail.com
File Name: mordecai/geoparse.py
Class Name: Geoparser
Method Name: batch_geoparse


Project Name: richzhang/colorization-pytorch
Commit Name: 1215d2390c0ef900337366e7a89e8d21e4bfd592
Time: 2018-08-25
Author: rzhang88@gmail.com
File Name: test_sweep.py
Class Name:
Method Name: