Fix escaping
Browse files- handler.py +2 -2
handler.py
CHANGED
@@ -38,10 +38,10 @@ class EndpointHandler:
|
|
38 |
if len(sorted_programs) > 0:
|
39 |
top_guess = sorted_programs[0][1]
|
40 |
top_score = sorted_programs[0][0]
|
41 |
-
top_success = parse(top_guess).equivalent(parse(true_program))
|
42 |
top_10_guesses = [p for s, p in sorted_programs[:10]]
|
43 |
top_10_scores = [s for s, p in sorted_programs[:10]]
|
44 |
-
top_10_success = any([parse(p).equivalent(parse(true_program)) for p in top_10_guesses])
|
45 |
|
46 |
return {
|
47 |
"guess": top_guess,
|
|
|
38 |
if len(sorted_programs) > 0:
|
39 |
top_guess = sorted_programs[0][1]
|
40 |
top_score = sorted_programs[0][0]
|
41 |
+
top_success = parse(top_guess.replace('\\', '')).equivalent(parse(true_program).replace('\\', ''))
|
42 |
top_10_guesses = [p for s, p in sorted_programs[:10]]
|
43 |
top_10_scores = [s for s, p in sorted_programs[:10]]
|
44 |
+
top_10_success = any([parse(p.replace('\\', '')).equivalent(parse(true_program.replace('\\', ''))) for p in top_10_guesses])
|
45 |
|
46 |
return {
|
47 |
"guess": top_guess,
|