Get the overall Unsplash stats for the past 30 days.

        :return [Stat]: The Unsplash Stat.
6174
def month(self):
        
        url = "/stats/month"
        result = self._get(url)
        return StatModel.parse(result)
581799
def get_summary(self):
        
        return {
            "count": self.count(),
            "pass": self.success_count(),
            "fail": self.failure_count(),
            "skip": self.skip_count(),
            "inconclusive": self.inconclusive_count(),
            "retries": self.retry_count(),
            "duration": self.total_duration()
        }
873680
def get_stats_action(cachespec, interval):
    
    if cachespec == 'global':
        caches = get_bcache_fs()
    else:
        caches = [Bcache.fromdevice(cachespec)]
    res = dict((c.cachepath, c.get_stats(interval)) for c in caches)
    return json.dumps(res, indent=4, separators=(',', ': '))
616915
def stat(path, hours, offset=None):
    
    return os.stat(path).st_mtime < (time.time() - _to_sec(hours))
619448
def getStats(self):
        
        stats = protocol.ReadStats()
        stats.aligned_read_count = self._numAlignedReads
        stats.unaligned_read_count = self._numUnalignedReads
        return stats
132257
def _get_active_stats(self, app_stats):
        
        stats = {}
        app_keys = [
            "active_scheduled_host_check_stats",
            "active_scheduled_service_check_stats",
            "active_ondemand_host_check_stats",
            "active_ondemand_service_check_stats",
        ]
        for app_key in app_keys:
            if app_key not in app_stats.keys():
                continue

            splitted = app_key.split("_")
            metric = "%ss.%s_%s" % (splitted[2], splitted[0], splitted[1])
            (x01, x05, x15) = self._convert_tripplet(app_stats[app_key])
            stats["%s.01" % (metric)] = x01
            stats["%s.05" % (metric)] = x05
            stats["%s.15" % (metric)] = x15

        return stats
1110106
def _get_cached_stats(self, app_stats):
        
        stats = {}
        app_keys = [
            "cached_host_check_stats",
            "cached_service_check_stats",
        ]
        for app_key in app_keys:
            if app_key not in app_stats.keys():
                continue

            (x01, x05, x15) = self._convert_tripplet(app_stats[app_key])
            scratch = app_key.split("_")[1]
            stats["%ss.cached.01" % (scratch)] = x01
            stats["%ss.cached.05" % (scratch)] = x05
            stats["%ss.cached.15" % (scratch)] = x15

        return stats
1093223
def _GetStat(self):
    
    stat_object = vfs_stat.VFSStat()

    if self._compressed_stream:
      stat_object.size = self._compressed_stream.get_size()

    stat_object.type = self.entry_type

    return stat_object
146250
def stats():
    '''
    
    '''
    ret = {}
    out = __salt__['cmd.run']('quotastats').splitlines()
    for line in out:
        if not line:
            continue
        comps = line.split(': ')
        ret[comps[0]] = comps[1]

    return ret
1156871
def stats(self):
        '''
        
        '''
        last_event = list(filter(lambda x: 'event' in x and x['event'] == 'playbook_on_stats',
                                 self.events))
        if not last_event:
            return None
        last_event = last_event[0]['event_data']
        return dict(skipped=last_event['skipped'],
                    ok=last_event['ok'],
                    dark=last_event['dark'],
                    failures=last_event['failures'],
                    processed=last_event['processed'])
518250
def lately(self, count=15):
        
        excludes = '|'.join(('*.pyc', '*.swp', '*.bak', '*~'))
        cmd = ('''find . -printf "%%T@ %%p\\n" '''
               '''| egrep -v '%s' '''
               '''| sort -n '''
               '''| tail -n %d''') % (excludes, count)
        op = self.sh(cmd, shell=True)
        for l in op.split('\n'):
            l = l.strip()
            if not l:
                continue
            mtime, fname = l.split(' ', 1)
            mtime = datetime.datetime.fromtimestamp(float(mtime))
            mtimestr = dtformat(mtime)
            yield mtimestr, fname
943879
def get_page_statistics(self, page_id, begin_date, end_date):
        
        res = self._post(
            'shakearound/statistics/page',
            data={
                'page_id': page_id,
                'begin_date': self._to_timestamp(begin_date),
                'end_date': self._to_timestamp(end_date),
            },
            result_processor=lambda x: x['data']
        )
        return res
1078809
def total(self):
        
        url = "/stats/total"
        result = self._get(url)
        return StatModel.parse(result)
1095876
def get_days_since_last_modified(filename):
        
        now = datetime.now()
        last_modified = datetime.fromtimestamp(os.path.getmtime(filename))
        return (now - last_modified).days
185102
def _GetStat(self):
    
    stat_object = super(BDEFileEntry, self)._GetStat()

    stat_object.size = self._bde_volume.get_size()

    return stat_object
102521
def statement(self, days=60):
        
        parsed = self.download_parsed(days=days)
        return parsed.account.statement
1050729
def get_stats(self):
        
        sent = ctypes.c_uint32()
        recv = ctypes.c_uint32()
        send_errors = ctypes.c_uint32()
        recv_errors = ctypes.c_uint32()
        result = self.library.Par_GetStats(self.pointer, ctypes.byref(sent),
                                   ctypes.byref(recv),
                                   ctypes.byref(send_errors),
                                   ctypes.byref(recv_errors))
        check_error(result, "partner")
        return sent, recv, send_errors, recv_errors