e185a7110ec79864dcef5114b71356691eec39df,theanolm/commands/sample.py,,sample,#Any#,37
Before Change
sys.stdout.flush()
sampler = TextSampler(network)
for i in range(args.num_sentences):
words = sampler.generate()
args.output_file.write("{}: {}\n".format(
i, " ".join(words)))
After Change
sequences = sampler.generate(30, args.num_sentences)
for sequence in sequences:
try:
eos_pos = sequence.index("</s>")
sequence = sequence[:eos_pos+1]
except:
pass
args.output_file.write(" ".join(sequence) + "\n")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: senarvi/theanolm
Commit Name: e185a7110ec79864dcef5114b71356691eec39df
Time: 2016-07-16
Author: seppo.git@marjaniemi.com
File Name: theanolm/commands/sample.py
Class Name:
Method Name: sample
Project Name: ekzhu/datasketch
Commit Name: b9efa820314c6c3dd3f1a1e4f8c7adc683340913
Time: 2016-01-19
Author: erkangzhu@gmail.com
File Name: datasketch/hyperloglog.py
Class Name: HyperLogLog
Method Name: deserialize
Project Name: ekzhu/datasketch
Commit Name: b9efa820314c6c3dd3f1a1e4f8c7adc683340913
Time: 2016-01-19
Author: erkangzhu@gmail.com
File Name: datasketch/hyperloglog.py
Class Name: HyperLogLog
Method Name: __setstate__