24d3656c6c4b3c6806954487720d53af775a1150,set_expansion_demo/ui/main.py,,get_phrases,#Any#,30
Before Change
data = b""
while True:
packet = sock.recv(4096)
if not packet :
break
data += packet
received = pickle.loads(data)
all_phrases.extend(received)
print("vocab len = " + str(len(all_phrases)))
// print("Received: {}".format(received))
After Change
def get_phrases(top_n=100000):
global all_phrases
received = send_request_to_server("get_vocab")
// all_phrases.extend(x for x in received if len(x) < max_phrase_length)
all_phrases=received
for p in all_phrases:
if len(p) < max_phrase_length:
all_phrases_dict[p] = p
all_cut_phrases_dict[p] = p
else:
all_phrases_dict[p] = p[:max_phrase_length] + "..."
all_cut_phrases_dict[p[:max_phrase_length] + "..."] = p
print("done. vocab count = " + str(len(all_phrases)))
// pp = pprint.PrettyPrinter()
// pp.pprint(all_phrases_dict)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances Project Name: NervanaSystems/nlp-architect
Commit Name: 24d3656c6c4b3c6806954487720d53af775a1150
Time: 2018-06-07
Author: shira.guskin@intel.com
File Name: set_expansion_demo/ui/main.py
Class Name:
Method Name: get_phrases
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 4da37abc3937edf62249daa010f5e522c6c04fd4
Time: 2018-03-07
Author: tohaowu@google.com
File Name: perfkitbenchmarker/providers/aws/aws_managed_relational_db.py
Class Name: AwsManagedRelationalDb
Method Name: _IsInstanceReady
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 38184fca0234ef4da34b84497b2cd0f4009a9c5b
Time: 2018-03-08
Author: nathante@google.com
File Name: perfkitbenchmarker/providers/aws/aws_managed_relational_db.py
Class Name: AwsManagedRelationalDb
Method Name: _IsInstanceReady