8000 Messing around with ftfy package and counting iterations. · jsphdnl/practice-python@ccb163b · GitHub
[go: up one dir, main page]

Skip to content

Commit ccb163b

Browse files
committed
Messing around with ftfy package and counting iterations.
1 parent 839b3ef commit ccb163b

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

experiments/text-fix.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import ftfy
2+
3+
4+
def main():
5+
print(ftfy.fix_encoding('주문하다 - to intent for?'))
6+
7+
runs = 0
8+
9+
start = 1
10+
stop = 6
11+
step = 1
12+
13+
# not totally accurate - at least one iteration when stop > start
14+
iterations = (stop - start) // step
15+
16+
for i in range(start, stop, step):
17+
runs += 1
18+
19+
print(runs)
20+
print(iterations)
21+
22+
23+
if __name__ == '__main__':
24+
main()

0 commit comments

Comments
 (0)
0