Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # grayscaler_for_ai_art_gen.py
- ttt = {}
- for (left,middle,right), vvv in zzz:
- t = vvv + [left,middle,right]
- H = 255-max(t)
- L = min(t)
- for i in range(0, L+1):
- k = (H+left-i,H+middle-i,H+right-i)
- if k not in ttt:
- v = [H+v-i for v in vvv]
- try:
- v += zzz[k]
- v = list(set(v))
- except:
- 0
- ttt[k] = v
- # print(k, ttt[k])
- import os
- import tempfile
- fd, path = tempfile.mkstemp()
- with os.fdopen(fd, 'w') as tmp:
- tmp.write(str(ttt))
- os.open(path)
- print('done.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement