Iterate keys at specified depth.
186976
def keys_at(self, depth, counter=1):
        
        if depth < 1:
            yield ROOT
        else:
            if counter == depth:
                for key in self.keys():
                    yield key
            else:
                counter += 1
                for dict_tree in self.values():
                    for key in dict_tree.keys_at(depth, counter):
                        yield key
814309
def iteritems(self, pattern="*"):
        """"""
        for key in self.keys(pattern):
            yield (key, self[key])
457659
def keys(self):
    """"""
    columns = set()
    for name in vars(self):
      if (not name) or name[0] == "_":
        continue
      columns.add(name)
    return columns
868645
private Iterable<String> getAllIncluding(String index, Iterable<String> keys, IterableChain<String> result) {
        result.addAll(keys);
        for (String key : keys) {
            Iterable<String> values = get(index, key);
            if (values.iterator().hasNext()) {
                getAllIncluding(index, values, result);
            }
        }
        return result;
    }
404270
def cast(keys, data):
        """"""
        matrix = Matrix()
        matrix.keys = keys
        matrix.data = data
        return matrix
806911
def recursively_update(d, d2):
  """"""
  for k, v in d2.items():
    if k in d:
      if isinstance(v, dict):
        recursively_update(d[k], v)
        continue
    d[k] = v
819462
def get_dict_key(data, key):
    '''  '''

    if isinstance(data, Mapping):
        if key in data:
            yield data[key]
        for key_data in data.values():
            for found in get_dict_key(key_data, key):
                yield found
385046
def _keys_via_value_nonrecur(d,v):
    '''
        
    '''
    rslt = []
    for key in d:
        if(d[key] == v):
            rslt.append(key)
    return(rslt)
867264
def keys_at(self, x):
		
		return [key for key, segs in self.items() if x in segs]
659519
def iteritems(self):
        ''''''
        for x in range(len(self.keys)):
            yield (self.keys[x], self.values[x])
682945
def keys(self, namespace, prefix=None, limit=None, offset=None):
        """"""
        params = [namespace]
        query = 'SELECT key FROM gauged_keys WHERE namespace = %s'
        if prefix is not None:
            query += ' AND key LIKE %s'
            params.append(prefix + '%')
        if limit is not None:
            query += ' LIMIT %s'
            params.append(limit)
        if offset is not None:
            query += ' OFFSET %s'
            params.append(offset)
        cursor = self.cursor
        cursor.execute(query, params)
        return [key for key, in cursor]
149829
def find_for_x_in_y_keys(node):
    """"""
    return (
        isinstance(node, ast.For)
        and h.call_name_is(node.iter, 'keys')
    )
60071
def key_expand(key, Nk=4):
    """"""
    assert Nk in {4, 6, 8}
    Nr = Nk + 6

    key = key.reshape(Nk, 32)
    rkey = exprzeros(4*(Nr+1), 32)

    for i in range(Nk):
        rkey[i] = key[i]

    for i in range(Nk, 4*(Nr+1)):
        if i % Nk == 0:
            rkey[i] = rkey[i-Nk] ^ subword(rotword(rkey[i-1])) ^ RCON[i//Nk].zext(32-8)
        elif Nk > 6 and i % Nk == 4:
            rkey[i] = rkey[i-Nk] ^ subword(rkey[i-1])
        else:
            rkey[i] = rkey[i-Nk] ^ rkey[i-1]

    return rkey
941049
def items_at(self, depth):
        
        if depth < 1:
            yield ROOT, self
        elif depth == 1:
            for key, value in self.items():
                yield key, value
        else:
            for dict_tree in self.values():
                for key, value in dict_tree.items_at(depth - 1):
                    yield key, value
838895
def nextKey(self, key):
        """"""
        ans = self.nextNode(key)
        return (ans.key
                if ans is not None
                else None)
554685
def at_depth(depth , *strings)
      prefix = " " * 2 * depth
      strings.collect{|str| prefix + str}.join("\n")
    end
47877
function(collection, cb) {
    _iterate(collection, cb, function(val, key) {
      cb(val, key);
    });
  }