dae978a935dec95944c9fd8448318c4bc3acf26b,example3.py,,,#,14

Before Change



    // get encoded vectors
    for j in bc.encode_async(text_gen()):
        print("received %d x %d" % (j.shape[0], j.shape[0]))

After Change


if __name__ == "__main__":
    bc = BertClient(ip="localhost", port=int(sys.argv[1]), port_out=int(sys.argv[2]))
    t1 = threading.Thread(target=client_clone, args=(bc.identity, 1))
    t2 = threading.Thread(target=client_clone, args=(bc.identity, 2))
    t1.start()
    t2.start()

    with open("README.md") as fp:
        data = [v for v in fp if v.strip()]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: hanxiao/bert-as-service
Commit Name: dae978a935dec95944c9fd8448318c4bc3acf26b
Time: 2018-11-26
Author: hanhxiao@tencent.com
File Name: example3.py
Class Name:
Method Name:


Project Name: deepchem/deepchem
Commit Name: ed7782f0f59f1eef6453f47633fe9e15bda00f84
Time: 2017-03-23
Author: peter.eastman@gmail.com
File Name: deepchem/models/tensorflow_models/__init__.py
Class Name: TensorflowGraphModel
Method Name: fit


Project Name: erikbern/ann-benchmarks
Commit Name: 845a5692cd16a152572e8818dbdecfd5d7a7764a
Time: 2017-12-09
Author: mail@erikbern.com
File Name: ann_benchmarks/runner.py
Class Name:
Method Name: run_docker