Check your quota.
333373
def quota(ip=None):
    """"""
    # TODO: Add arbitrary user defined IP check
    url = 'http://www.random.org/quota/?format=plain'
    data = urlopen(url)
    credit = int(data.read().strip())
    if data.code == 200:
        return credit
    else:
        return "ERROR: Server responded with code %s" % data.code
1044996
def _check_limit(self):
        """"""

        # First compress
        self._compress()

        # Then check the max size
        if len(self._store) >= self._max_size:
            self._store.popitem(last=False)
848130
def _validate_quota(quota):
    '''
    
    '''
    if quota is not None:
        if not isinstance(quota, dict):
            raise TypeError('quota must be a dictionary, provided value: {0}'.format(quota))
        periods = ['DAY', 'WEEK', 'MONTH']
        if 'period' not in quota or quota['period'] not in periods:
            raise ValueError('quota must have a valid period specified, valid values are {0}'.format(','.join(periods)))
        if 'limit' not in quota:
            raise ValueError('quota limit must have a valid value')
1369130
def list(self, request, *args, **kwargs):
        
        return super(QuotaViewSet, self).list(request, *args, **kwargs)
1345375
def is_almost_full(self):
        """"""
        capacity = self.get_true_capacity()
        if capacity != -1:
            num_signed_up = self.eighthsignup_set.count()
            return num_signed_up >= (0.9 * capacity)
        return False
497562
def _pending_of(self, workload):
        """"""
        pending = sum(list(scope.values()).count(False) for scope in workload.values())
        return pending
420988
def _fill(self):
        """"""

        right_now = time.time()
        time_diff = right_now - self._last_fill
        if time_diff < 0:
            return

        self._count = min(
            self._count + self._fill_rate * time_diff,
            self._capacity,
        )
        self._last_fill = right_now
1157588
private void assertTargetsPerRolloutGroupQuota(final long requested) {
        final int quota = quotaManagement.getMaxTargetsPerRolloutGroup();
        QuotaHelper.assertAssignmentQuota(requested, quota, Target.class, RolloutGroup.class);
    }
368202
def process_data(self, file_info):
        """"""
        if self._has_reached_stop_limit():
            self.log.info("Remaining bytes in quota (%d) has reached minimum to request stop (%d)",
                          self._quota.remaining, self._stop_on_remaining)
            self.fire(events.TransmissionQuotaReached())
        elif not self._fits_in_quota(file_info):
            self.log.debug("File would exceed quota. Won't process '%s'", str(file_info))
        else:
            return file_info
        self.fire(events.FilteredFile(file_info))
80457
def delete_quota(self, tenant_id):
        '''
        
        '''
        ret = self.network_conn.delete_quota(tenant_id=tenant_id)
        return ret if ret else True
932331
def get_quota(self):
		''
		du, ds = op.itemgetter('space_used', 'space_amount')\
			((yield super(txBox, self).info_user()))
		defer.returnValue((ds - du, ds))
1130308
public function execute()
    {
        $i = 0;
        $quotas = array();
        foreach ($this->_filecontent as $thisline) {
            $thisline = preg_replace("/([\s]--)/", "", $thisline);
            $thisline = preg_split("/(\s)/", $thisline, -1, PREG_SPLIT_NO_EMPTY);
            if (count($thisline) == 7) {
                $quotas[$i]['user'] = str_replace("--", "", $thisline[0]);
                $quotas[$i]['byte_used'] = $thisline[1] * 1024;
                $quotas[$i]['byte_soft'] = $thisline[2] * 1024;
                $quotas[$i]['byte_hard'] = $thisline[3] * 1024;
                if ($thisline[3] != 0) {
                    $quotas[$i]['byte_percent_used'] = round((($quotas[$i]['byte_used'] / $quotas[$i]['byte_hard']) * 100), 1);
                } else {
                    $quotas[$i]['byte_percent_used'] = 0;
                }
                $quotas[$i]['file_used'] = $thisline[4];
                $quotas[$i]['file_soft'] = $thisline[5];
                $quotas[$i]['file_hard'] = $thisline[6];
                if ($thisline[6] != 0) {
                    $quotas[$i]['file_percent_used'] = round((($quotas[$i]['file_used'] / $quotas[$i]['file_hard']) * 100), 1);
                } else {
                    $quotas[$i]['file_percent_used'] = 0;
                }
                $i++;
            }
        }
        $this->_result = $quotas;
    }
322836
def update_available(self, name):
        """"""
        quota = self.usages.get(name, {}).get('quota', float('inf'))
        available = quota - self.usages[name]['used']
        if available < 0:
            available = 0
        self.usages[name]['available'] = available
661057
def check_jobs(jobs):
    """"""
    if jobs == 0:
        raise click.UsageError("Jobs must be >= 1 or == -1")
    elif jobs < 0:
        import multiprocessing

        jobs = multiprocessing.cpu_count()
    return jobs
1240469
def get_quota_remaining(self):
        """"""
        api = self._get_api(billing.DefaultApi)
        quota = api.get_service_package_quota()
        return None if quota is None else int(quota.quota)
1009039
function left() {
            if ( ! $this->is_active() || $this->is_expired() ) {
                return 0;
            }

            if ( $this->is_unlimited() ) {
                return 999;
            }

            return ( $this->quota - $this->activated - ( $this->is_free_localhost ? 0 : $this->activated_local ) );
        }
1014396
def is_quota_exceeded(self) -> bool:
        ''''''

        if self.quota and self._url_table is not None:
            return self.size >= self.quota and \
                   self._url_table.get_root_url_todo_count() == 0