How to compare two rows in a csv file?

I’ve a data.csv file which looks as follows.

-1.95e+01   -2.30e-01   -2.56e-01   4.44e+01 -1.95e+01   -2.30e-01   -7.68e-01   4.48e+01 -2.00e+01   -2.30e-01   -2.56e-01   3.41e+01 -2.00e+01   -2.30e-01   -7.69e-01   3.46e+01 -2.10e+01   -9.92e+00   1.00e+01    9.66e+01 -2.10e+01   -9.92e+00   2.30e+00    4.29e+01 

I’d like to have a result.csv file such that if the value in the first column is the same, grab all the data in the first four columns (there are 4 columns) and save it in result.csv file. Then the next equal values and save it in the next four columns. For example my result.csv should look like

-1.95e+01 -2.30e-01 -2.56e-01 4.44e+01  -2.00e+01 -2.30e-01 -2.56e01 3.41e+01 -2.10e+01 -9.92e+00 1.00e+01 9.66e+01 -1.95e+01 -2.30e-01 -7.68e-01 4.48e+01  -2.00e+01 -2.30e-01 -7.69e-01 3.46e+01 -2.10e+01 -9.92e+00 2.30e+00 4.29e+01 

My very basic attempt is as follows:

with open('data.csv', 'r') as f:     csv_reader = csv.reader(f, delimiter='\t')     for col in csv_reader:               i = 0         if col[0] == "Next value of the same column": 'don't know how to fix             #Grab all the values which have same value in the first column         else:             #Grab next values which have same value in the first column         i += 1   

Compare content of 2 files using diff – no such file or directory problem

May I know how can I compare content of two files? I tried these codes below but I get “sh: diff: No such file or directory” message.

plink.exe 10.3.0.121 -l admin -pw abc123 -batch sh diff -s “/share/MD0_DATA/BackupData/test1.txt” “/share/MD0_DATA/BackupData/test2.txt”

plink.exe 10.3.0.121 -l admin -pw abc123 -batch sh diff -s /share/MD0_DATA/BackupData/test1.txt /share/MD0_DATA/BackupData/test2.txt

SharePoint 2013 -Compare values in list to see if all column values match- dashboard

I want to create a dashboard indicating when all items in a list are equal to “Yes”. For testing I am innerHtmling Done/Not Done. The logic seems to work , but I am afraid the code is testing the list as a whole and not the individual items. I am using choice columns.

Am I missing a loop?

$  (document).ready(function() {     arrayIn_OutItems();     

});

