Combination Methods
775342
def _remote_rest_api_resource(provider)
      _fetch_remote_rest_apis(provider).map do |rr|
        _fetch_remote_rest_api_resources_for_rest_api(provider, rr).map do |res|
          yield rr, res
        end
      end
    end
1137343
def detuning_combinations(lists):
    
    """
    Nl = len(lists)
    comb = [[i] for i in range(lists[0])]
    for l in range(1, Nl):
        combn = []
        for c0 in comb:
            for cl in range(lists[l]):
                combn += [c0[:]+[cl]]
        comb = combn[:]
    return comb
418476
def combine_sp_values(self, other):
        
        if self.values is None:
            ret = IdValues()
        else:
            ret = IdValues({k: int(v) * int(other.values[k]) for k, v in
                            self.values.items()})
        return ret
980578
function joinMethods(methods) {
  var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'value';
  var simpleJoinedMethod;
  var _iteratorNormalCompletion4 = true;
  var _didIteratorError4 = false;
  var _iteratorError4 = undefined;

  try {
    var _loop3 = function _loop3() {
      var method = _step4.value;
      var old = simpleJoinedMethod;

      if (old) {
        simpleJoinedMethod = function simpleJoinedMethod() {
          for (var _len4 = arguments.length, args = new Array(_len4), _key5 = 0; _key5 < _len4; _key5++) {
            args[_key5] = arguments[_key5];
          }

          return method.call.apply(method, [this, mode === 'value' ? old.call.apply(old, [this].concat(args)) : old].concat(args));
        };
      } else {
        simpleJoinedMethod = method;
      }
    };

    for (var _iterator4 = methods[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
      _loop3();
    }
  } catch (err) {
    _didIteratorError4 = true;
    _iteratorError4 = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
        _iterator4.return();
      }
    } finally {
      if (_didIteratorError4) {
        throw _iteratorError4;
      }
    }
  }

  return simpleJoinedMethod;
}
851133
def combinations(self):
        
        keys = self._vars.keys()
        for result in product(*self._vars.values()):
            possible_solution = {}
            for i, v in enumerate(result):
                possible_solution[keys[i]] = v
            yield possible_solution
692872
public void combine(SpdLong other) {
        if (other == null)
            return;
        if (stat.isEnabled() && other.isEnabled())
            stat.combine((CountStatisticImpl) other.getStatistic());
    }
438819
def mappable(combos, pairwise, distance_matrix):
        '''
        
        '''
        combos = np.array(combos)
        # Create a list of all pairwise combination for each combo in combos
        combo_list = combos[:, pairwise[:, ]]

        addresses = tuple([combo_list[:, :, 1], combo_list[:, :, 0]])

        all_distances = distance_matrix[addresses]
        new_scores = np.sqrt(
            np.einsum('ij,ij->i', all_distances, all_distances))
        return new_scores
1266446
private static int mergeSameBuckets(double[] values, double[] weights, int nextIndex)
    {
        sort(values, weights, nextIndex);

        int current = 0;
        for (int i = 1; i < nextIndex; i++) {
            if (values[current] == values[i]) {
                weights[current] += weights[i];
            }
            else {
                current++;
                values[current] = values[i];
                weights[current] = weights[i];
            }
        }
        return current + 1;
    }
739093
def combine(operator, other)
      if other.respond_to?(:composition) && compatible_with?(other)
        new(value.send(operator, other.convert_to(unit).value), unit)
      end
    end
1103724
def _combine(self, x, y):
    """"""
    if x is None or y is None:
      return x or y
    if x != y:
      raise ValueError('Incompatible set of constraints provided.')
    return x
1019606
function combine(a) {
  const fn = function(n, src, got, all) {
    if (n === 0) {
      all.push(got);
      return;
    }

    for (let j = 0; j < src.length; j++) {
      fn(n - 1, src.slice(j + 1), got.concat([src[j]]), all);
    }
  };

  const all = [a];

  for (let i = 0; i < a.length; i++) {
    fn(i, a, [], all);
  }

  all.splice(1, 1); // Remove the empty array

  return all;
}
831796
private int combineSubsetBlocks(Mode[] mode_type, int[] mode_length, int index_point) {
        /* bring together same type blocks */
        if (index_point > 1) {
            for (int i = 1; i < index_point; i++) {
                if (mode_type[i - 1] == mode_type[i]) {
                    /* bring together */
                    mode_length[i - 1] = mode_length[i - 1] + mode_length[i];
                    /* decrease the list */
                    for (int j = i + 1; j < index_point; j++) {
                        mode_length[j - 1] = mode_length[j];
                        mode_type[j - 1] = mode_type[j];
                    }
                    index_point--;
                    i--;
                }
            }
        }
        return index_point;
    }
1324242
public void combine(SpdDouble other) {
        if (other == null)
            return;
        if (stat.isEnabled() && other.isEnabled())
            stat.combine((DoubleStatisticImpl) other.getStatistic());
    }
1281806
def random_combination_with_replacement(iterable, r):
    ""
    pool = tuple(iterable)
    n = len(pool)
    indices = sorted(random.randrange(n) for i in xrange(r))
    return tuple(pool[i] for i in indices)
810776
def combine(self, pattern, variable):
        """"""
        inter_zip = izip_longest(variable, pattern, fillvalue='')
        interleaved = [elt for pair in inter_zip for elt in pair]
        return ''.join(interleaved)
1090718
public static List<String[]> combinationSelect(String[] datas, int m) {
		return new Combination(datas).select(m);
	}
162840
function combine(cbo, argArrayExtra, insertBefore) {
	return [cbo[0], cbo[1], cbo[2] ? (insertBefore ? argArrayExtra.concat(cbo[2]) : cbo[2].concat(argArrayExtra)) : argArrayExtra];
}