d97188ee62bc0627235578485c5df7d3245fa1ed,example6.py,,,#,14

Before Change


        316, 245, 232, 175, 149, 263, 387, 283, 391, 211, 396, 352, 345, 258, 253, 163, 140, 293, 194, 342, 161, 358,
        271, 156, 260, 384, 153, 277, 214]

laws_str = [str(x) for x in laws]


def get_encodes(x):

After Change


os.environ["CUDA_VISIBLE_DEVICES"] = str(GPUtil.getFirstAvailable()[0])
tf.logging.set_verbosity(tf.logging.INFO)

with open("README.md") as fp:
    data = [v for v in fp if v.strip()]
    bc = BertClient()
    list_vec = bc.encode(data)
    list_label = [0 for _ in data]  // a dummy list of all-zero labels

// write tfrecords

with tf.python_io.TFRecordWriter("tmp.tfrecord") as writer:
    def create_float_feature(values):
        return tf.train.Feature(float_list=tf.train.FloatList(value=values))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: hanxiao/bert-as-service
Commit Name: d97188ee62bc0627235578485c5df7d3245fa1ed
Time: 2018-12-02
Author: hanhxiao@tencent.com
File Name: example6.py
Class Name:
Method Name:


Project Name: deepmipt/DeepPavlov
Commit Name: e258ef3ea167b86d6680bfcc513dd207586b90f4
Time: 2018-07-03
Author: yoptar@gmail.com
File Name: setup.py
Class Name:
Method Name: read_requirements


Project Name: ray-project/ray
Commit Name: 1d532d1cb8b829bdf7055a22c206032ca0b72e46
Time: 2020-04-02
Author: rkooo567@gmail.com
File Name: python/ray/tests/test_webui.py
Class Name:
Method Name: test_get_webui


Project Name: OpenNMT/OpenNMT-py
Commit Name: 7b205efea6b504de04311bc55d109cd28d8f3e0c
Time: 2016-12-21
Author: alerer@fb.com
File Name: OpenNMT/preprocess.py
Class Name:
Method Name: makeVocabulary