Drkcore

17 05 2013 Python Tweet

バグではなく仕様

写真はパグです。

1368783238

from base64 import encodestring, decodestring
from random import randint

mat = encodestring(open("orig.jpg", "rb").read())
gt = "".join([str(randint(0, 9)) if c == '0' and randint(0, 9) < 1 else c for c in mat])
open("glitched.jpg", "wb").write(decodestring(gt))

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021