import matplotlib.pyplot as plt
import matplotlib.cm as cm
import numpy as np
data=[0,1,0,1,0,1,0,0,1,0,1,0,0,1,1,0,1,0,1,0,1,0,0,1,1,0,0,1,0,1,0,1,0,1,0,1,1,0,0,1,0,0,1,1]
print len(data)
#plt.imsave('filename.png', np.array(data).reshape(50,50), cmap=cm.gray)
