format.py 646 B

1234567891011121314151617181920212223242526272829303132333435
  1. # %%
  2. import sqlite3
  3. import pandas as pd
  4. import dtale
  5. import unicodedata
  6. with open("../db/ftxt/aa1", 'rb') as file1:
  7. formByte = file1.read()
  8. form = [byte for byte in formByte]
  9. # %%
  10. form
  11. # %%
  12. list( filter(lambda el: el>0, appa) )
  13. # %%
  14. for index, byte in enumerate(appa):
  15. if byte > 0:
  16. print(index, byte)
  17. # %%
  18. with open("../db/itxt/aa1", 'r', encoding="utf-32-le") as file1:
  19. file1.seek(4*179)
  20. text = file1.read(188-179 + 1)
  21. print(text)
  22. # %%
  23. with open("../db/itxt/aa1", 'r', encoding="utf-32-le") as file1:
  24. textfull = file1.read()
  25. # %%
  26. text[179:188]
  27. # %%
  28. len(appa)
  29. # %%
  30. len(text)
  31. # %%
  32. textfull[179+1:188+1]
  33. # %%