Created
November 11, 2018 05:48
-
-
Save swt02026/bec395745d583e2a680b9d66c99fbbd9 to your computer and use it in GitHub Desktop.
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
import os | |
import itertools | |
sec1=[ 5,6 ] | |
sec2 = [16, 25] | |
sec3 = [2, 15, 26, 3, 23] | |
data_b = [20, 21] | |
data_w = [10, 19] | |
sec4 = [7, 8] | |
sec5 = [1, 18] | |
right = [4, 22, 24] | |
for a in itertools.permutations(sec2): | |
for b in itertools.permutations(data_w): | |
for c in itertools.permutations(data_b): | |
for e in itertools.permutations(sec5): | |
for f in itertools.permutations(right): | |
d=zip(b,c) | |
d=list(itertools.chain(*d)) | |
g=[[9]*3,sec1, a, sec3, d, sec4, [e[0]], f ,[e[1]], [14], [9]*3] | |
g=list(itertools.chain(*g)) | |
os.system( 'convert '+ ' '.join(map(lambda i: str(i)+'.png', g)) + ' +append result'+''.join(map(str,g))+'.png') | |
import glob | |
import qrtools | |
file = glob.glob('result*.png') | |
qr = qrtools.QR() | |
for i in file: | |
if qr.decode(i): | |
print qr.data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment