Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

read_top.py 658B

12345678910111213141516171819202122232425
  1. from million.view.bar_chart import plot as bar_chart
  2. from million.analyze.count_participations import count_participations
  3. from million.analyze.retain_counts import retain_counts
  4. import million.parse.fb_exports as fb
  5. DATA_PATH = './data/'
  6. export = fb.parse_dirfiles(DATA_PATH)
  7. filtered = retain_counts(export.messages)
  8. print(len(filtered))
  9. counted_participations = count_participations(filtered, export.participants)
  10. kept_participations = [
  11. p for p in counted_participations if p['participations'] > 100]
  12. print(
  13. "\n".join([
  14. f"{k}:{p['name']}: {p['participations']}"
  15. for (k, p) in enumerate(kept_participations)
  16. ])
  17. )