You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425
  1. import million.analyze.message_evaluation as msg_val
  2. import million.parse.fb_exports as fb
  3. import time
  4. export = fb.parse_dirfiles("./data")
  5. messages = export.messages
  6. counts = {val for m in messages if (val := msg_val.get(m)) and val <= 1_000_000}
  7. counts = sorted(counts)
  8. expected_value = 1
  9. intervals = []
  10. for value in counts:
  11. if value != expected_value:
  12. interval_length = value - expected_value
  13. if interval_length == 1:
  14. intervals.append(str(expected_value))
  15. else:
  16. intervals.append(f"{expected_value}..{value - 1}")
  17. expected_value = value + 1
  18. print(intervals)