Created
December 2, 2018 06:29
-
-
Save noimin0610/6cb213c7ae6d114e31ea8fcec3036042 to your computer and use it in GitHub Desktop.
AtCoder Performances ソースコード (一部)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from io import BytesIO | |
import base64 | |
def base64_png(matplot_figure): | |
buff = BytesIO() | |
matplot_figure.canvas.print_png(buff) | |
base64_data = base64.b64encode(buff.getvalue()) | |
return str(base64_data)[2:-1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment