M-star.py 902 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/usr/bin/python3
  2. import logging
  3. import sys
  4. from vendors.debian.DebianModel import DebianModel
  5. import Lstm as lstm
  6. ##### GLOBAL VARIABLES #####
  7. logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
  8. # Increase the recursion limit by much to allow bs to parse large files ()
  9. sys.setrecursionlimit(6000)
  10. secondsperday = 86400
  11. verbosity = 1
  12. ###### FUNCTIONS ######
  13. def aptsec_help():
  14. """
  15. :return:
  16. """
  17. print('See manual for correct usage!')
  18. def __main__(configfile='config_default.txt', vendorname='debian', action='help'):
  19. # support only debian
  20. if vendorname is 'debian':
  21. model = DebianModel(action)
  22. #lstm.predict(model.get_src2month(),{},{},{})
  23. #for norm_param in range(1, 15):
  24. # get model as set of opinions
  25. else:
  26. print("Only debian vendors are supported for now.")
  27. sys.exit(1)
  28. __main__(action=sys.argv[1])