main.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. '''
  4. @Auther :liuyuqi.gov@msn.cn
  5. @Time :2018/7/4 15:55
  6. @File :main.py
  7. '''
  8. # 数据预览
  9. import pandas as pd
  10. from configparser import ConfigParser
  11. import libs.save_conf
  12. class Scheduling():
  13. sb=[]
  14. df3=None
  15. def init(self,name,gender,birth,**kw):
  16.         self.name = name
  17.         self.gender = gender
  18.         self.birth = birth
  19.         for k,v in kw.iteritems() :
  20.             setattr(self,k,v)
  21. self.import_data()
  22. def import_data():
  23. df3=pd.read_csv("app")
  24. # step1: 数据参数初始化
  25. def getConfig(self):
  26. cf = ConfigParser()
  27. config_path = "../conf/config.ini"
  28. section_name = "data_file_name"
  29. cf.read(config_path)
  30. app_interference = cf.get(section_name, "app_interference")
  31. app_resources = cf.get(section_name, "app_resources")
  32. instance_deploy = cf.get(section_name, "instance_deploy")
  33. machine_resources = cf.get(section_name, "machine_resources")
  34. def init_conf(self):
  35. '''
  36. 初始化配置文件
  37. :retur
  38. '''
  39. libs.save_conf.write()
  40. def sort_dynamic(self):
  41. if __name__ == '__main__':
  42. init_conf()