''' Created on Jun 17, 2015 #import cv2 @author: Brett Paufler (c) Brett Paufler 0 = up (player faces up on board) 90 = right 180 = down 270 = left import math print math.atan2(0, 1) * 180 / math.pi #0, up print math.atan2(1, 0) * 180 / math.pi #90, right print math.atan2(0, -1) * 180 / math.pi #180, down print math.atan2(-1, 0) * 180 / math.pi #-90 (270?, left) ''' #from scipy.ndimage.io import imread #from skimage.io._io import imread_collection, imsave ''' When restarting Football: Players need to locate and respond to other players So, map other players to self includes mapping from current through delta (perceived update) rotated in space But not today... x = [0, 0, 1, -1, 2, -2, 3, -3] y = [-1, -2, -1, -1, -2, -2, -3, -3] for x, y in zip(x,y): print x, y a = [ [[0],[1]], [[2],[3]] ] print a print a[0] print a[0][0] print a[0][0][0] if 0.0: print '0' from football_roster import offense offense() ''' ''' import cv2 import numpy as np m = np.zeros((5,5), dtype=int, order='C') print m.shape for x in range(5): for y in range(5): m[x,y] = x*5 + y print m print 2.75 % 5 print 0.0 print -0.0 print 'test_%.4f' % 3.4 print [(0, [0, 0, 0, 0, 0])] * 2 ''' ''' from skimage.io import imread, imsave import numpy as np m = np.zeros((3,3), dtype=int) print m print np.average(m) a = np.array((0,0)) b = np.array((2,2)) dist = np.linalg.norm(a-b) print 'Distance: %d' % dist print 'Distance: %.3f' % dist #imsave('t.png', m) ''' from math import pi earth_circumference = 24000 * 5810 earth_circumference_10 = earth_circumference + 10 earth_diam = earth_circumference / pi earth_diam_10 = earth_circumference_10 / pi print earth_diam_10 - earth_diam for c in range(1, 11) + range(1000000, 1000110, 10): print c, c / pi #For all circumferences, c + 10, yields diameter + ~3 ''' win = 0.495 lose = 0.505 for n in range(1, 1000): against = pow(lose, n) / pow(win, n) print n, against '''