reduce_min_pool_size.py 256 字节
Newer Older
Y
Yu Yang 已提交
1 2 3 4 5 6
@provider(min_pool_size=0, ...)
def process(settings, filename):
    os.system('shuf %s > %s.shuf' % (filename, filename))  # shuffle before.
    with open('%s.shuf' % filename, 'r') as f:
        for line in f:
            yield get_sample_from_line(line)