Created
May 13, 2019 20:37
-
-
Save albertlai431/db1ab78ae44641eddf1d42eb424863e3 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
stock = [] #keeping track of all the averages | |
benchmark = 0 #Use this to store the final focus metric | |
while True: | |
data, addr = sock.recvfrom(1024) #receiving data from socket | |
if 'alpha_absolute' in str(data): #checking for alpha | |
#preprocessing data here | |
if time.clock() - timer > 30: | |
benchmark = sum(stock)/len(stock) #determining the benchmark! | |
timer = time.clock() #resets the clock | |
stock = [] #resets the average tracking | |
winsound.Beep(frequency, duration) #plays a beep sound to tell the user it's over | |
break; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment