예제 #1
0
 def gen_stat_users(self):
     stat_time = StatTime(self.start_day, self.end_day)
     for usr, play_info in self.users_info.users.items():
         count_with_indx = play_info.count_with_index()
         for index, count in count_with_indx.items():
             stat_time.stat_count_by_index(int(index))
     return stat_time
예제 #2
0
 def gen_stat_users(self):
     stat_time = StatTime(self.start_day, self.end_day)
     for usr, play_info in self.users_info.users.items():
         count_with_indx = play_info.count_with_index()
         for index, count in count_with_indx.items():
             stat_time.stat_count_by_index(int(index))
     return stat_time
예제 #3
0
    def gen_stat_users_by_model_per_day(self):
        models = {}
        for usr, play_info in self.users_info.users.items():
            m = usr[0:24]
            count_with_indx = play_info.count_with_index()
            stat_time = None
            if m in models:
                stat_time = models[m]
            else:
                stat_time = StatTime(self.start_day, self.end_day)
                models[m] = stat_time

            for index, count in count_with_indx.items():
                stat_time.stat_count_by_index(int(index))

        return models
예제 #4
0
    def gen_stat_users_by_model_per_day(self):
        models = {}
        for usr, play_info in self.users_info.users.items():
            m = usr[0:24]
            count_with_indx = play_info.count_with_index()
            stat_time = None
            if m in models:
                stat_time = models[m]
            else:
                stat_time = StatTime(self.start_day, self.end_day)
                models[m] = stat_time

            for index, count in count_with_indx.items():
                stat_time.stat_count_by_index(int(index))

        return models
예제 #5
0
 def gen_stat_count_by_vender_per_day(self):
     from common.vender_info import vender_dict
     venders = {}
     for usr, play_info in self.users_info.users.items():
         infos = play_info.count_with_index_and_vender()
         for index, vender_info in infos.items():
             for vender, count in vender_info.items():
                 if vender in vender_dict:
                     vender = vender_dict[vender]
                 stat_time = None
                 if vender in venders:
                     stat_time = venders[vender]
                 else:
                     stat_time = StatTime(self.start_day, self.end_day)
                     venders[vender] = stat_time
                 stat_time.stat_count_by_index(int(index), count)
     return venders
예제 #6
0
 def gen_stat_count_by_vender_per_day(self):
     from common.vender_info import vender_dict
     venders = {}
     for usr, play_info in self.users_info.users.items():
         infos = play_info.count_with_index_and_vender()
         for index, vender_info in infos.items():
             for vender, count in vender_info.items():
                 if vender in vender_dict:
                     vender = vender_dict[vender]
                 stat_time = None
                 if vender in venders:
                     stat_time = venders[vender]
                 else:
                     stat_time = StatTime(self.start_day, self.end_day)
                     venders[vender] = stat_time
                 stat_time.stat_count_by_index(int(index), count)
     return venders