def getConfidence(): keyStrokeData = request.json data = [] last_chr = '' for event in keyStrokeData['data']: if last_chr == '': last_chr = chr(event['keyCode']) else: data.append((last_chr + chr(event['keyCode']), event['flightTime'])) last_chr = chr(event['keyCode']) userstore.createUser(keyStrokeData['userID'], data)
def getConfidence(): keyStrokeData = request.json data = [] last_chr = '' for event in keyStrokeData['data']: if last_chr == '': last_chr = chr(event['keyCode']) else: data.append((last_chr + chr(event['keyCode']), event['flightTime'])) last_chr = chr(event['keyCode']) userstore.createUser(keyStrokeData['userID'], data) print data au = auth.Authenticator(keyStrokeData['actual_userID'], 25) au.initConstWithFullValidation() print keyStrokeData['userID'] return str(au.getLikelihoodFromProfile(keyStrokeData['userID']))