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):
    // x is `batch_size` of lines, each of which is a json object

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: 3

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: NifTK/NiftyNet
Commit Name: ae585178b8f190bcbf7f1433a731fa27fc32271a
Time: 2017-07-23
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/application_driver.py
Class Name: ApplicationDriver
Method Name: run_application


Project Name: keras-team/keras
Commit Name: 3b440235e237ef59ec5763c413e7f4292dab5d79
Time: 2018-04-26
Author: francois.chollet@gmail.com
File Name: keras/engine/network.py
Class Name: Network
Method Name: run_internal_graph