feedback -= 1 if bug_on_last_line: time = bug_variables[0] name = bug_variables[1] ischouchou = bug_variables[2] if found_demo_bug2: string2 = str(found_demo_bug2.group("path2")) string = string_bug + string2 try: path = np.array( literal_eval(string)) #.replace('"',''))) graph = Stroke() graph.stroke_from_xxyy(path) graph.downsampleShape(70) if name in prev_strokes: _, score = stroke.euclidian_distance( prev_strokes[name], graph) prev_strokes[name].reset() prev_strokes[name].stroke_from_xxyy(path) prev_strokes[name].downsampleShape(70) else: score = -1. prev_strokes[name] = Stroke() prev_strokes[name].stroke_from_xxyy(path) prev_strokes[name].downsampleShape(70) liste = [] liste.append(time)
else: feedback -= 1 if bug_on_last_line: time = bug_variables[0] name = bug_variables[1] ischouchou = bug_variables[2] if found_demo_bug2: string2 = str(found_demo_bug2.group("path2")) string = string_bug + string2 try: path = np.array(literal_eval(string)) # .replace('"',''))) graph = Stroke() graph.stroke_from_xxyy(path) graph.downsampleShape(70) if name in prev_strokes: _, score = stroke.euclidian_distance(prev_strokes[name], graph) prev_strokes[name].reset() prev_strokes[name].stroke_from_xxyy(path) prev_strokes[name].downsampleShape(70) else: score = -1.0 prev_strokes[name] = Stroke() prev_strokes[name].stroke_from_xxyy(path) prev_strokes[name].downsampleShape(70) liste = [] liste.append(time) liste.append(child)