Exemple #1
0
def updateScores(db, user, loglist, model):
	for log in loglist:
		if log[5] != 0: # score != 0
			continue
		
		Y = Vector(log[3])
		if Y.dim() != model.dim:
			continue
		distance, theta = model.getDistanceAndTheta(Y)
		log[4], log[5] = distance, theta
		db.updateScore(user, log[0], distance, theta, debug=1)