Append chunk_info to chunks if it is set.
502432
def _maybe_append_chunk(chunk_info, line_index, column, contents, chunks):
    """"""
    if chunk_info:
        chunks.append(_chunk_from_ranges(contents,
                                         chunk_info[0],
                                         chunk_info[1],
                                         line_index,
                                         column))
873392
def append(self, item):
        """"""
        if len(self) == 0:
            # Special case, we make this the current item
            self.index = 0

        self.items.append(item)
1329316
def read_chunked(self):
        """"""
        self._load_metadata()
        for i in range(self.npartitions):
            yield self._get_partition(i)
772841
def append_data(data)
      data = Encoding::ASCII_8BIT == data.encoding ? data : data.htb
      chunks << Bitcoin::Script.pack_pushdata(data)
      self
    end
1193956
def filechunk(f, chunksize):
    """"""
    while True:
        chunk = tuple(itertools.islice(f, chunksize))
        if not chunk:
            return
        yield np.loadtxt(iter(chunk), dtype=np.float64)
1212239
def dict_chunks(dictionary, chunk):
    """"""
    return [{k: v for k, v in dictionary.items() if k in i} for i in chunks(list(dictionary.keys()), chunk)]
1259847
def chunks(lst, size):
    """"""
    for i in xrange(0, len(lst), size):
        yield lst[i:i + size]
618221
def chunks(data, chunk_size):
    
    for i in xrange(0, len(data), chunk_size):
        yield data[i:i+chunk_size]
1125793
def insert_chunk(self, id_):
        """"""

        assert_valid_chunk_id(id_)

        self.__fileobj.seek(self.__next_offset)
        self.__fileobj.write(pack('>4si', id_.ljust(4).encode('ascii'), 0))
        self.__fileobj.seek(self.__next_offset)
        chunk = IFFChunk(self.__fileobj, self[u'FORM'])
        self[u'FORM']._update_size(self[u'FORM'].data_size + chunk.size)

        self.__chunks[id_] = chunk
        self.__next_offset = chunk.offset + chunk.size
586249
def chunk_data(data, chunkSize):
    '''
        
    '''
    chunkSize = int(chunkSize)
    return [data[i : i + chunkSize] for i in range(0, len(data), chunkSize)]
293093
def chunk_list(l, n):
    """"""
    return [l[i:i + n] for i in range(0, len(l), n)]
1088974
def add_data(self, addr, data):
        """"""
        data_len = len(data)
        if not addr == self._current_addr:
            logger.warning(
                'Address did not match when adding data to read request!')
            return

        # Add the data and calculate the next address to fetch
        self.data += data
        self._bytes_left -= data_len
        self._current_addr += data_len

        if self._bytes_left > 0:
            self._request_new_chunk()
            return False
        else:
            return True
40403
def output(self, chunk):
        
        if chunk is not None:
            for queue in self.output_queues:
                queue.put(chunk)
127663
def write_chunks(out, chunks):
    """"""

    out.write(signature)
    for chunk in chunks:
        write_chunk(out, *chunk)
1112883
def chunks(some_list: List, n: int) -> Iterable[List]:
    """"""
    for i in range(0, len(some_list), n):
        yield some_list[i:i + n]
138977
def append_data(dset, data):
    """"""
    N = data.shape[0] if hasattr(data, 'shape') else 1
    if N == 0:
        return
    oldlen = dset.shape[0]
    newlen = oldlen + N
    dset.resize(newlen, axis=0)
    dset[oldlen:] = data
554887
def chunks(iterable, size=1):
    """"""
    iterator = iter(iterable)

    for element in iterator:
        yield chain([element], islice(iterator, size - 1))