31b2885ad4068cc8a1316dfaf957a5235101822c,examples/digits/digits.py,,,#,5

Before Change


    img = toimage(image_data.reshape((8,8))) // Data was a flat row of 64 "pixels".
    img.save(output, format="PNG")
    contents = output.getvalue()
    tooltip_s.append(  <img src="data:image/png;base64,%s"> %base64.b64encode(contents).replace("\n","") )
    output.close()

tooltip_s = km.np.array(tooltip_s) // need to make sure to feed it as a NumPy array, not a list

After Change


    img = toimage(image_data.reshape((8,8))) // Data was a flat row of 64 "pixels".
    img.save(output, format="PNG")
    contents = output.getvalue()
    img_encoded = base64.b64encode(contents)
    img_tag = <img src="data:image/png;base64,{}"> .format(img_encoded.decode("utf-8"))
    tooltip_s.append(img_tag)
    output.close()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: MLWave/kepler-mapper
Commit Name: 31b2885ad4068cc8a1316dfaf957a5235101822c
Time: 2017-11-13
Author: nat@saulgill.com
File Name: examples/digits/digits.py
Class Name:
Method Name:


Project Name: tensorflow/tensorboard
Commit Name: 382df2a414524effab9099c95190efa4ccfdd06a
Time: 2019-02-05
Author: wchargin@gmail.com
File Name: tensorboard/manager.py
Class Name:
Method Name: cache_key


Project Name: MLWave/kepler-mapper
Commit Name: 63cb99af2d065bdf8947eebfe6f58e2ce00339a1
Time: 2017-11-13
Author: nat@saulgill.com
File Name: examples/digits/digits.py
Class Name:
Method Name:


Project Name: pantsbuild/pants
Commit Name: 0f71717271d93495cfb4b81c9bcefebd8230d42c
Time: 2018-11-03
Author: ericarellano@me.com
File Name: src/python/pants/releases/reversion.py
Class Name:
Method Name: fingerprint_file