Aggregate lookup parameters.
764614
def aggregate(self, kwargs):
        ''''''
        meta = self._meta
        fields = meta.dfields
        field_lookups = {}
        for name, value in iteritems(kwargs):
            bits = name.split(JSPLITTER)
            field_name = bits.pop(0)
            if field_name not in fields:
                raise QuerySetError('Could not filter on model "{0}".\
 Field "{1}" does not exist.'.format(meta, field_name))
            field = fields[field_name]
            attname = field.attname
            lookup = None
            if bits:
                bits = [n.lower() for n in bits]
                if bits[-1] == 'in':
                    bits.pop()
                elif bits[-1] in range_lookups:
                    lookup = bits.pop()
                remaining = JSPLITTER.join(bits)
                if lookup:  # this is a range lookup
                    attname, nested = field.get_lookup(remaining,
                                                       QuerySetError)
                    lookups = get_lookups(attname, field_lookups)
                    lookups.append(lookup_value(lookup, (value, nested)))
                    continue
                elif remaining:   # Not a range lookup, must be a nested filter
                    value = field.filter(self.session, remaining, value)
            lookups = get_lookups(attname, field_lookups)
            # If we are here the field must be an index
            if not field.index:
                raise QuerySetError("%s %s is not an index. Cannot query." %
                                    (field.__class__.__name__, field_name))
            if not iterable(value):
                value = (value,)
            for v in value:
                if isinstance(v, Q):
                    v = lookup_value('set', v.construct())
                else:
                    v = lookup_value('value', field.serialise(v, lookup))
                lookups.append(v)
        #
        return [queryset(self, name=name, underlying=field_lookups[name])
                for name in sorted(field_lookups)]
270116
def update_params(self, token, match):
        """"""
        for k, v in self.params.items():
            if isinstance(v, MatchGroup):
                self.params[k] = v.get_group_value(token, match)
1083096
def _aggregate(df, by):
    """"""
    by = [by] if isstr(by) else by
    cols = [c for c in list(df.columns) if c not in ['value'] + by]
    return df.groupby(cols).sum()['value']
1250798
public static ZParams.Aggregate getAggregate(ZParams params) {
		Collection<byte[]> collect = params.getParams();
		Iterator<byte[]> iterator = collect.iterator();
		String key = new String(iterator.next());
		if (!"aggregate".equals(key)) {
			return ZParams.Aggregate.SUM;
		}
		String type = new String(iterator.next());
		return ZParams.Aggregate.valueOf(type);
	}
810959
def aggregate(self, dimensions=None, function=None, spreadfn=None, **kwargs):
        
        kwargs['_method_args'] = (dimensions, function, spreadfn)
        return self.__call__('aggregate', **kwargs)
946647
def aggregate(self, On=None, AggFuncDict=None, AggFunc=None, AggList =
                  None, returnsort=False,KeepOthers=True, keyfuncdict=None):
        
        if returnsort:
            [data, s] = spreadsheet.aggregate(X=self, 
                     On=On, 
                     AggFuncDict=AggFuncDict, 
                     AggFunc=AggFunc, 
                     AggList=AggList, 
                     returnsort=returnsort, 
                     keyfuncdict=keyfuncdict)
        else:
            data = spreadsheet.aggregate(X=self, On=On, AggFuncDict=AggFuncDict, 
                     AggFunc=AggFunc, AggList = AggList, returnsort=returnsort, 
                     KeepOthers=KeepOthers,
                     keyfuncdict=keyfuncdict)
        data = data.view(tabarray)
        data.coloring = self.coloring
        if returnsort:
            return [data, s]
        else:
            return data
571067
def aggregate(self, query: Optional[dict] = None,
                  group: Optional[dict] = None,
                  order_by: Union[None, list, tuple] = None) -> list:
        """"""
        raise NotImplementedError
