forked from gebienha/MLFinal_Group38
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtempCodeRunnerFile.py
More file actions
15 lines (15 loc) · 973 Bytes
/
tempCodeRunnerFile.py
File metadata and controls
15 lines (15 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
if stable_char is not None and detected_letter == stable_char:
# if stable_start_time and time.time() - stable_start_time >= stability_duration:
# # If current character is '-' and nothing has been detected previously
# if detected_letter == '-' and not nothing_detected:
# nothing_detected = True
# # If current character is not '-', or after '-' has been detected, append the detected letter
# elif detected_letter != '-' and (nothing_detected or detected_letter != last_char):
# sentence.append(detected_letter)
# last_char = detected_letter
# nothing_detected = False
# stable_start_time = None
# else:
# # Update stable_char to the new detected letter and reset timing
# stable_char = detected_letter
# stable_start_time = time.time()