Write the elements of the sequence *seq* to the transport.

        This method will block if the transport's write buffer is at capacity.
425306
def writelines(self, seq):
        
        self._check_writable()
        for line in seq:
            self._transport._can_write.wait()
            self._transport.write(line)
868064
@Override
  public void write(byte[] b, int start, int length) throws IOException {
    currentDataSegmentBuffer.write(b, start, length);
    flushIfNeeded();
  }
1260636
private void writeBuffer() throws IOException {
    for (int pos = 0; pos < currentBufferSize; pos++) {
      if (isByte[pos]) {
        aFile.write((byte) buffer[pos]);
      } else {
        aFile.write(buffer[pos]);
      }
    }
  }
1340845
public static void writeSequence(File file, Sequence<?> sequence) throws Exception {
		FileOutputStream outputStream = new FileOutputStream(file);
		BufferedOutputStream bo = new BufferedOutputStream(outputStream);
		writeSequences(bo, singleSeqToCollection(sequence));
		bo.close();
		outputStream.close();
	}
459088
protected void write() throws Exception {
		ByteBuffer buffer = queue.peek();
		if (buffer == null) {
			if (key != null) {
				key.interestOps(0);
			}
			return;
		}
		if (channel != null) {
			int count;
			while (true) {
				count = channel.write(buffer);

				// Debug
				if (debug) {
					logger.info(count + " bytes submitted to " + channel.getRemoteAddress() + ".");
				}

				// EOF?
				if (count == -1) {
					throw new InvalidPacketDataError(nodeID, "host", host, "port", port);
				}

				// Remove the submitted buffer from the queue
				if (!buffer.hasRemaining()) {
					queue.poll();
				}

				// Turn off write mode (if the queue is empty)
				if (queue.isEmpty()) {
					if (blockerBuffer.compareAndSet(buffer, null) && key != null) {
						key.interestOps(0);
					}
					return;
				} else {
					buffer = queue.peek();
				}
			}
		}
	}
1233116
public static void writeProteinSequence(OutputStream outputStream,
			Collection<ProteinSequence> proteinSequences) throws Exception {

		FastaWriter<ProteinSequence, AminoAcidCompound> fastaWriter = new FastaWriter<ProteinSequence, AminoAcidCompound>(
				outputStream, proteinSequences,
				new GenericFastaHeaderFormat<ProteinSequence, AminoAcidCompound>());
		fastaWriter.process();

	}
1161512
public void write(ByteBuffer buffer, int len) {
        if (len < 1) return;
        if (count >= content.length - len) {
            byte[] ns = new byte[content.length + len];
            System.arraycopy(content, 0, ns, 0, count);
            this.content = ns;
        }
        buffer.get(content, count, len);
        count += len;
    }
396626
async def write(self, data, eof = False, buffering = True):
        
        if not self.outputstream:
            self.outputstream = Stream()
            self._startResponse()
        elif (not buffering or eof) and not self._sendHeaders:
            self._startResponse()
        if not isinstance(data, bytes):
            data = data.encode(self.encoding)
        await self.outputstream.write(data, self.connection, eof, False, buffering)
1082530
def write(self):
        

        rabs = [x.seqrecord for x in self.gproteins.values() if x.is_rab()]
        return SeqIO.write(rabs, self.tmpfname + '.phase2', 'fasta')
1211334
def _write_bytes(self, data):
        
        with self.__lock:
            self.output.write(to_bytes(data, self.encoding))
1127650
public synchronized void write(int blockNumber, int blockOffset, byte[] buffer) 
			throws IOException {
		write(blockNumber, blockOffset, buffer, 0, buffer.length);
	}
71325
public static void writeNucleotideSequence(OutputStream outputStream,
			Collection<DNASequence> dnaSequences, String seqType)
			throws Exception {
		GenericGenbankHeaderFormat<DNASequence, NucleotideCompound> genericGenbankHeaderFormat = new GenericGenbankHeaderFormat<DNASequence, NucleotideCompound>(
				seqType);
		// genericGenbankHeaderFormat.setLineSeparator(lineSep);
		GenbankWriter<DNASequence, NucleotideCompound> genbankWriter = new GenbankWriter<DNASequence, NucleotideCompound>(
				outputStream, dnaSequences, genericGenbankHeaderFormat);
		// genbankWriter.setLineSeparator(lineSep);
		genbankWriter.process();
	}
831603
public void writeBytes(final byte[] bytes, final int off, final int len)
    {
        if (len > remaining())
        {
            writeBytesSlow(bytes, off, len);
            return;
        }

        final Block block = current;
        System.arraycopy(bytes, off, block.data, block.limit, len);
        block.limit += len;
    }
697242
public void write(BufferedWriter writer) throws Exception {
		Enumeration enm;

		// header
		writer.write("# generated " + new Date());
		writer.newLine();

		enm = elements();

		while (enm.hasMoreElements()) {
			writer.write(enm.nextElement().toString());
			writer.newLine();
		}

		writer.flush();
		writer.close();
	}
432970
def _run_seq(self, size):
        
        
        # Write the sequence to the sequence generator (hw driver)
        self['SEQ'].write(size) #write pattern to memory
        
        self['SEQ'].set_size(size)  # set size
        self['SEQ'].set_repeat(1) # set repeat
        for _ in range(1):
            self['SEQ'].start() # start
            
            while not self['SEQ'].get_done():
                #time.sleep(0.1)
                print("Wait for done...")
447539
public static <T extends SequenceElement> void writeSequenceVectors(@NonNull SequenceVectors<T> vectors,
                                                                        @NonNull SequenceElementFactory<T> factory, @NonNull String path) throws IOException {
        try (FileOutputStream fos = new FileOutputStream(path)) {
            writeSequenceVectors(vectors, factory, fos);
        }
    }
1273575
def write_sequences_to_fasta(path, seqs):
    
    from Bio import SeqIO
    from Bio.Seq import Seq
    from Bio.SeqRecord import SeqRecord

    path = Path(path)
    records = []

    for id, seq in seqs.items():
        record = SeqRecord(Seq(seq), id=id, description='')
        records.append(record)

    SeqIO.write(records, str(path), 'fasta')