Fast_Impressions.py 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. from Tkinter import *
  2. import webbrowser
  3. screen = Tk()
  4. screen.geometry("300x720")
  5. screen.columnconfigure(0, minsize=10)#300) <-- changes the margin
  6. door=PhotoImage(file="watercolour.gif")
  7. knock = Label(screen, image = door)
  8. g = 0
  9. d = 0
  10. knock.place(x = g, y = d, width= 40, height= 40)
  11. def knockknock(g, d):
  12. while d < 720: #72 in honour of art bell
  13. knock = Label(screen, image = door)
  14. knock.place(x =g, y = d, width=40, height = 40)
  15. d = d + 40
  16. while g < 300:
  17. knockknock(g, d)
  18. g = g + 40
  19. #textholder2 = Label(screen, image = door, height = 40) ###'
  20. #textholder2.grid(row=10, column=0 )
  21. screen.title('Fast Impressions')
  22. textholder0 = Label(screen, image = door, height = 40) #Label(textholder0.grid(row=1, column=0)
  23. title = Label(screen, text="Fast Impressions",width = 30,height = 2, background = "#a4a2ff", foreground = '#91ffbf',font = "Ariel 11 italic bold")
  24. title.grid(row=4, column=0)
  25. clear = Label(screen, height = 1)
  26. clear.grid(row = 5, column=1)
  27. text1 = Label(screen, background='#FEFDFF', text="Name or phrase?")
  28. text1.grid(row=6, column=0)
  29. abreakone = StringVar()
  30. aabreak = Entry(screen, textvariable=abreakone, width = 25, highlightbackground = '#a4a2ff')#E085FF')
  31. aabreak.grid(row=7, column=0)
  32. #ab = abreakone.get() #-------------------------
  33. text2 = Label(screen, background='#FEFDFF', text="Year of birth / creation?")
  34. text2.grid(row=8, column=0)
  35. yv = IntVar()
  36. yyear = Entry(screen, textvariable=yv, width = 25, highlightbackground = '#a4a2ff')
  37. yyear.grid(row=9, column=0)#padx=10)
  38. text3 = Label(screen, background='#FEFDFF', text="Month?") # make a April = 4 etc. etc. in main
  39. text3.grid(row=10, column=0)
  40. mv = IntVar()
  41. mmonth = Entry(screen, textvariable=mv, highlightbackground = '#a4a2ff', width = 25)
  42. mmonth.grid(row=11, column=0)
  43. text4 = Label(screen, background='#FEFDFF', text="Date(day)?")
  44. text4.grid(row=12, column=0)
  45. dv = IntVar()
  46. dday = Entry(screen, textvariable=dv, highlightbackground = '#a4a2ff', width = 25)
  47. dday.grid(row=13, column=0)
  48. #dayp = dv.get()
  49. clear = Label(screen, height = 1)
  50. clear.grid(row = 15, column=1)
  51. ask = Button(screen, background='#91ffbf',activebackground = "#a4a2ff", text= "Do a single calculation now",command = lambda:figureitout().firstask(themoreyouignoreme))
  52. ask.grid(row = 14, column = 0)
  53. doctor = PhotoImage(file = "sbs.gif")
  54. detroit = Button(screen, image = doctor, command = lambda: webbrowser.open('http://www.swagbucks.com/refer/DoctorDetroit'))
  55. detroit.grid(row = 16, column = 0)
  56. clear = Label(screen, height = 1)
  57. clear.grid(row = 20, column=1)
  58. text6 = Label(screen,background="#FEFDFF", text="Second name or phrase?")
  59. text6.grid(row=21, column=0)
  60. name2 = Entry(screen, width = 25, highlightbackground = "#a4a2ff")
  61. name2.grid(row=22)
  62. text7 = Label(screen,background= "#FEFDFF", text="Second year of birth or creation?")
  63. text7.grid(row=23, column=0)
  64. year2 = Entry(screen, width = 25, highlightbackground = "#a4a2ff")
  65. year2.grid(row=24, column=0)
  66. text8 = Label(screen, background="#FEFDFF", text="Second month?") # make a April = 4 etc. etc. in main
  67. text8.grid(row=25, column=0)
  68. month2 = Entry(screen, width = 25, highlightbackground = "#a4a2ff")
  69. month2.grid(row=26, column=0)
  70. text9 = Label(screen, background='#FEFDFF', text="Second day?")
  71. text9.grid(row=27, column=0)
  72. day = Entry(screen, background='#FEFDFF', width = 25, highlightbackground = "#a4a2ff")
  73. day.grid(row=30, column=0)
  74. ask2 = Button(screen, background='#91ffbf',activebackground = "#a4a2ff", text= "See test matches now",command = lambda:secondask(), height = 1)
  75. ask2.grid(row = 31, column = 0) #get some sort of padding
  76. global themoreyouignoreme
  77. themoreyouignoreme = [] #lisynames
  78. global thecloseriget
  79. thecloseriget = []
  80. zone = "\n\nAssertive - Dominating - Driven - Egotistic - Impulsive - Individualistic - Leader\n\n"
  81. ztwo = "\n\nAdaptable - Considerate - Depression prone - Diplomat - Drowns in detail - Influenceable - Modest - Self conscious - Timid\n\n"
  82. zthree = "\n\nCreative - Enjoys life - Exagerates - Expressive - Flighty - Insightful - Moody - Resilient - Verbal\n\n"
  83. zfour = "\n\nAcheiver - Argumentative - Dislikes limits - Drowns in details - Lack of imagination - Orderly - Practical - Slow to act - Steady Growth\n\n"
  84. zfive = "\n\nEdgy temperment - Curious - Ever changing - Hasty - Impatient - Pissy if held back - Restless - Versitile - Visionary\n\n"
  85. zsix = "\n\nArtistic - Domestic - Likes flattery - Meddling - Outspoken - Self Righteous - Stubbourn - Sympathetic - Very Responsible\n\n"
  86. zseven = "\n\nCharming - Hates distractions - Inflexible - Loves solitude - Perfectionist - Sarcastic - Scheming - Studious - Suspicious\n\n"
  87. zeight = "\n\nAltruistic - Can make much money but also mismanage it - Handles power and authority well - Impatient - Materialistic - Political skills - Sound judgment - Values recognition - Workaholic\n\n"
  88. znine = "\n\nCreative - Friendly - Humanitarian - Meets obligations - Moody - Possessive - Prone to peer pressure - Scattered interests - Selfless\n\n"
  89. zzero = "\n \n"
  90. class figureitout:
  91. global themoreyouignoreme
  92. themoreyouignoreme = []
  93. global thecloseriget
  94. thecloseriget = []
  95. global percenties
  96. percenties = []
  97. # global neutrals
  98. # neutrals = 0
  99. # global compatiblematches
  100. # compatiblematches = 0
  101. # global naturalmatches
  102. # naturalmatches = 0
  103. # global challenges
  104. chalenges = 0
  105. global vowelsOnly
  106. vowelsOnly = list()
  107. global consOnly
  108. consOnly = list()
  109. global vows
  110. vows = ['a', 'A', 'e', 'E', 'i', 'I', 'o', 'O','u', 'U']
  111. global vowgroup
  112. vowgroup = list()
  113. global consgroup
  114. consgroup = list()
  115. global vibes
  116. vibes = {
  117. 1:(["a","A", "j","J", "S", "s", "1"],[1]),
  118. 2:(["B","b", "K", "k", "T", "t", "2"], [2]),
  119. 3:(["C","c","L", "l","U", "u", "3"], [3]),
  120. 4:(["d", "D", "M", "m", "V", "v", "4"], [4]),
  121. 5:(["e", "E", "N", "n", "W", "w", "5"], [5]),
  122. 6:(["f", "F", "O", "o", "x", "X", "6"], [6]),
  123. 7:(["g", "G", "P", "p","Y", "y", "7"], [7]),
  124. 8:(["h", "H", "Q", "q","Z", "z", "8"], [8]),
  125. 9:(["i", "I", "R", "r", "9"], [9])
  126. }
  127. def askdown(self,abreak, year, month, day, lisyname):
  128. alphabreak = list(abreak)
  129. looseit(alphabreak, "'")
  130. numerals(year, month, day)
  131. while "y" in alphabreak:
  132. why("y", alphabreak)
  133. continue
  134. for item in alphabreak:
  135. consOnly.append(item)
  136. del alphabreak
  137. sort(vows, consOnly, vowelsOnly)
  138. looseit(consOnly, " ")
  139. looseit(vowelsOnly, " ")
  140. gather(vowelsOnly, vowgroup)
  141. gather(consOnly, consgroup)
  142. global vowelzz
  143. vowelzz = totes(vowgroup)
  144. print vowelzz #ha ha maybe off by one it
  145. #vowelzz = vowelzz
  146. print vowelzz
  147. global conzz
  148. conzz = totes(consgroup)#numbers on the fly - new name?
  149. conzz = conzz
  150. global allzz
  151. allzz = vowelzz + conzz
  152. allzz = reducer(allzz)
  153. print"ok"
  154. print vowelzz
  155. wellokthen = (vowelzz, conzz, allzz, second, first)
  156. for item in wellokthen:
  157. lisyname.append(item)
  158. print "cottoncrown"
  159. print lisyname
  160. def ripart(whatnum): #can u put some sort of formating on strings
  161. if whatnum == 1:
  162. whatnum = "1" + zone
  163. elif whatnum == 0:
  164. whatnum = "0" + zzero
  165. elif whatnum == 2:
  166. whatnum = "2" + ztwo
  167. elif whatnum == 3:
  168. whatnum = "3" + zthree
  169. elif whatnum == 4:
  170. whatnum = "4" + zfour
  171. elif whatnum == 5:
  172. whatnum = "5" + zfive
  173. elif whatnum == 6:
  174. whatnum = "6" + zsix
  175. elif whatnum == 7:
  176. whatnum = "7" + zseven
  177. elif whatnum == 8:
  178. whatnum = "8" + zeight
  179. elif whatnum == 9:
  180. whatnum = "9" + znine
  181. else:
  182. pass
  183. return whatnum
  184. vowelzt = ripart(vowelzz)
  185. conzt = ripart(conzz)
  186. allzt = ripart(allzz)
  187. secondt = ripart(second)
  188. firstt = ripart(first)
  189. print vowelzt
  190. singlenametext = "\n\nVowels (private ambitions) break down to %s \n\nConsants (secret dreams) break down to %s \n\nAll letters together (life mission) break down to %s \n\nThe birthday and month (first impression people have) break down to %s \n\nAll the birthnumbers together (dominant traits) break down to %s " % (vowelzt, conzt, allzt, secondt, firstt) #double check nothing with date alone
  191. if lisyname == themoreyouignoreme:
  192. popdisplay(singlenametext, "First Name Calculation")
  193. elif lisyname == thecloseriget:
  194. popdisplay(singlenametext, "Second Name Calculation")
  195. def firstask(self,lisyname):
  196. ab = abreakone.get()
  197. yearp = yv.get()
  198. monthp = mv.get()
  199. dayp = dv.get()
  200. self.askdown(ab, yearp, monthp, dayp, lisyname)
  201. def reducer(stuff):
  202. while len(list(map(int, str(stuff)))) > 3:
  203. stuff = list(map(int, str(stuff)))[0] + list(map(int,
  204. str(stuff)))[1] + list(map(int, str(stuff)))[2] + list(map(int,
  205. str(stuff)))[3]
  206. while len(list(map(int, str(stuff)))) > 2:
  207. stuff = list(map(int, str(stuff)))[0] + list(map(int,
  208. str(stuff)))[1] + list(map(int, str(stuff)))[2]
  209. while len(list(map(int, str(stuff)))) > 1:
  210. stuff = list(map(int, str(stuff)))[0] + list(map(int, str(stuff)))[1]
  211. if stuff > 9:
  212. reducer(stuff)
  213. else:
  214. return stuff
  215. def looseit(listofstuff, what):
  216. for whatever in listofstuff:
  217. if whatever == what:
  218. listofstuff.remove(what)
  219. def numerals(year, month, day):
  220. secondpath = month + day
  221. thirdpath = year
  222. firstpath = secondpath + thirdpath
  223. global first
  224. first = reducer(firstpath)
  225. third = reducer(thirdpath)
  226. global second
  227. second = reducer(secondpath)
  228. def sort(checklist, stuff, morestuff):
  229. for whatever in checklist:
  230. while whatever in stuff:
  231. morestuff.append(whatever)
  232. stuff.remove(whatever)
  233. def why(a, b):
  234. b.append(' ')
  235. b.insert(0, ' ')
  236. firstwhy = b.index(a)
  237. firstless = firstwhy -1
  238. firstmore = firstwhy +1
  239. if b[firstless] not in vows and b[firstmore] not in vows:
  240. vowelsOnly.append(a)
  241. else:
  242. consOnly.append(a)
  243. b.remove(a)
  244. def gather(letters, groupz):
  245. x = 0
  246. while x <= len(vibes)-1:
  247. for item in letters:
  248. if item in vibes.values()[x][0]:
  249. groupz.append(vibes.values()[x][1])
  250. x = x +1
  251. def totes(listy):
  252. global werk
  253. werk = 0
  254. for thing in listy:
  255. werk = werk + thing[0]
  256. if werk >= 10:
  257. werk = reducer(werk)
  258. return werk
  259. def popdisplay(rushisthebestbandever, titlez):
  260. pops = Toplevel(background = '#ccccff')
  261. pops.title(titlez)
  262. pops.geometry("300x650")
  263. mess = Message(pops, justify = CENTER, text= rushisthebestbandever, background = "#ebdeff", width = 295)
  264. global percenties
  265. percenties = []
  266. mess.pack()
  267. okies = Button(pops, text="Okies, got it", bg = "#ffffff", command= pops.destroy)
  268. okies.pack()
  269. def secondask():#themoreyouig):
  270. global themoreyouignoreme
  271. figureitout().firstask(themoreyouignoreme)
  272. print themoreyouignoreme
  273. print "stuck"
  274. global thecloseriget
  275. figureitout().firstask(thecloseriget)
  276. blink = 0
  277. while blink < 5:
  278. global themoreyouignoreme
  279. firsty = themoreyouignoreme[blink]
  280. global thecloseriget
  281. secondy = thecloseriget[blink]
  282. groupone = [3,6,9] # fworks so far!
  283. grouptwo = [1,5,7]
  284. groupthree = [2,4,8]
  285. tally = 0
  286. if firsty in groupone and secondy in groupone:
  287. tally += 100
  288. if firsty in grouptwo and secondy in grouptwo:
  289. tally += 100
  290. if firsty in groupthree and secondy in groupthree:
  291. tally += 100
  292. print tally
  293. if tally != 0:
  294. global percenties
  295. percenties.append(tally)
  296. rally = 0
  297. if firsty == 5 and secondy == 9:
  298. rally += 75
  299. if firsty == 6 and secondy == 8:
  300. rally += 75
  301. if firsty == 3 and secondy == 5:
  302. rally += 75
  303. if rally != 0:
  304. global percenties
  305. percenties.append(rally)
  306. pally = 0
  307. if firsty == 1 and secondy == 8:
  308. pally += 50
  309. if firsty == 5 and secondy == 8:
  310. pally += 50
  311. if firsty == 8 and secondy == 5:
  312. pally += 50
  313. if firsty == 8 and secondy == 1:
  314. pally += 50
  315. if pally != 0:
  316. global percenties
  317. percenties.append(pally)
  318. fally = 0
  319. if tally == 0 and rally == 0 and pally == 0:
  320. fally += 25
  321. if fally != 0:
  322. global percenties
  323. percenties.append(fally)
  324. blink = blink + 1
  325. doublenametext = "\n\nVowels show as a %i percent match \n\n Consonants show as a %i percent match \n\n All letters together show as a %i percent match \n\n Birthdates show as a %i percent match \n\n All of the birth numbers together show as a %i percent match \n" % (percenties[0], percenties[1], percenties[2], percenties[3], percenties[4])
  326. popdisplay(doublenametext, "Match")
  327. mainloop()