Get the bucket values attribute.
357956
@SuppressWarnings("unchecked")
	private List<Long> getBucketsValues(final Stopwatch stopwatch) {
		return (List<Long>) stopwatch.getAttribute(ATTR_NAME_BUCKETS_VALUES);
	}
1361939
private int getLargestBucketId() {
        int max = 0;
        int rememberId = -1;
        for (int i = 0; i < numberOfBuckets; i++) {
            Bucket<Data> oldBucket = bucketContainer.getBucket(i);
            if (oldBucket.elementsInBucket > max) {
                max = oldBucket.elementsInBucket;
                rememberId = oldBucket.getBucketId();
            }
        }
        return rememberId;
    }
356771
def get_bucket(self, environment, name, filename, source):
        
        key = self.get_cache_key(name, filename)
        checksum = self.get_source_checksum(source)
        bucket = Bucket(environment, key, checksum)
        self.load_bytecode(bucket)
        return bucket
352628
def get(cls, bucket, key, upload_id, with_completed=False):
        """"""
        q = cls.query.filter_by(
            upload_id=upload_id,
            bucket_id=as_bucket_id(bucket),
            key=key,
        )
        if not with_completed:
            q = q.filter(cls.completed.is_(False))

        return q.one_or_none()
84144
def get_prefix(self):
        """"""
        prefix = self.bucket
        if self.prefix:
            prefix += self.separator + self.prefix
        return prefix
132070
def get_bucket(self, name):
        ""
        for bucket in self:
            for k,v in self[bucket].items():
                if k == name:
                    return bucket
907724
def get(self, key):

    

    try:
      try:
        obj = self.bucket.get(key)
      except:
        raise

      return dict(obj or {})

    except:
      raise
1184002
def get_attributes(name, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
    retries = 30

    while retries:
        try:
            lbattrs = conn.get_all_lb_attributes(name)
            ret = odict.OrderedDict()
            ret['access_log'] = odict.OrderedDict()
            ret['cross_zone_load_balancing'] = odict.OrderedDict()
            ret['connection_draining'] = odict.OrderedDict()
            ret['connecting_settings'] = odict.OrderedDict()
            al = lbattrs.access_log
            czlb = lbattrs.cross_zone_load_balancing
            cd = lbattrs.connection_draining
            cs = lbattrs.connecting_settings
            ret['access_log']['enabled'] = al.enabled
            ret['access_log']['s3_bucket_name'] = al.s3_bucket_name
            ret['access_log']['s3_bucket_prefix'] = al.s3_bucket_prefix
            ret['access_log']['emit_interval'] = al.emit_interval
            ret['cross_zone_load_balancing']['enabled'] = czlb.enabled
            ret['connection_draining']['enabled'] = cd.enabled
            ret['connection_draining']['timeout'] = cd.timeout
            ret['connecting_settings']['idle_timeout'] = cs.idle_timeout
            return ret
        except boto.exception.BotoServerError as e:
            if e.error_code == 'Throttling':
                log.debug("Throttled by AWS API, will retry in 5 seconds...")
                time.sleep(5)
                retries -= 1
                continue
            log.error('ELB %s does not exist: %s', name, e.message)
            return {}
    return {}
315510
def list_buckets(self, offset=0, limit=100):
        """"""
        # TODO: If limit > 100, do multiple fetches
        if limit > 100:
            raise Exception("Zenobase can't handle limits over 100")
        return self._get("/users/{}/buckets/?order=label&offset={}&limit={}".format(self.client_id, offset, limit))
577521
def _zip(self) -> ObjectValue:
        """"""
        res = ObjectValue(self.siblings.copy(), self.timestamp)
        res[self.name] = self.value
        return res
5185
def sorted_files_from_bucket(bucket, keys=None):
    
    keys = keys or []
    total = len(keys)
    sortby = dict(zip(keys, range(total)))
    values = ObjectVersion.get_by_bucket(bucket).all()
    return sorted(values, key=lambda x: sortby.get(x.key, total))
828633
def get_bucket_list():
    
    args = parser.parse_args()
    for b in s3_conn(args.aws_access_key_id, args.aws_secret_access_key).get_all_buckets():
        print(''.join([i if ord(i) < 128 else ' ' for i in b.name]))
758446
def GetAttributes(self, urns, age=NEWEST_TIME):
    """"""
    urns = set([utils.SmartUnicode(u) for u in urns])
    to_read = {urn: self._MakeCacheInvariant(urn, age) for urn in urns}

    # Urns not present in the cache we need to get from the database.
    if to_read:
      for subject, values in data_store.DB.MultiResolvePrefix(
          to_read,
          AFF4_PREFIXES,
          timestamp=self.ParseAgeSpecification(age),
          limit=None):

        # Ensure the values are sorted.
        values.sort(key=lambda x: x[-1], reverse=True)

        yield utils.SmartUnicode(subject), values
510774
def get_vals(self, field, goids=None):
        """"""
        go2nt = self.go2nt
        if goids is None:
            goids = set(go2nt)
        return [getattr(go2nt[go], field) for go in goids]
180926
def persistentValues(self):
        
        return dict((k, getattr(self, k)) for (k, attr) in self.getSchema())
259565
def buckets(bucket=None, account=None, matched=False, kdenied=False,
            errors=False, dbpath=None, size=None, denied=False,
            format=None, incomplete=False, oversize=False, region=(),
            not_region=(), inventory=None, output=None, config=None, sort=None,
            tagprefix=None, not_bucket=None):
    """"""

    d = db.db(dbpath)

    if tagprefix and not config:
        raise ValueError(
            "account tag value inclusion requires account config file")

    if config and tagprefix:
        with open(config) as fh:
            data = json.load(fh).get('accounts')
            account_data = {}
            for a in data:
                for t in a['tags']:
                    if t.startswith(tagprefix):
                        account_data[a['name']] = t[len(tagprefix):]

    buckets = []
    for b in sorted(d.buckets(account),
                    key=operator.attrgetter('bucket_id')):
        if bucket and b.name not in bucket:
            continue
        if not_bucket and b.name in not_bucket:
            continue
        if matched and not b.matched:
            continue
        if kdenied and not b.keys_denied:
            continue
        if errors and not b.error_count:
            continue
        if size and b.size < size:
            continue
        if inventory and not b.using_inventory:
            continue
        if denied and not b.denied:
            continue
        if oversize and b.scanned <= b.size:
            continue
        if incomplete and b.percent_scanned >= incomplete:
            continue
        if region and b.region not in region:
            continue
        if not_region and b.region in not_region:
            continue
        if tagprefix:
            setattr(b, tagprefix[:-1], account_data[b.account])
        buckets.append(b)

    if sort:
        key = operator.attrgetter(sort)
        buckets = list(reversed(sorted(buckets, key=key)))
    formatter = format == 'csv' and format_csv or format_plain
    keys = tagprefix and (tagprefix[:-1],) or ()
    formatter(buckets, output, keys=keys)
1122328
private boolean bucketsEmpty() {
        for (int i = 0; i < numberOfBuckets; i++) {
            if (bucketContainer.getBucket(i).elementsInBucket > 0) {
                return false;
            }
        }
        return true;
    }