Iterates over all mappings


        Yields
        ------
        (int,Mapping)
            The next pair (index, mapping)
432057
def iteritems(self):
        
        for m in self.mappings:
            yield self.indexes[m.clause][m.target], m
1327277
public Iterable<String> get(String index, Iterable<String> keys) {
        Multimap<String, String> mmap = get(index);
        IterableChain<String> result = new IterableChain<String>();
        for (String key : keys) {
            result.addAll(mmap.get(key));
        }
        return result;
    }
372218
def iter(self, obj=None):
        ''
        if obj is None and vd:
            obj = vd.sheet

        for o in self._mappings(obj):
            for k in self.keys():
                for o2 in self[k]:
                    if o == o2:
                        yield (k, o), self[k][o2]
80705
def from_mapping(self, *mapping, **kwargs):
        
        mappings = []
        if len(mapping) == 1:
            if hasattr(mapping[0], 'items'):
                mappings.append(mapping[0].items())
            else:
                mappings.append(mapping[0])
        elif len(mapping) > 1:
            raise TypeError('expected at most 1 positional argument, got %d' % len(mapping))

        mappings.append(kwargs.items())
        for mapping in mappings:
            for key, value in mapping:
                if key.isupper():
                    self[key] = value
        return True
865419
def iteritems(self, indices=None):
        ''
        if indices is None:
            indices = force_list(self.indices.keys())
        for x in self.itervalues(indices):
            yield x
912911
def update_mapping(self):
        
        """
        self.mapping = dict([(f.name, f) for f in iter(self)])
1128782
def skip(mapping):
    
    found = set()
    for m in mapping:
        matched_atoms = set(m.values())
        if found.intersection(matched_atoms):
            continue
        found.update(matched_atoms)
        yield m
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;
    }
929509
def _lazy_turbo_mapping(initial, pre_size):
    '''
    
    '''
    size = pre_size or (2 * len(initial)) or 8
    buckets = size * [None]
    if not isinstance(initial, colls.Mapping): initial = dict(initial)
    for k, v in six.iteritems(initial):
        h = hash(k)
        index = h % size
        bucket = buckets[index]
        if bucket: bucket.append((k, v))
        else:      buckets[index] = [(k, v)]
    return LazyPMap(len(initial), ps.pvector().extend(buckets))
211631
def pairwise(values):
    
    i = iter(values)
    a = next(i)

    for b in i:
        yield (a, b)
        a = b
403219
def map(cls, iterable, func, *a, **kw):
    

    return cls(func(x, *a, **kw) for x in iterable)
186165
def map_recursive(function, iterable):
    
    if isiterable(iterable):
        dataOut = iterable.__class__()
        for i in iterable:
            if isinstance(dataOut, dict):
                dataOut[i] = map_recursive(function, iterable[i])
            else:
                # convert to list and append
                if not isinstance(dataOut, list):
                    dataOut = list(dataOut)
                dataOut.append(map_recursive(function, i))
        return dataOut
    return function(iterable)
485359
function getNextVal(searchVal, mapping) {
  let value
  if (isMap(mapping)) {
    for (let [key, val] of mapping.entries()) {
      if (deepEqual(key, searchVal)) {
        value = val
        break
      }
    }
  } else {
    value = (mapping.find(keyVal => deepEqual(keyVal[0], searchVal)) || [])[1]
  }

  if (typeof value === 'function') {
    return value()
  }
  return value
}
1322100
def each_tile_with_index level
			idx = 0
			size = tile_size level
			(0...size).each do |y|
				(0...size).each do |x|
					yield(x, y, idx) if block_given?
					idx += 1
				end
			end
		end
816746
private Pair<Integer, Integer> indexToEdgeBijection(long index) {
        long i = (long) Math.ceil((Math.sqrt(1 + 8 * (index + 1)) - 1) / 2);
        long diff = index + 1 - (i * (i - 1)) / 2;

        return Pair.of((int) i, (int) diff - 1);
    }
981846
@Override
	public CallSequence get(int index)
	{
		if (indics == null)
		{
			size();
		}
		Pair<Integer, Integer> v = indics.get(index);

		int r = v.first;

		if (r == 0)
		{
			CallSequence seq = getVariables();
			seq.add(AstFactory.newASkipStm(new LexLocation()));
			return seq;

		} else
		{

			TestSequence rtests = repeat.getTests();
			int count = rtests.size();
			int[] c = new int[r];

			for (int i = 0; i < r; i++)
			{
				c[i] = count;
			}

			Permutor p = new Permutor(c);
			int[] select = null;
			for (int i = 0; i < v.second; i++)
			{
				select = p.next();
			}

			CallSequence seq = getVariables();

			for (int i = 0; i < r; i++)
			{
				seq.addAll(rtests.get(select[i]));
			}
			return seq;
		}

	}
1346158
def iteritems_breadth_first(a_mapping, include_dicts=False):
    """"""
    subordinate_mappings = []
    for key, value in six.iteritems(a_mapping):
        if isinstance(value, collections.Mapping):
            subordinate_mappings.append((key, value))
            if include_dicts:
                yield key, value
        else:
            yield key, value
    for key, a_map in subordinate_mappings:
        for sub_key, value in iteritems_breadth_first(a_map, include_dicts):
            yield '%s.%s' % (key, sub_key), value