Google servers still support SSLv3, vulnerable to POODLE
ssllabs.com5 pointsby taltman10 comments
mawk '
/^\[Result "1\/2-1\/2"\]/ { draw++ }
/^\[Result "1-0"\]/ { white++ }
/^\[Result "0-1"\]/ { black++ }
END { print white, black, draw }'
Notice that I got rid of the printing out of the intermediate totals per file. Since we are only tabulating the final total, we can modify the 'reduce' mawk invocation to be as follows: mawk '
{games += ($1+$2+$3); white += $1; black += $2; draw += $3}
END { print games, white, black, draw }'
Making the bottle-neck data stream thinner always helps with overall throughput. dmesg | gawk -f reservoir-sample.awk k=5 record_separator='==='
#!/usr/bin/gawk -f
### reservoir-sample.awk
###
### Sample k random lines from a stream, without knowing the size of the stream.
###
### (Tomer Altman)
### Parameters: (set from command-line)
##
## k: number of lines to sample
## record_separator: string used to separate iterations of the sample in stdout.
## Define a function for returning a number between 1 and n:
function random_int (n) { return 1 + int(rand() * n) }
## Initialize the PRNG seed:
BEGIN { srand() }
## For the first k lines, initialize the sample array:
NR <= k { sample[NR] = $0 }
## If we've initialized the sample array, and we pick an integer between one and the current record number that is less than or equal to k, update the sample array and print it to stdout:
NR > k && (current_random_int = random_int(NR)) <= k {
sample[current_random_int] = $0
for (i in sample) print sample[i]
print (record_separator != "") ? record_separator : "--"
}
"A paper written with Ronen Gradwohl on Lisp and Symbolic Functionality in an Excel Spreadsheet: Development of an OLE Scientific Computing Environment, August, 2002. (code available on request) "
https://people.eecs.berkeley.edu/~fateman/algebra.html