当前位置: 首页>>代码示例>>Python>>正文


Python MOSES.getCategoryTree方法代码示例

本文整理汇总了Python中MOSES.getCategoryTree方法的典型用法代码示例。如果您正苦于以下问题:Python MOSES.getCategoryTree方法的具体用法?Python MOSES.getCategoryTree怎么用?Python MOSES.getCategoryTree使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MOSES的用法示例。


在下文中一共展示了MOSES.getCategoryTree方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import MOSES [as 别名]
# 或者: from MOSES import getCategoryTree [as 别名]
    def __init__(self, user_id, password, start_date, end_date = None, query_dict = None, category_tree = None, parent = None):
        super(PiggyBanker, self).__init__(parent)
        self.mutex = QtCore.QMutex()
        self.condition = QtCore.QWaitCondition()
        self.user_id = user_id
        self.password = password
        self.sleeper = 10
        self.start_date = start_date
        if query_dict is None:
            #get all data for a writer between dates if only dates are given.
            self.query_dict = {"WriterID": self.user_id}
        else:
            #If some query dictionary is supplied, get all data corresponding to that.
            self.query_dict = query_dict
        if end_date is None:
            self.end_date = self.start_date
        else:
            self.end_date = end_date
            
        if category_tree is None:
            self.category_tree = MOSES.getCategoryTree(self.user_id, self.password)
        else:
            self.category_tree = category_tree

        if not self.isRunning():
            self.start(QtCore.QThread.LowPriority)
开发者ID:vinay87,项目名称:oink,代码行数:28,代码来源:PiggyBanker.py

示例2: __init__

# 需要导入模块: import MOSES [as 别名]
# 或者: from MOSES import getCategoryTree [as 别名]
 def __init__(self, userID, password, category_tree=None, *args, **kwargs):
     """Efficiency Calculator Initializer function."""
     super(QtGui.QDialog, self).__init__()
     self.userID = userID
     self.password = password
     if category_tree is None:
         self.category_tree = MOSES.getCategoryTree(self.userID, self.password)
     else:
         self.category_tree = category_tree 
     self.target_date = datetime.date.today()
     self.retrieved_data = None
     self.allow_paste = False
     self.calcList = []
     self.createWidgets()
     self.createLayouts()
     self.createEvents()
     self.setVisuals()
开发者ID:vinay87,项目名称:oink,代码行数:19,代码来源:EfficiencyCalculator.py

示例3: __init__

# 需要导入模块: import MOSES [as 别名]
# 或者: from MOSES import getCategoryTree [as 别名]
 def __init__(self, user_id, password, category_tree=None, brands=None):
     super(PiggyBankWithFilter, self).__init__()
     self.user_id, self.password = user_id, password
     if category_tree is not None:
         self.category_tree = category_tree
     else:
         self.category_tree = MOSES.getCategoryTree(self.user_id, self.password)
     if brands is None:
         print "Pulling Brand list in PiggyBankWithFilter"
         self.brands = MOSES.getBrandValues(self.user_id, self.password)
     else:
         self.brands = brands
     self.createUI()
     self.piggybank_data = []
     self.mapEvents()
     self.changePage()
     self.populateBrand()
     self.populateWriters()
     self.show()
开发者ID:vinay87,项目名称:oink,代码行数:21,代码来源:PiggyBankWithFilter.py

示例4: __init__

# 需要导入模块: import MOSES [as 别名]
# 或者: from MOSES import getCategoryTree [as 别名]
 def __init__(self, user_id, password, category_tree=None):
     super(DailyPorker, self).__init__()
     self.user_id, self.password = user_id, password
     self.report_list = []
     if category_tree is None:
         self.category_tree = MOSES.getCategoryTree(self.user_id, self.password)
     else:
         self.category_tree = category_tree
     #self.pork_kent = PorkKent(self.user_id, self.password)
     style_string = """
     .QTableWidget {
         gridline-color: rgb(0, 0, 0);
     }
     """
     self.setStyleSheet(style_string)
     self.clip = QtGui.QApplication.clipboard()
     self.createUI()
     self.mapEvents()
     self.initiate()
     self.show()
开发者ID:vinay87,项目名称:oink,代码行数:22,代码来源:DailyPorker.py

示例5: __init__

# 需要导入模块: import MOSES [as 别名]
# 或者: from MOSES import getCategoryTree [as 别名]
    def __init__(self, user_id, password, start_date, end_date=None, category_tree=None, *args, **kwargs):
        """New version.
        """
        super(Porker, self).__init__(*args, **kwargs)
        self.mutex = QtCore.QMutex()
        self.condition = QtCore.QWaitCondition()

        self.user_id, self.password = user_id, password

        self.start_date = start_date
        self.stats_date = start_date
        self.stats_data = {}
        #Prepare a list of dates to process.
        r_span = 15
        doj = MOSES.getDOJ(self.user_id, self.password)
        db_origin = datetime.date(2015,1,1)
        if db_origin>= doj:
            db_origin_date = db_origin
        else:
            db_origin_date = doj

        self.process_dates = list(reversed(OINKM.getDatesBetween(db_origin_date, start_date))) + OINKM.getDatesBetween((start_date+datetime.timedelta(days=1)), (start_date+datetime.timedelta(days=r_span)))

        self.queue = []
        self.force_update_dates = []
        #Preload the category_tree.
        self.result_dictionary = {}

        if category_tree is not None:
            self.category_tree = category_tree
        else:
            self.category_tree = MOSES.getCategoryTree(self.user_id, self.password)


        if not self.isRunning():
            self.start(QtCore.QThread.LowPriority)
开发者ID:vinay87,项目名称:oink,代码行数:38,代码来源:Porker.py


注:本文中的MOSES.getCategoryTree方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。