當前位置: 首頁>>代碼示例>>Python>>正文


Python MOSES.getAuditCountForQuarter方法代碼示例

本文整理匯總了Python中MOSES.getAuditCountForQuarter方法的典型用法代碼示例。如果您正苦於以下問題:Python MOSES.getAuditCountForQuarter方法的具體用法?Python MOSES.getAuditCountForQuarter怎麽用?Python MOSES.getAuditCountForQuarter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在MOSES的用法示例。


在下文中一共展示了MOSES.getAuditCountForQuarter方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: fetchWriterSummary

# 需要導入模塊: import MOSES [as 別名]
# 或者: from MOSES import getAuditCountForQuarter [as 別名]
 def fetchWriterSummary(self, retry=None):
     if retry is not None:
         print "Retrying to fetch the data. (trial#%d)" %retry
     self.processingStep.emit("Getting article count for %s for %s." % (self.writer_name, self.end_date))
     article_count = MOSES.getArticleCount(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting average article count for %s between %s and %s." % (self.writer_name, self.start_date, self.end_date))
     a_article_count = MOSES.getArticleCountBetween(self.user_id, self.password, self.start_date, self.end_date, self.writer_id)
     self.processingStep.emit("Getting weekly article count for %s for %s." % (self.writer_name, self.end_date))
     w_article_count = MOSES.getArticleCountForWeek(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting monthly article count for %s for %s." % (self.writer_name, self.end_date))
     m_article_count = MOSES.getArticleCountForMonth(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting quarterly article count for %s for %s." % (self.writer_name, self.end_date))
     q_article_count = MOSES.getArticleCountForQuarter(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting quarterly article count for %s for %s." % (self.writer_name, self.end_date))
     hy_article_count = MOSES.getArticleCountForHalfYear(self.user_id, self.password, self.end_date, self.writer_id)
     
     self.processingStep.emit("Getting efficiency for %s for %s." % (self.writer_name, self.end_date))
     efficiency = MOSES.getEfficiencyFor(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting average efficiency for %s between %s and %s." % (self.writer_name, self.start_date, self.end_date))
     a_efficiency = MOSES.getEfficiencyForDateRange(self.user_id, self.password, self.start_date, self.end_date, self.writer_id)
     self.processingStep.emit("Getting weekly efficiency for %s for %s." % (self.writer_name, self.end_date))
     w_efficiency = MOSES.getEfficiencyForWeek(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting monthly efficiency for %s for %s." % (self.writer_name, self.end_date))
     m_efficiency = MOSES.getEfficiencyForMonth(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting quarterly efficiency for %s for %s." % (self.writer_name, self.end_date))
     q_efficiency = MOSES.getEfficiencyForQuarter(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting half-yearly efficiency for %s for %s." % (self.writer_name, self.end_date))
     hy_efficiency = MOSES.getEfficiencyForHalfYear(self.user_id, self.password, self.end_date, self.writer_id)
     
     self.processingStep.emit("Getting audit count for %s for %s." % (self.writer_name, self.end_date))
     audit_count = MOSES.getAuditCount(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting average audit count for %s between %s and %s." % (self.writer_name, self.start_date, self.end_date))
     a_audit_count = MOSES.getAuditCountBetween(self.user_id, self.password, self.start_date, self.end_date, self.writer_id)
     self.processingStep.emit("Getting weekly audit count for %s for %s." % (self.writer_name, self.end_date))
     w_audit_count = MOSES.getAuditCountForWeek(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting monthly audit count for %s for %s." % (self.writer_name, self.end_date))
     m_audit_count = MOSES.getAuditCountForMonth(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting quarterly audit count for %s for %s." % (self.writer_name, self.end_date))
     q_audit_count = MOSES.getAuditCountForQuarter(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting quarterly audit count for %s for %s." % (self.writer_name, self.end_date))
     hy_audit_count = MOSES.getAuditCountForHalfYear(self.user_id, self.password, self.end_date, self.writer_id)
     
     self.processingStep.emit("Getting CFM for %s for %s." % (self.writer_name, self.end_date))
     cfm = MOSES.getCFMFor(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting average CFM for %s between %s and %s." % (self.writer_name, self.start_date, self.end_date))
     a_cfm = MOSES.getCFMBetweenDates(self.user_id, self.password, self.start_date, self.end_date, self.writer_id)
     self.processingStep.emit("Getting weekly CFM for %s for %s." % (self.writer_name, self.end_date))
     w_cfm = MOSES.getCFMForWeek(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting monthly CFM for %s for %s." % (self.writer_name, self.end_date))
     m_cfm = MOSES.getCFMForMonth(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting quarterly CFM for %s for %s." % (self.writer_name, self.end_date))
     q_cfm = MOSES.getCFMForQuarter(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting quarterly CFM for %s for %s." % (self.writer_name, self.end_date))
     hy_cfm = MOSES.getCFMForHalfYear(self.user_id, self.password, self.end_date, self.writer_id)
     
     self.processingStep.emit("Getting GSEO for %s for %s." % (self.writer_name, self.end_date))
     gseo = MOSES.getGSEOFor(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting GSEO for %s between %s and %s." % (self.writer_name, self.start_date, self.end_date))
     a_gseo = MOSES.getGSEOBetweenDates(self.user_id, self.password, self.start_date, self.end_date, self.writer_id)
     self.processingStep.emit("Getting weekly GSEO for %s for %s." % (self.writer_name, self.end_date))
     w_gseo = MOSES.getGSEOForWeek(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting average GSEO for %s between %s and %s." % (self.writer_name, self.start_date, self.end_date))
     m_gseo = MOSES.getGSEOForMonth(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting quarterly GSEO for %s for %s." % (self.writer_name, self.end_date))
     q_gseo = MOSES.getGSEOForQuarter(self.user_id, self.password, self.end_date, self.writer_id)
     self.processingStep.emit("Getting half-yearly GSEO for %s for %s." % (self.writer_name, self.end_date))
     hy_gseo = MOSES.getGSEOForHalfYear(self.user_id, self.password, self.end_date, self.writer_id)
     
     self.processingStep.emit("Getting Team Leader Name for %s for %s." % (self.writer_name, self.end_date))
     writer_tl = MOSES.getReportingManager(self.user_id, self.password, query_user=self.writer_id, query_date=self.end_date)["Reporting Manager Name"]
     self.processingStep.emit("Getting Stack Rank Indices for %s for %s." % (self.writer_name, self.end_date))
     stack_rank_index = self.getStackRankIndex(efficiency, cfm, gseo)
     a_stack_rank_index = self.getStackRankIndex(a_efficiency, a_cfm, a_gseo)
     w_stack_rank_index = self.getStackRankIndex(w_efficiency, w_cfm, w_gseo)
     m_stack_rank_index = self.getStackRankIndex(m_efficiency, m_cfm, m_gseo)
     q_stack_rank_index = self.getStackRankIndex(q_efficiency, q_cfm, q_gseo)
     hy_stack_rank_index = self.getStackRankIndex(hy_efficiency, hy_cfm, hy_gseo)
     self.processingStep.emit("Building final writer stats data for %s for %s." % (self.writer_name, self.end_date))
     
     writer_summary = {
         "Report Date": self.end_date,
         "Writer ID": self.writer_id,
         "Writer Name": self.writer_name,
         "Writer Email ID": self.writer_email,
         "Reporting Manager": writer_tl,
         "Article Count": article_count,
         "Weekly Article Count": w_article_count,
         "Monthly Article Count": m_article_count,
         "Quarterly Article Count": q_article_count,
         "Half-Yearly Article Count": hy_article_count,
         "Average Article Count": a_article_count,
         "Efficiency": efficiency,
         "Weekly Efficiency": w_efficiency,
         "Monthly Efficiency": m_efficiency,
         "Quarterly Efficiency": q_efficiency,
         "Half-Yearly Efficiency": hy_efficiency,
         "Average Efficiency": a_efficiency,
         "Audit Count": audit_count,
         "Weekly Audit Count": w_audit_count,
         "Monthly Audit Count": m_audit_count,
#.........這裏部分代碼省略.........
開發者ID:vinay87,項目名稱:oink,代碼行數:103,代碼來源:PorkKent.py

示例2: fetchWriterSummary

# 需要導入模塊: import MOSES [as 別名]
# 或者: from MOSES import getAuditCountForQuarter [as 別名]

#.........這裏部分代碼省略.........
                    writer_summary["Average Efficiency KRA"] = self.getEffKRA(writer_summary["Average Efficiency"])
                except:
                    print writer_summary["Average Efficiency"]
        if ("Average Audit Count" in self.mode) or ("Average CFM" in self.mode) or ("Average GSEO" in self.mode) or ("Average Stack Rank Index" in self.mode) or ("Average CFM KRA" in self.mode) or ("Average GSEO KRA" in self.mode):
            writer_summary["Average Audit Count"] = MOSES.getAuditCountBetween(self.user_id, self.password, self.start_date, self.end_date, writer_id)
            if writer_summary["Average Audit Count"] > 0:
                if ("Average CFM" in self.mode) or ("Average Stack Rank Index" in self.mode) or ("Average CFM KRA" in self.mode) or ("Average GSEO" in self.mode) or ("Average Stack Rank Index" in self.mode)  or ("Average GSEO KRA" in self.mode):
                    writer_summary["Average CFM"], writer_summary["Average GSEO"], fatals = MOSES.getCFMGSEOBetweenDates(self.user_id, self.password, self.start_date, self.end_date, writer_id)
                    if type(writer_summary["Average CFM"])!= str:
                        writer_summary["Average CFM KRA"] = MOSES.getQKRA(writer_summary["Average CFM"])
                    if type(writer_summary["Average GSEO"])!= str:
                        writer_summary["Average GSEO KRA"] = MOSES.getQKRA(writer_summary["Average GSEO"])
                if ("Average Stack Rank Index" in self.mode):
                    writer_summary["Average Stack Rank Index"] = self.getStackRankIndex(writer_summary["Average Efficiency"], writer_summary["Average CFM"], writer_summary["Average GSEO"])
        
        if "Weekly Article Count" in self.mode:
            writer_summary["Weekly Article Count"] = MOSES.getArticleCountForWeek(self.user_id, self.password, self.start_date, writer_id)
        if ("Weekly Efficiency" in self.mode) or ("Weekly Stack Rank Index" in self.mode) or ("Weekly Efficiency KRA" in self.mode):
            writer_summary["Weekly Efficiency"] = MOSES.getEfficiencyForWeek(self.user_id, self.password, self.start_date, writer_id, self.category_tree)
            if (type(writer_summary["Weekly Efficiency"]) != str) and (not math.isnan(writer_summary["Weekly Efficiency"])):
                try:
                    writer_summary["Weekly Efficiency KRA"] = self.getEffKRA(writer_summary["Weekly Efficiency"])
                except:
                    print writer_summary["Weekly Efficiency"]
        if ("Weekly Audit Count" in self.mode) or ("Weekly CFM" in self.mode) or ("Weekly GSEO" in self.mode) or ("Weekly Stack Rank Index" in self.mode) or ("Weekly CFM KRA" in self.mode) or ("Weekly GSEO KRA" in self.mode):
            writer_summary["Weekly Audit Count"] = MOSES.getAuditCountForWeek(self.user_id, self.password, self.start_date, writer_id)
            if writer_summary["Weekly Audit Count"] > 0:
                if ("Weekly CFM" in self.mode) or ("Weekly Stack Rank Index" in self.mode) or ("Weekly CFM KRA" in self.mode) or ("Weekly GSEO" in self.mode) or ("Weekly Stack Rank Index" in self.mode) or ("Weekly GSEO KRA" in self.mode):
                    writer_summary["Weekly CFM"], writer_summary["Weekly GSEO"], fatals = MOSES.getCFMGSEOForWeek(self.user_id, self.password, self.start_date, writer_id)
                    if type(writer_summary["Weekly CFM"])!= str:
                        writer_summary["Weekly CFM KRA"] = self.getQKRA(writer_summary["Weekly CFM"])
                    if type(writer_summary["Weekly GSEO"])!= str:
                        writer_summary["Weekly GSEO KRA"] = self.getQKRA(writer_summary["Weekly GSEO"])
                if ("Weekly Stack Rank Index" in self.mode):
                    writer_summary["Weekly Stack Rank Index"] = self.getStackRankIndex(writer_summary["Weekly Efficiency"], writer_summary["Weekly CFM"], writer_summary["Weekly GSEO"])

        if "Monthly Article Count" in self.mode:
            writer_summary["Monthly Article Count"] = MOSES.getArticleCountForMonth(self.user_id, self.password, self.start_date, writer_id)
        if ("Monthly Efficiency" in self.mode) or ("Monthly Stack Rank Index" in self.mode) or ("Monthly Efficiency KRA" in self.mode):
            writer_summary["Monthly Efficiency"] = MOSES.getEfficiencyForMonth(self.user_id, self.password, self.start_date, writer_id, self.category_tree)
            if (type(writer_summary["Monthly Efficiency"]) != str) and (not math.isnan(writer_summary["Monthly Efficiency"])):
                try:
                    writer_summary["Monthly Efficiency KRA"] = self.getEffKRA(writer_summary["Monthly Efficiency"])
                except:
                    print writer_summary["Monthly Efficiency"]
        if ("Monthly Audit Count" in self.mode) or ("Monthly CFM" in self.mode) or ("Monthly GSEO" in self.mode) or ("Monthly Stack Rank Index" in self.mode) or ("Monthly CFM KRA" in self.mode) or ("Monthly GSEO KRA" in self.mode):
            writer_summary["Monthly Audit Count"] = MOSES.getAuditCountForMonth(self.user_id, self.password, self.start_date, writer_id)
            if writer_summary["Monthly Audit Count"] > 0:
                if ("Monthly CFM" in self.mode) or ("Monthly Stack Rank Index" in self.mode) or ("Monthly CFM KRA" in self.mode) or ("Monthly GSEO" in self.mode) or ("Monthly Stack Rank Index" in self.mode) or ("Monthly CFM KRA" in self.mode):
                    writer_summary["Monthly CFM"], writer_summary["Monthly GSEO"], fatals = MOSES.getCFMGSEOForMonth(self.user_id, self.password, self.start_date, writer_id)
                    if type(writer_summary["Monthly CFM"])!= str:
                        writer_summary["Monthly CFM KRA"] = self.getQKRA(writer_summary["Monthly CFM"])
                    if type(writer_summary["Monthly GSEO"])!= str:
                        writer_summary["Monthly GSEO KRA"] = self.getQKRA(writer_summary["Monthly GSEO"])

                if ("Monthly Stack Rank Index" in self.mode):
                    writer_summary["Monthly Stack Rank Index"] = self.getStackRankIndex(writer_summary["Monthly Efficiency"], writer_summary["Monthly CFM"], writer_summary["Monthly GSEO"])
        
        if "Quarterly Article Count" in self.mode:
            writer_summary["Quarterly Article Count"] = MOSES.getArticleCountForQuarter(self.user_id, self.password, self.start_date, writer_id)
        if ("Quarterly Efficiency" in self.mode) or ("Quarterly Stack Rank Index" in self.mode) or ("Quarterly Efficiency KRA" in self.mode):
            writer_summary["Quarterly Efficiency"] = MOSES.getEfficiencyForQuarter(self.user_id, self.password, self.start_date, writer_id, self.category_tree)
            if (type(writer_summary["Quarterly Efficiency"]) != str) and (not math.isnan(writer_summary["Quarterly Efficiency"])):
                try:
                    writer_summary["Quarterly Efficiency KRA"] = self.getEffKRA(writer_summary["Quarterly Efficiency"])
                except:
                    print writer_summary["Quarterly Efficiency"]
        if ("Quarterly Audit Count" in self.mode) or ("Quarterly CFM" in self.mode) or ("Quarterly GSEO" in self.mode) or ("Quarterly Stack Rank Index" in self.mode) or ("Quarterly CFM KRA" in self.mode) or ("Quarterly GSEO KRA" in self.mode):
            writer_summary["Quarterly Audit Count"] = MOSES.getAuditCountForQuarter(self.user_id, self.password, self.start_date, writer_id)
            if writer_summary["Quarterly Audit Count"] > 0:
                if ("Quarterly CFM" in self.mode) or ("Quarterly Stack Rank Index" in self.mode) or ("Quarterly CFM KRA" in self.mode) or ("Quarterly GSEO" in self.mode) or ("Quarterly Stack Rank Index" in self.mode) or ("Quarterly GSEO KRA" in self.mode):
                    writer_summary["Quarterly CFM"], writer_summary["Quarterly GSEO"], fatals = MOSES.getCFMGSEOForQuarter(self.user_id, self.password, self.start_date, writer_id)
                    if type(writer_summary["Quarterly CFM"])!= str:
                        writer_summary["Quarterly CFM KRA"] = self.getQKRA(writer_summary["Quarterly CFM"])
                    if type(writer_summary["Quarterly GSEO"])!= str:
                        writer_summary["Quarterly GSEO KRA"] = self.getQKRA(writer_summary["Quarterly GSEO"])
                if ("Quarterly Stack Rank Index" in self.mode):
                    writer_summary["Quarterly Stack Rank Index"] = self.getStackRankIndex(writer_summary["Quarterly Efficiency"], writer_summary["Quarterly CFM"], writer_summary["Quarterly GSEO"])
        
        if "Half-Yearly Article Count" in self.mode:
            writer_summary["Half-Yearly Article Count"] = MOSES.getArticleCountForHalfYear(self.user_id, self.password, self.start_date, writer_id)
        if ("Half-Yearly Efficiency" in self.mode) or ("Half-Yearly Stack Rank Index" in self.mode) or ("Half-Yearly Efficiency KRA" in self.mode):
            writer_summary["Half-Yearly Efficiency"] = MOSES.getEfficiencyForHalfYear(self.user_id, self.password, self.start_date, writer_id, self.category_tree)
            if (type(writer_summary["Half-Yearly Efficiency"]) != str) and (not math.isnan(writer_summary["Half-Yearly Efficiency"])):
                try:
                    writer_summary["Half-Yearly Efficiency KRA"] = self.getEffKRA(writer_summary["Half-Yearly Efficiency"])
                except:
                    print writer_summary["Half-Yearly Efficiency"]
        if ("Half-Yearly Audit Count Count" in self.mode) or ("Half-Yearly CFM" in self.mode) or ("Half-Yearly GSEO" in self.mode) or ("Half-Yearly Stack Rank Index" in self.mode) or ("Half-Yearly CFM KRA" in self.mode) or ("Half-Yearly GSEO KRA" in self.mode):
            writer_summary["Half-Yearly Audit Count"] = MOSES.getAuditCountForHalfYear(self.user_id, self.password, self.start_date, writer_id)
            if writer_summary["Half-Yearly Audit Count"] > 0:
                if ("Half-Yearly CFM" in self.mode) or ("Half-Yearly Stack Rank Index" in self.mode) or ("Half-Yearly CFM KRA" in self.mode):
                    writer_summary["Half-Yearly CFM"], writer_summary["Half-Yearly GSEO"], fatals = MOSES.getCFMGSEOForHalfYear(self.user_id, self.password, self.start_date, writer_id)
                    if type(writer_summary["Half-Yearly CFM"])!= str:
                        writer_summary["Half-Yearly CFM KRA"] = self.getQKRA(writer_summary["Half-Yearly CFM"])
                    if type(writer_summary["Half-Yearly GSEO"])!= str:
                        writer_summary["Half-Yearly GSEO KRA"] = self.getQKRA(writer_summary["Half-Yearly GSEO"])
                if ("Half-Yearly Stack Rank Index" in self.mode):
                    writer_summary["Half-Yearly Stack Rank Index"] = self.getStackRankIndex(writer_summary["Half-Yearly Efficiency"], writer_summary["Half-Yearly CFM"], writer_summary["Half-Yearly GSEO"])
        return writer_summary
開發者ID:vinay87,項目名稱:oink,代碼行數:104,代碼來源:PorkLane.py


注:本文中的MOSES.getAuditCountForQuarter方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。