Skip to content

Instantly share code, notes, and snippets.

View chun37's full-sized avatar

chun chun37

View GitHub Profile
### Keybase proof
I hereby claim:
* I am chun37 on github.
* I am chun37 (https://keybase.io/chun37) on keybase.
* I have a public key ASCCW9xK8G8AjsKPGrrC4KEwVq34btu-cM_nS3cfqo_EiAo
To claim this, I am signing this object:
@chun37
chun37 / masume_image.py
Created September 6, 2020 04:22
いい感じにマス目の画像を作れるやーつ
from PIL import Image
def create_cell(
size: int, border_size: int, inside_color: str, border_color: str
) -> Image.Image:
inside_size = size - border_size * 2
inside_cell_img = Image.new("RGB", (inside_size, inside_size), inside_color)
cell_img = Image.new("RGB", (size, size), border_color)
cell_img.paste(inside_cell_img, (border_size, border_size))
#!/usr/bin/env python3
import shutil
import subprocess
import sys
revive_path = shutil.which("revive")
if revive_path == "":
print("revive をインストールしてください")
print("`go install github.com/mgechev/revive@latest`")