24d3656c6c4b3c6806954487720d53af775a1150,set_expansion_demo/ui/main.py,,get_phrases,#Any#,30

Before Change


    try:
        // Connect to server and send data
        sock.connect(("localhost", 1111))
        print("sending a get_vocab request")
        sock.sendall(bytes("get_vocab" + "\n", "utf-8"))
        // Receive data from the server and shut down
        data = b""
        while True:

After Change


    // 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)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

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: catalyst-team/catalyst
Commit Name: 9f960738f0dee048bcea4c29dcabdbd98cad22dd
Time: 2020-10-21
Author: 19803638+bagxi@users.noreply.github.com
File Name: tests/_tests_cv_classification_transforms/experiment.py
Class Name: MNIST
Method Name: __getitem__


Project Name: deepmipt/DeepPavlov
Commit Name: 29ee3e34123191e7b444915b6be56edd8699aa36
Time: 2018-03-22
Author: yurakuratov@gmail.com
File Name: deeppavlov/core/commands/infer.py
Class Name:
Method Name: interact_model