Tag:output

  • Perl reads data from the file and outputs the implementation code

    Time:2022-4-3

    Read a file under window in the following format:Open (Filehand, “path e.g: D: \ \ data. TXT”);   Then assign the open content to a variable: $protein=<filehand>;  Attachment: a program for reading protein sequences.   Copy codeThe code is as follows: #!/bin/perl open (PROTEINFILE,”f:\\perl\\data.txt”)||die(“can not open the file!”);  $protein =<PROTEINFILE>;  close PROTEINFILE;  print $protein;   […]

  • One line of code solves the problem of Perl input sorting output

    Time:2022-3-25

    Let’s first look at the basic methods: Copy codeThe code is as follows: chomp(@strings=<STDIN>);  @strings=sort @strings;  print “@strings\n.”; The above three lines of code solve the function of inputting, then sorting, and finally outputting the sorted results.   Write in one line of code:   Copy codeThe code is as follows: print sort<STDIN>;   The […]

  • Implementation of alignment in VBScript output

    Time:2022-3-21

    Operation effect: Code (foutput. VBS):   Copy codeThe code is as follows: strComputer = “.” Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\CIMV2”) Set colItems = objWMIService.ExecQuery( _     “SELECT * FROM Win32_NetworkAdapterConfiguration”,,48) For Each objItem in colItems     Wscript.Echo objItem.Caption & fOutput(objItem.Caption) & “textinfo” Next   Function fOutput(strName)  strLen = Len(strName)  Select Case True […]

  • Analysis of Linux vmstat output method

    Time:2022-1-14

    Vmstat procs ———–memory———- —swap– —–io—- –system– —-cpu—- r b swpd free buff cache si so bi bo in cs us sy id wa 0 0 100152 2436 97200 289740 0 1 34 45 99 33 0 0 99 0 procs Column r indicates the number of processes running and waiting for CPU time slice. If […]

  • Ideas and methods of formatting output documents in Python database

    Time:2021-10-26

    problem If the document format is uniform, can I format and output Doc / MD documents through Python? It can be done in code. Try not to do it manually thinking First of all, the data has been recorded into the database. You need Python to be able to read the database. You can use […]

  • The solution to the incomplete output in Python pychar

    Time:2021-3-13

    A lot of times, we will find that sometimes when the output results are very large, we will use… Instead, the final output of a total length, then how to get it? import pandas as pd #Set the maximum column, width and other parameters to be displayed, and eliminate the ellipsis in the middle of […]

  • SQL Server union all result sum function causes precision loss

    Time:2020-11-17

    Usage scenarios: In the multi-dimensional summary of data, it is necessary to merge the data of different data types and different data precision into a table, and the accuracy of relevant calculation will be lost.   Troubleshooting: After segmented investigation, the cause of the loss was found, and the sum function caused the precision loss […]

  • On the output of tensorflow dynamic bidirectional RNN

    Time:2020-4-19

    tf.nn.bidirectional_dynamic_rnn() Function: def bidirectional_dynamic_rnn( Cell FW, forward RNN Cell BW, backward RNN Inputs Sequence ﹐ length = none, ﹐ the actual length of the input sequence (optional, the default is the maximum length of the input sequence) Initial? State? FW = none, forward? Initialization state (optional) Initial? State? BW = none,? Backward? Initialization state (optional) […]

  • A method to output SQL result set in JSON format by golang

    Time:2020-4-1

    In this paper, an example is given to show how to output SQL result set in JSON format in golang. To share with you for your reference, as follows: Copy codeThe code is as follows: func getJSON(sqlString string) (string, error) {     stmt, err := db.Prepare(sqlString)     if err != nil {         return nil, […]

  • Tensorflow to print the output of each layer

    Time:2020-3-30

    In test.py, you can directly generate a Pb file with weight through the following code, or you can convert CKPT to a Pb file through TF’s official free graph.py. constant_graph = graph_util.convert_variables_to_constants(sess, sess.graph_def,[‘net_loss/inference/encode/conv_output/conv_output’]) with tf.gfile.FastGFile(‘net_model.pb’, mode=’wb’) as f: f.write(constant_graph.SerializeToString()) In tf1.0, the output of each layer can be obtained through the Pb file with weight […]

  • C ා method of obtaining and outputting content between two specific characters

    Time:2020-2-4

    Today, I have been trying my best to solve the problem of how to output the content between two characters. At the beginning, I used the universal regular expression, but I don’t know why My data can’t come out all the time. I think it’s the problem of the characters I input, because what I […]

  • SQL Server 2005 output clause gets the ID value just inserted

    Time:2019-11-30

    The grammar is very simple, such as Copy codeThe code is as follows: declare @t table (id uniqueidentifier default newid (), name varchar (100 )) insert into @t (name ) output inserted .id select ‘jinjazz’ union select ‘sqlserver’ /*Output similar3880DB77-5ADF-472D-A68D-7518DD76F3B8 F478A3F5-A501-404E-A328-372EEC26279D */