Skip to content

Instantly share code, notes, and snippets.

@noimin0610
Created December 2, 2018 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noimin0610/6cb213c7ae6d114e31ea8fcec3036042 to your computer and use it in GitHub Desktop.
Save noimin0610/6cb213c7ae6d114e31ea8fcec3036042 to your computer and use it in GitHub Desktop.
AtCoder Performances ソースコード (一部)
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