from PIL import Image from numpy import genfromtxt
data = genfromtxt('data/yankeedoodle.csv', delimiter=',') data = data[:, :-1] data = data.reshape((-1,)) data = data[:-1] data = data.reshape((139, 53)).transpose().reshape((-1,))
im = Image.new('L', (139, 53)) im.putdata(data*255) im.show()
data = data.reshape((53, 139)).transpose().reshape((-1,)) data_str = ["%.5f" % i for i in data] msg = [] for i inrange(0, 7365, 3): msg.append(chr(int(data_str[i][5] + data_str[i+1][5] + data_str[i+2][6])))
print''.join(msg)
得到的信息为
1 2 3
So, you found the hidden message. There is lots of room here for a long message, but we only need very little space to say "look at grandpa", so the rest is just garbage. VTZ.l'tf*Om@I"p]#R`cWEBZ40ofSC>OZFkRP0\)