Create combinations
423137
protected function combine($input, &$output, &$tmp)
    {
        $current = array_shift($input);

        if (\count($input) > 0) {
            foreach ($current as $element) {
                $tmp[] = $element;
                $this->combine($input, $output, $tmp);
                array_pop($tmp);
            }
        } else {
            foreach ($current as $element) {
                $tmp[] = $element;
                $output[] = $tmp;
                array_pop($tmp);
            }
        }
    }
198353
static String combine(final String... args) {
        final StringBuilder builder = new StringBuilder();
        for (final String arg : args) {
            builder.append(arg);
        }
        return builder.toString();
    }
1010418
def Concat(self: Iterable, *others):
    
    return concat_generator(self, *[unbox_if_flow(other) for other in others])
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
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
620224
def _randomized_hands():
    '''
    
    '''
    all_dominoes = [dominoes.Domino(i, j) for i in range(7) for j in range(i, 7)]
    random.shuffle(all_dominoes)
    return [dominoes.Hand(all_dominoes[0:7]), dominoes.Hand(all_dominoes[7:14]),
            dominoes.Hand(all_dominoes[14:21]), dominoes.Hand(all_dominoes[21:28])]
1246403
function createCombi (types, options) {
    var tests = types.map(function (type) {
      return ducktype(type).test;
    });

    return new DuckType({
      name: options && options.name || null,
      test: function test (object) {
        for (var i = 0, ii = tests.length; i < ii; i++) {
          if (tests[i](object)) {
            return true;
          }
        }
        return false;
      }
    });
  }
1195937
function combine(arr1, arr2) {
        if (arr2 == null) {
            return arr1;
        }

        var i = -1, len = arr2.length;
        while (++i < len) {
            if (indexOf(arr1, arr2[i]) === -1) {
                arr1.push(arr2[i]);
            }
        }

        return arr1;
    }
1078467
function fast(source) {
        var i = source.length;

        while (i--) {
          combinations.push(source.slice(0, i + 1));
          if (i === 1) fast(source.slice(i));
        }

        return combinations;
      }
702923
def combination(n)
      raise Erlang::ImproperListError if improper?
      return Erlang::Cons.new(Erlang::Nil) if n == 0
      return self if empty?
      return tail.combination(n - 1).map { |list| list.cons(head) }.append(tail.combination(n))
    end
987483
function combineStrings(types, opts) {
  var symbols = {};
  var i, l, type, typeSymbols;
  for (i = 0, l = types.length; i < l; i++) {
    type = types[i];
    if (type.getTypeName() === 'string') {
      // If at least one of the types is a string, it will be the supertype.
      return type;
    }
    typeSymbols = type.getSymbols();
    var j, m;
    for (j = 0, m = typeSymbols.length; j < m; j++) {
      symbols[typeSymbols[j]] = true;
    }
  }
  return createType({type: 'enum', symbols: Object.keys(symbols)}, opts);
}
612686
function createRandom(n, min, max) {
    let scale = max - min;
    let array = [];
    for (var i = 0; i < n; i++) {
        array[i] = (Math.random() * scale) + min;
    }
    return new Vector(array);
}
158089
function Combo(options) {
    this.options = _.extend({
        domain: 'imgcache.gtimg.cn',
        basePath: '/c/=',
        separator: ',',
        selectors: {
            script: /<(script)([^>]*)>((?:.|\r\n)*?)<\/script>/g,
            link: /<(link)([^>]*?)\/?>/g
        }
    }, options);
}
212552
def variant_combinations
      combinations = []
      0.upto(2 ** FIELD_VARIANTS.length - 1) do |b|
        combinations << combination = []
        FIELD_VARIANTS.each_with_index do |variant, i|
          combination << variant if b & 1<<i > 0
        end
      end
      combinations
    end
674378
def shuffle(self, times=1):
        
        for _ in xrange(times):
            random.shuffle(self.cards)
1196767
public static <X, Y, Z> Triple<X, Y, Z> makeTriple(X x, Y y, Z z) {
    return new Triple<X, Y, Z>(x, y, z);
  }
1084387
def random_combination(iterable, r):
    ""
    pool = tuple(iterable)
    n = len(pool)
    indices = sorted(random.sample(xrange(n), r))
    return tuple(pool[i] for i in indices)