function arrayIn_OutItems(){ var siteUrl = “https:xxx/_api/web/lists/GetByTitle(‘listName’)/items?$ select=”Title,Office,HR,Accounting; var array = []

$  .ajax({     url: siteUrl,     type: "GET",     async: false,     headers: {         "accept": "application/json;odata=verbose"     },     success: function (data) {         array = data.d.results;         console.log(array);         var isYes =          for(var i = 0;array[i].length < 0;i++{             array.every(function (e) {       return e  == "Yes"       });         }         if(isYes == true){           document.getElementById('yes/no').innerHTML = "Done";         }else{           document.getElementById('yes/no').innerHTML = "Not Done";         }      },     error: function (err) {         console.log(err);     } }); 

}

compare two lines and print unmatched words from two files

I have two files,Lets say file1 and file2

file1 has “eipassoc-03cd9117d7188d2 eipasoc-47367a3f eipasoc-bbbddc3 eipassoc-10bbfb6” each one is space delimited
file2 has “eipasoc-47367a3f eipassoc-10bbfb6” each one is space delimited

I wanted to print “eipassoc-03cd9117d7188d2 eipasoc-bbbddc3” in file3. since all I am trying to do is non matching words from file1.

I have been trying with “awk”, “for loop”, “while loop” but unable to get to a solution. any idea of how to minus and get to only unmatched ones.

Thank you all.

compare two lines and print unmatched words from two files

I have two files,Lets say file1 and file2

file1 has “eipassoc-03cd9117d7188d2 eipasoc-47367a3f eipasoc-bbbddc3 eipassoc-10bbfb6” each one is space delimited
file2 has “eipasoc-47367a3f eipassoc-10bbfb6” each one is space delimited

I wanted to print “eipassoc-03cd9117d7188d2 eipasoc-bbbddc3” in file3. since all I am trying to do is non matching words from file1.

I have been trying with “awk”, “for loop”, “while loop” but unable to get to a solution. any idea of how to minus and get to only unmatched ones.

Thank you all.

Summative user tests that allows you to compare against competitors?

I want to understand when it would be appropriate to conduct summative users tests with the focus on evaluating the performance of our product against our competitors?

We have a finished live product which we know can be improved in many ways and want to think of a way to evaluate ours against others in the market. We’ve done some competitor analysis but want to see how people use our product and what they like/dislike. Would this kind of user testing work?

Let’s compare our coding skills.

Hi

I just took the new Developer Economics survey. It helped me discover where my coding skills are the strongest.

Want to take the survey yourself? It will take about ±30 min.

Both of us can win – I’m racing for the top cash prize of $ 1,000 and if you take the survey you may win any of the $ 12,000+ worth of gifts including: Microsoft Surface Pro 6, JetBrains IDE, Oculus Rift S, AWS Deep Racer, Samsung HMD Odyssey, Apple AirPods, courses and more….

Let’s compare our coding skills.

How to properly compare performance of a prototype against a baseline

Assume that we have a baseline software B and a new prototype P that I want to compare with B. Ideally, I want to show that P performs some orders of magnitude or X times faster than B (on average).

I have m queries/problems that I run on each software with a timeout T. I record the raw running times $ b_1,\dots,b_m$ of B and $ t_1,\dots,t_m$ of P. It could be that for some (few) problems B is still faster than P, moreover it could be that there are very short times such as 0.01s or considerably longer ones, for instance, 3000s. Now my question is, what is a good measure to compare the performance of B and P quantitatively on average?

A straightforward (but probably crude) measure could be just computing the average running times $ b_a = \frac{1}{m}\sum_{i=1}^m b_i$ and $ t_a = \frac{1}{m}\sum_{i=1}^m t_i$ , and taking $ \frac{b_a}{t_a}$ .

A variation of this measure is taking the average of times when both systems didn’t timeout and counting the number of timeouts, although not sure how to get just one measure from these four values.

These two measures do not address one my concern related to the variance in the values of the times. For instance, for $ m=2$ , $ b_1=2500$ s, $ t_1=8$ s, $ b_2=2000$ s and $ t_2=1000$ s, the first measure is 4.4643. Does it mean that P performs on average 4 times faster? Would it be more reasonable to take the average of the normalised times $ \frac{1}{m}\sum_{i=1}^m \frac{b_i}{t_i}$ ? In this case it would be equal 157.25 and, seems to me, would better reflect the performance gains.

And again, a question is how to take timeouts into account properly.

I am sure that there should be standard approaches to comparing performance of two systems(for instance, databases), but I wasn’t able to find anything quickly. I would also be grateful to see an explanation why one measure is better than the other, and what are the standard measures (at least on the scientific community).

compare two variable with user input in php

I’m making a verification page that compares two variables .. the first one is a random code that have been generated previously and send to the user via email ($ code)… the second one is the user input ($ verf) … when the user clicks submit $ code and $ verf should be compared if it is true then transfer to other page if not then he should try again. I have tried a lot of ways but it always shows one input either yes for all conditions or no for all conditions below is my code

tried to make a compare function with php and bash it didn’t work

<?php session_start();  echo "E-mail has been sent to " ; echo $  _SESSION['email']; echo $  email , "   "; echo $  _SESSION['code']; $  email = escapeshellarg($  _SESSION['email']); $  code = escapeshellarg($  _SESSION['code']); $  addr = shell_exec("./test.sh $  email $  code"); $  var = print_r($  addr, true); ?> <!DOCTYPE HTML>   <html> <body>   <h2>E-mail Verfication</h2> <form method="post" action="<?php echo htmlspecialchars($  _SERVER["PHP_SELF"]);?>">     Name: <input type="text" name="name1" value="<?php echo $  name1;?>">   <br><br>   <input type="submit" name="submit2" value="Submit">   </form> <?php   session_start();  echo $  _SESSION['code']; if (isset($  _POST['submit2'])){   if ($  name1 != $  code) {     echo "No";     } else {        echo "yes";       header('Location: otherpage.php');             }   } else {  print ("please input the code that you have received ");  }  ?> </body> </html>