Combine several smother reports.
501844
def combine(ctx, src, dst):
    
    c = coverage.Coverage(config_file=ctx.obj['rcfile'])
    result = Smother(c)

    for infile in src:
        result |= Smother.load(infile)

    result.write(dst)
117035
def setup_combine(final_file, data):
    
    if "align_split" not in data:
        return final_file, data
    align_dir = os.path.dirname(final_file)
    base, ext = os.path.splitext(os.path.basename(final_file))
    start, end = [int(x) for x in data["align_split"].split("-")]
    out_file = os.path.join(utils.safe_makedir(os.path.join(align_dir, "split")),
                            "%s-%s_%s%s" % (base, start, end, ext))
    data["combine"] = {"work_bam": {"out": final_file, "extras": []}}
    return out_file, data
405451
def combine_and_copy(f, files, group):
    
    f[group] = np.concatenate([fi[group][:] if group in fi else \
                                   np.array([], dtype=np.uint32) for fi in files])
501929
def report(title, columns, rows)
      table = capture_table([columns] + rows)
      title = "=== #{title} "
      title << "=" * [(table.split($/).max{|a,b| a.size <=> b.size }.size - title.size), 3].max
      puts title
      puts table
    end
1262575
def combine_data(self, command2):
        """"""
        if command2 is None:
            return
        self._data = self._merge(command2._data, self._data)
1080395
def combine(self, a, b):
        """"""

        for l in (a, b):
            for x in l:
                yield x
1315678
def _merge_files(self, input_files, output_file):
        """"""
        # we assume that all the input files have the same charset
        with open(output_file, mode='wb') as out:
            for input_file in input_files:
                out.write(open(input_file, mode='rb').read())
587618
def combine_count_files(files, out_file=None, ext=".fpkm"):
    
    files = list(files)
    if not files:
        return None
    assert all([file_exists(x) for x in files]), \
        "Some count files in %s do not exist." % files
    for f in files:
        assert file_exists(f), "%s does not exist or is empty." % f
    col_names = [os.path.basename(x.replace(ext, "")) for x in files]
    if not out_file:
        out_dir = os.path.join(os.path.dirname(files[0]))
        out_file = os.path.join(out_dir, "combined.counts")

    if file_exists(out_file):
        return out_file
    logger.info("Combining count files into %s." % out_file)
    row_names = []
    col_vals = defaultdict(list)
    for i, f in enumerate(files):
        vals = []
        if i == 0:
            with open(f) as in_handle:
                for line in in_handle:
                    rname, val = line.strip().split("\t")
                    row_names.append(rname)
                    vals.append(val)
        else:
            with open(f) as in_handle:
                for line in in_handle:
                    _, val = line.strip().split("\t")
                    vals.append(val)
        col_vals[col_names[i]] = vals

    df = pd.DataFrame(col_vals, index=row_names)
    df.to_csv(out_file, sep="\t", index_label="id")
    return out_file
193010
def combine_results(self, results):
        """"""
        result = {}
        for key in results[0]:
            result[key] = numpy.concatenate([r[key] for r in results])
        return result
850303
public void combine(WSStatistic otherStat) {
        if (!validate(otherStat))
            return;

        DoubleStatisticImpl other = (DoubleStatisticImpl) otherStat;
        count += other.count;
        //TODO: how to update lastSampleTime???
        //if (other.lastSampleTime > lastSampleTime)
        //  lastSampleTime = other.lastSampleTime;
    }
739547
private static Collection<JobIdWithStatus> combine(
			Collection<JobIdWithStatus> first,
			Collection<JobIdWithStatus> second) {
		checkNotNull(first);
		checkNotNull(second);

		ArrayList<JobIdWithStatus> result = new ArrayList<>(first.size() + second.size());

		result.addAll(first);
		result.addAll(second);

		return result;
	}
455891
function combine(m1, m2) {
  return [
    m1[0]*m2[0] + m1[2]*m2[1],
    m1[1]*m2[0] + m1[3]*m2[1],
    m1[0]*m2[2] + m1[2]*m2[3],
    m1[1]*m2[2] + m1[3]*m2[3],
    m1[0]*m2[4] + m1[2]*m2[5] + m1[4],
    m1[1]*m2[4] + m1[3]*m2[5] + m1[5]
  ];
}
487892
private void combineHistogramSameBuckets(FixedBucketsHistogram otherHistogram)
  {
    long[] otherHistogramArray = otherHistogram.getHistogram();
    for (int i = 0; i < numBuckets; i++) {
      histogram[i] += otherHistogramArray[i];
    }

    count += otherHistogram.getCount();
    max = Math.max(max, otherHistogram.getMax());
    min = Math.min(min, otherHistogram.getMin());

    outlierHandler.handleOutliersForCombineSameBuckets(otherHistogram);
  }
188487
function mergeResults(jsRes, coffeeRes) {
    if (!coffeeRes) {
        return jsRes;
    }

    jsRes.reports = jsRes.reports.concat(coffeeRes.reports);

    return escomplex.processResults(jsRes, cli.nocoresize || false);
}
1043186
def __combine_windows(w1, w2):
    
    res = []
    for s1, s2 in zip(w1, w2):
        res.append(slice(min(s1.start, s2.start), max(s1.stop, s2.stop)))
    return tuple(res)
152168
def join(input_files, output_file):
    '''
    
    '''

    # get feature collections
    final_features = []
    for file in input_files:
        with open(file) as f:
            feat_collection = geojson.load(f)
            final_features += feat_collection['features']

    feat_collection['features'] = final_features

    # write to output file
    with open(output_file, 'w') as f:
        geojson.dump(feat_collection, f)
971618
def combine_xml_points(l, units, handle_units):
    """"""
    ret = {}
    for item in l:
        for key, value in item.items():
            ret.setdefault(key, []).append(value)

    for key, value in ret.items():
        if key != 'date':
            ret[key] = handle_units(value, units.get(key, None))

    return ret