A ChatGPT based emulation of the therapist Doctor Kernel from the book "A digital Affair" by Neora Shem Shaul
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.

genlogs.py 360B

12345678910111213141516
  1. import chevron
  2. from glob import glob
  3. import os
  4. MAX_FILES = 20
  5. def genlog():
  6. os.chdir('logs')
  7. filenames = list(reversed(sorted(glob("*.txt"))))[:MAX_FILES]
  8. with open('../logs.tmpl') as fin:
  9. with open('index.html','w') as fout:
  10. fout.write(chevron.render(fin, {"filenames": filenames}))
  11. if __name__ == '__main__':
  12. genlog()