Appends chunks from another bin to the list and moved the end position.
327700
public void addBin(List<Chunk> chunksToAdd, long lastLocus) {
    assert chunks != null;
    contig = new Contig(contig.referenceName, contig.start, lastLocus);
    chunks.addAll(chunksToAdd);
    updateSpan();
  }
396092
def moveListItem(L, fromidx, toidx):
    ""
    r = L.pop(fromidx)
    L.insert(toidx, r)
    return toidx
1344863
@Override
    public void moveToEndOfFile() {
        int targetLine = lines.size() + 1;
        move(targetLine, getContent(targetLine).length());
    }
890804
function append(arrlike /* , items... */) {
    return Array.prototype.slice.call(arrlike, 0).concat(Array.prototype.slice.call(arguments, 1));
}
113746
private static final <E> void moveAll(ArrayList<E> source, ArrayList<E> target) {
		target.ensureCapacity(target.size() + source.size());
		for (int i = source.size() - 1; i >= 0; i--) {
			target.add(source.remove(i));
		}
	}
635952
public void finishAppending()
  {
    checkStateTransition(this.state, SegmentState.APPENDING, SegmentState.APPEND_FINISHED);
    this.state = SegmentState.APPEND_FINISHED;
  }
511662
def iterchunks(data, chunksize):
    
    offt = 0
    while offt < len(data):
        yield data[offt:offt+chunksize]
        offt += chunksize
1209538
function fromListPartial(n, list, hasStrings) {
  var ret;
  if (n < list.head.data.length) {
    // slice is the same for buffers and strings
    ret = list.head.data.slice(0, n);
    list.head.data = list.head.data.slice(n);
  } else if (n === list.head.data.length) {
    // first chunk is a perfect match
    ret = list.shift();
  } else {
    // result spans more than one buffer
    ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
  }
  return ret;
}
341376
def create_chunked_list(in_dir, size, out_dir, out_name):
    
    create_dirs(out_dir)

    in_files = get_files(in_dir)
    chunks = chunk(in_files, size)

    division = {}

    for i, files in enumerate(chunks):
        division[i] = [os.path.basename(f) for f in files]

    out_file = os.path.join(out_dir, out_name)
    with codecs.open(out_file, 'wb', encoding='utf-8') as f:
        json.dump(division, f, indent=4)
865936
def push(self, x):
        
        if isinstance(x, list):
            for item in x:
                self.stack.append(item)
        else:
            self.stack.append(x)
437814
function concat(res, done) {
  const chunks = []
  res
    .on('data', chunk => {
      chunks.push(chunk)
    })
    .on('end', () => {
      done(Buffer.concat(chunks))
    })
}
785033
def _merge_chunks(self):
        

        if not self._indefinite:
            return self._as_chunk()

        pointer = self._chunks_offset
        contents_len = len(self.contents)
        output = None

        while pointer < contents_len:
            # We pass the current class as the spec so content semantics are preserved
            sub_value, pointer = _parse_build(self.contents, pointer, spec=self.__class__)
            if output is None:
                output = sub_value._merge_chunks()
            else:
                output += sub_value._merge_chunks()

        if output is None:
            return self._as_chunk()

        return output
587350
def append(self, data, size):
        
        return lib.zchunk_append(self._as_parameter_, data, size)
138473
def appendData(self, bins, repnum=None):
        
        # only if the last sample was above threshold, but last-1 one wasn't
        bins[bins >= len(self._counts)] = len(self._counts) -1
        bin_totals = np.bincount(bins)
        self._counts[:len(bin_totals)] += bin_totals
        self.histo.setOpts(height=np.array(self._counts))
652561
def merge_lists(l, base):
    
    
    for i in base:
        if i not in l:
            l.append(i)
338246
public void append( int bits , int numberOfBits , boolean swapOrder ) {
		if( numberOfBits > 32 )
			throw new IllegalArgumentException("Number of bits exceeds the size of bits");
		int indexTail = size;
		growArray(numberOfBits,true);

		if( swapOrder ) {
			for (int i = 0; i < numberOfBits; i++) {
				set( indexTail + i , ( bits >> i ) & 1 );
			}
		} else {
			for (int i = 0; i < numberOfBits; i++) {
				set( indexTail + numberOfBits-i-1 , ( bits >> i ) & 1 );
			}
		}
	}
717261
def _chunks(l, n):
    
    for i in xrange(0, len(l), n):
        yield l[i:i+n]