types.py 748 B

123456789101112131415161718192021222324252627
  1. from load_data import load_DBs
  2. from plot_functions import plot_all
  3. from plot_types import TypePlotter
  4. from laplace_tests import calc_laplace as claplace
  5. class Mydata:
  6. def __init__(self, load):
  7. if load:
  8. (self.dsatable, self.src2dsa, self.dsa2cve, self.cvetable, self.src2month, self.src2sloccount, self.src2pop, self.src2deps, self.pkg_with_cvss, self.src2cwe) = load_DBs()
  9. else:
  10. print('no load command given')
  11. def main():
  12. data = Mydata(True)
  13. print('Done')
  14. #i = plot_all(data.src2month, data.src2sloccount, data.pkg_with_cvss)
  15. #
  16. years = 19
  17. # 2000-2018
  18. j = TypePlotter(data, years)
  19. j.plot_types()
  20. #l = claplace(data,years)
  21. if __name__ == "__main__":
  22. main()