46222
def aggregate_sum(aggr)
      sum = {}
      aggr.each do |ts, counterVals|
        sum[ts] = {} unless sum.has_key?ts
        counterVals.each do |obj, count|
          if obj.respond_to?(:enterprise_id)
            eid = obj.public_send(:enterprise_id).to_s
            sum[ts][eid] = sum[ts].fetch(eid, 0) + count
          end
        end
      end
      sum
    end
1162656
def aggregate(self, other=None):
        ''''''
        if not self.status:
            return self
        if not other:
            return self
        if not other.status:
            return other
        return Value(True, other.index, self.value + other.value, None)
281208
def _find_usage_parameter_groups(self):
        """"""
        num_groups = 0

        paginator = self.conn.get_paginator('describe_cache_parameter_groups')
        for page in paginator.paginate():
            for group in page['CacheParameterGroups']:
                num_groups += 1
        self.limits['Parameter Groups']._add_current_usage(
            num_groups,
            aws_type='AWS::ElastiCache::ParameterGroup'
        )
287593
def _use_aggregation(self, agg, columns=None):
        """"""
        if not columns:
            columns = self._columns
        from pyspark.sql import functions as F
        aggs = map(lambda column: agg(column).alias(column), self._columns)
        aggRdd = self._grouped_spark_sql.agg(*aggs)
        df = DataFrame.from_schema_rdd(aggRdd, self._by)
        return df
581378
def _getParameters(self):
        """"""
        param = self.query._getParameters()
        key = self.__PATTERN_KEY % (str(self._getIndex()))
        val = self.__PATTERN_VALUE % (self.__column, self.__value)
        #self.__column.getColumnAlias()
        param.update({key:val})
        return param
1270281
def _lookup(self, dot_name, contexts):
        """"""

        # process filters
        filters = [x for x in map(lambda x: x.strip(), dot_name.split('|'))]
        dot_name = filters[0]
        filters = filters[1:]

        # should support paths like '../../a.b.c/../d', etc.
        if not dot_name.startswith('.'):
            dot_name = './' + dot_name

        paths = dot_name.split('/')
        last_path = paths[-1]

        # path like '../..' or ./../. etc.
        refer_context = last_path == '' or last_path == '.' or last_path == '..'
        paths = paths if refer_context else paths[:-1]

        # count path level
        level = 0
        for path in paths:
            if path == '..':
                level -= 1
            elif path != '.':
                # ../a.b.c/.. in the middle
                level += len(path.strip('.').split('.'))

        names = last_path.split('.')

        # fetch the correct context
        if refer_context or names[0] == '':
            try:
                value = contexts[level-1]
            except:
                value = None
        else:
            # support {{a.b.c.d.e}} like lookup
            value = lookup(names[0], contexts, level)

        # lookup for variables
        if not refer_context:
            for name in names[1:]:
                try:
                    # a.num (a.1, a.2) to access list
                    index = parse_int(name)
                    name = parse_int(name) if isinstance(value, (list, tuple)) else name
                    value = value[name]
                except:
                    # not found
                    value = None
                    break;

        # apply filters
        for f in filters:
            try:
                func = self.root.filters[f]
                value = func(value)
            except:
                continue

        return value
1236591
def aggregate(self, key, aggregate, start=None, end=None,
                  namespace=None, percentile=None):
        """"""
        return self.make_context(key=key, aggregate=aggregate, start=start,
                                 end=end, namespace=namespace,
                                 percentile=percentile).aggregate()
692913
def getparams(self, result):
        """"""

        for key in self._cache:
            if self._cache[key][2] == result:
                args, kwargs, _ = self._cache[key]
                return args, kwargs

        else:
            raise ValueError('Result is not cached')
402258
protected void aggregateSpecial(T value, int bin) {
    final T exist = getSpecial(bin);
    // Note: do not inline above accessor, as getSpecial will initialize the
    // special variable used below!
    special[bin] = aggregate(exist, value);
  }
368161
private Double aggregate(Datasource ds, Collection<Double> values) {
        return ((values.size() / m_intervalsPer) > ds.getXff()) ? ds.getAggregationFuction().apply(values) : Double.NaN;
    }