Creates a queue with the specified length as its size filled with all zeros
12789
public static GrowQueue_F32 zeros( int length ) {
		GrowQueue_F32 out = new GrowQueue_F32(length);
		out.size = length;
		return out;
	}
1292876
function zeros (length) {
  const arr = []
  for (let i = 0; i < length; i++) {
    arr.push(0)
  }
  return arr
}
883232
def __fill_buffer(self, size=0):
    
    read_size = min(max(size, self.__buffer_size), MAX_BLOB_FETCH_SIZE)

    self.__buffer = fetch_data(self.__blob_key, self.__position,
                               self.__position + read_size - 1)
    self.__buffer_position = 0
    self.__eof = len(self.__buffer) < read_size
488872
def reset(self):
        """"""
        self.alive.value = False
        qsize = 0
        try:
            while True:
                self.queue.get(timeout=0.1)
                qsize += 1
        except QEmptyExcept:
            pass
        print("Queue size on reset: {}".format(qsize))
        for i, p in enumerate(self.proc):
            p.join()
        self.proc.clear()
1071275
def fill_rawq(self):
        
        if self.irawq >= len(self.rawq):
            self.rawq = b''
            self.irawq = 0
        # The buffer size should be fairly small so as to avoid quadratic
        # behavior in process_rawq() above.
        buf = self.sock.recv(64)
        self.msg("recv %s", repr(buf))
        self.eof = (not buf)
        self.rawq = self.rawq + buf
170506
def set_length(len , fill_char)
      return if len <= 0
      old = char_length
      return if old >= len
      self.char_length = len
      check_length
      fill_from_with( old + 1 , fill_char )
    end
1010270
private void initializeBufferQueue(int segmentFileSizeMB) {
        int bufferLength = 
            (segmentFileSizeMB < Segment.maxSegmentFileSizeMB) ?
            (segmentFileSizeMB * 1024 * 1024) : Integer.MAX_VALUE;
            
        lazyCount = 3;
        for (int i = 0; i < lazyCount; i++) {
            ByteBuffer buffer = ByteBuffer.wrap(new byte[bufferLength]);
            _bufferQueue.add(buffer);
        }
    }
901474
def queue_setup(filename, mode, batch_size, num_readers, min_examples):
        
        filename_queue = tf.train.string_input_producer([filename], shuffle=True, capacity=16)
        if mode == "train":
            examples_queue = tf.RandomShuffleQueue(capacity=min_examples + 3 * batch_size,
                                                   min_after_dequeue=min_examples, dtypes=[tf.string])
        else:
            examples_queue = tf.FIFOQueue(capacity=min_examples + 3 * batch_size, dtypes=[tf.string])
        enqueue_ops = list()
        for _ in range(num_readers):
            reader = tf.TFRecordReader()
            _, value = reader.read(filename_queue)
            enqueue_ops.append(examples_queue.enqueue([value]))
        tf.train.queue_runner.add_queue_runner(tf.train.queue_runner.QueueRunner(examples_queue, enqueue_ops))
        example_serialized = examples_queue.dequeue()
        return example_serialized
600046
private static int[] createOrderArray(final int start, final int length) {
    final int[] order = new int[length];
    for (int i = 0; i < length; i++) {
      order[i] = start + i;
    }
    return order;
  }
124331
def queuedb_create(path):
    

    global QUEUE_SQL, ERROR_SQL

    lines = [l + ";" for l in QUEUE_SQL.split(";")]
    con = sqlite3.connect( path, isolation_level=None )
    db_query_execute(con, 'pragma mmap_size=536870912', ())
    for line in lines:
        db_query_execute(con, line, ())

    con.commit()
    con.row_factory = queuedb_row_factory
    return con
1306165
public static String fill(char c, int size) {
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < size; i++) {
            builder.append(c);
        }
        return builder.toString();
    }
1249342
def build_from_queue(cls, input_queue, replay_size, batch_size):
    
    return cls(
        lambda: input_queue.dequeue_many(batch_size),
        replay_size,
        batch_size=batch_size)
846186
private void growTo(int size) {
    this.elems.growTo(size, 0);
    this.first = 0;
    this.maxSize = size;
    this.queueSize = 0;
    this.last = 0;
  }
426236
def publish_queue_length(self, redis_client, port, db):
        
        for queue in redis_client.smembers('queues'):
            queue_length = redis_client.llen('queue:%s' % queue)
            self.__publish(port, db, queue, queue_length)
1061078
def as_length(self, value):
        """"""
        new_vec = self.copy()
        new_vec.length = value
        return new_vec
247810
public int queueSize() {
        return queue.stream().map(el -> el.size).reduce(0, (l,r) -> l+r);
    }
1284010
function createQueue() {
    var queues = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        queues[_i] = arguments[_i];
    }
    var _queue;
    _queue = new GroupedQueue(chek_1.flatten(queues));
    return _queue;
}