tool.imbh/calc_highT-mass.awk

error: pathspec 'tool.imbh/calc_highT-mass.awk' did not match any file(s) known to git

--- tool.imbh/calc_highT-mass.awk
+++ tool.imbh/calc_highT-mass.awk
@@ -0,0 +1,14 @@
+# argv: Tmaxcrit
+BEGIN{
+    m  = 0.;
+    ms = 1.989e33;
+}
+{
+    if($46 > Tmaxcrit) {
+	m += $3;
+    }
+}
+END{
+    printf("%+e\n", m / ms);
+}
+


Added filter.awk back from master

Added filter.awk back from master

error: pathspec 'bin/filter.awk' did not match any file(s) known to git

--- bin/filter.awk
+++ bin/filter.awk
@@ -0,0 +1,145 @@
+#/bin/gawk
+
+# 07/Aug/2010 carlo cancellieri ccancellieri@hotmail.com
+
+BEGIN{
+#das flag
+	das=0;
+	if (DAS==1 || DAS=="das"){
+		d1=1;
+	}
+	else {
+		d1=0;
+	}
+#dds flag
+	dds=0;
+	if (DDS==1 || DDS=="dds"){
+		d2=1;
+	}
+	else {
+		d2=0;
+	}
+#data flag
+	data=0;
+	if (DATA==1 || DATA=="data"){
+		d3=1;
+	}
+	else {
+		d3=0;
+	}
+
+# simple or complete flag
+	complete=0;
+	simple=0;
+	if (COMPLETE=="complete"){
+		c=1;
+		s=0;
+	}
+	else if (COMPLETE=="simple"){
+		c=0;
+		s=1;
+	}
+	else {
+		c=0;
+		s=0;
+	}
+# substitution
+	CLASS=toupper(CLASS);
+	TYPE=tolower(TYPE);
+
+# All the rows flag
+	rest=1;
+}
+
+/#DAS#/	{
+	if (rest==0)	{ rest=1; das=0;}
+	else	{das=d1; dds=0;	data=0; rest=0;}
+#	print "DAS: "das,dds,data,rest "COMPLETE:"complete,simple
+	next;
+}
+/#DDS#/	{
+	if (rest==0)	{ rest=1; dds=0;}
+	else	{das=0; dds=d2; data=0; rest=0;}
+#	print "DDS: "das,dds,data,rest "COMPLETE:"complete,simple
+	next;
+}
+/#DATA#/{
+	if (rest==0)	{ rest=1; data=0;}
+	else	{das=0; dds=0; data=d3; rest=0;}
+#	print "DATA: "das,dds,data,rest "COMPLETE:"complete,simple
+	next;
+}
+
+/#COMPLETE#/{
+	if (complete==1){complete=0;}
+	else {complete=1;}
+#	print "COMPLETE: "complete,c,rest
+	next;
+}
+/#SIMPLE#/{
+	if (simple==1)	{simple=0;}
+	else {simple=1;}
+#	print "SIMPLE: "simple,s,rest
+	next;
+}
+
+//{
+	if (rest==1) {
+		if (complete==1){
+			#we are in the complete section
+			if (c==1){
+				#complete is what you want
+				gsub(/OPENDAP_CLASS/,CLASS,$0);
+				gsub(/OPENDAP_TYPE/,TYPE,$0);
+				print $0
+			}
+			#else simple is what you want
+		}
+		else if (simple==1){
+			#we are in the simple section
+			if (s==1){
+				#simple is what you want
+				gsub(/OPENDAP_CLASS/,CLASS,$0);
+				gsub(/OPENDAP_TYPE/,TYPE,$0);
+				print $0
+			}
+			#else complete is what you want
+		}
+		else
+		{
+			#we are in the rest of the file
+			gsub(/OPENDAP_CLASS/,CLASS,$0);
+			gsub(/OPENDAP_TYPE/,TYPE,$0);
+			print $0
+		}
+	}
+	else if(das==1 || dds==1 || data==1) {
+		if (complete==1){
+			#we are in the complete section
+			if (c==1){
+				#complete is what you want
+				gsub(/OPENDAP_CLASS/,CLASS,$0);
+				gsub(/OPENDAP_TYPE/,TYPE,$0);
+				print $0
+			}
+			#else simple is what you want
+		}
+		else if (simple==1){
+			#we are in the simple section
+			if (s==1){
+				#simple is what you want
+				gsub(/OPENDAP_CLASS/,CLASS,$0);
+				gsub(/OPENDAP_TYPE/,TYPE,$0);
+				print $0
+			}
+			#else complete is what you want
+		}
+		else
+		{
+			#we are in the rest of a (das==1 || dds==1 || data==1)
+			gsub(/OPENDAP_CLASS/,CLASS,$0);
+			gsub(/OPENDAP_TYPE/,TYPE,$0);
+			print $0
+		}
+	}
+}


Added AWK

Added AWK

error: pathspec 'awk/hello.awk' did not match any file(s) known to git

--- awk/hello.awk
+++ awk/hello.awk
@@ -0,0 +1,7 @@
+# Awk hello world program
+# written by- Aaditya Naik (rincemust)
+
+BEGIN {print "Hello World"}
+
+# to run, type-
+#   $ awk hello.awk


fixing bug in style header

fixing bug in style header

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/orbifx/yamado.git/'


msa2fa.awk: Convert sscs.py .msa.tsv output to .fa.

error: pathspec 'msa2fa.awk' did not match any file(s) known to git

--- msa2fa.awk
+++ msa2fa.awk
@@ -0,0 +1,17 @@
+# A quick script to convert the .msa.tsv output of sscs.py back into FASTA format.
+
+BEGIN {
+  FS = "\t";
+  OFS = "\t";
+}
+
+$2 == "CONSENSUS" {
+  if ($1 == last) {
+    mate = 2;
+  } else {
+    mate = 1;
+  }
+  print ">" $1 "." mate;
+  print $3;
+  last = $1;
+}


awk script to extract the OGD-AT specifiation from a plain text representation of the PDF file

error: pathspec 'ogdatv21/convogdatspectocsv.awk' did not match any file(s) known to git

--- ogdatv21/convogdatspectocsv.awk
+++ ogdatv21/convogdatspectocsv.awk
@@ -0,0 +1,52 @@
+# AWK file credit to http://stackoverflow.com/users/751863/steve
+
+BEGIN {
+    RS="\nID\n"
+    FS="\n"
+    OFS="|"
+
+    required["1"]; required["5"]; required["8"]; required["9"]; required["10"];
+    required["11"]; required["14"]; required["15"]; required["19"]; required["21"]; required["24"];
+
+    headpart = "Bezeichner|OGD-Kurzname|CKAN Feld|Anzahl|Definition|Erläuterung|Beispiel|ON A 2270:2010|ON/EN/ISO 19115:2003|RDF property|Definition Englisch"
+    ns = split(headpart, b, OFS)
+    for (i=1; i <= ns; i++) {
+        a[b[i]]
+    }
+    print "ID" OFS headpart OFS "Occurence"
+}
+
+NR>2 {
+    for (i=1;i<=NF;i++) {
+
+        l = (l ? l (l ~ /^(extras|resources):$/ ? "" : " ") : "") $i
+
+        if ($(i+1) == "" ) {
+            if (l in a) {
+                l = ""
+            }
+            else if (l != "") {
+                c = (c ? c OFS : "") l
+                n++
+                if (n == 1) {
+                    id = $i
+                }
+                l = ""
+            }
+        }
+        if (n == 12) {
+            if (c ~ /^[0-9]/) {
+                if (id in required) {
+                    c = c OFS "R"
+                } else {
+                    c = c OFS "O"
+                }
+            } else {
+                c = "ERROR: BAD RECORD"
+            }
+            print c
+            c = n = ""
+            next
+        }
+    }
+}


Create fix_letters.awk

Create fix_letters.awk

error: pathspec 'fix_letters.awk' did not match any file(s) known to git


1st entry of basic blast parsing using awk

error: pathspec 'parse_blast.awk' did not match any file(s) known to git

--- parse_blast.awk
+++ parse_blast.awk
@@ -0,0 +1,240 @@
+#!/usr/bin/awk -f
+
+
+
+
+function is_repetitive_hit(start,end,threshold,threshold2)
+{
+  overlap[0]= -1;
+  overlap[1]= -10;
+
+  if (region[0]>=start && region[0]<end) {
+    overlap[0]=region[0];
+    extent[0]=start;
+  }
+  else if (start>=region[0] && start<region[1]) {
+    overlap[0]=start;
+    extent[0]=region[0];
+  }
+  else { # WE HAVE NO OVERLAP, SO JUST RESET AND RETURN */
+    region[0]= start; # SAVE THE CURRENT REGION FOR CHECKING THE NEXT ONE*/
+    region[1]= end;
+    return 0;  # NO REPETITIVE OVERLAP */
+  }
+  if (region[1]>=start && region[1]<end) {
+    overlap[1]=region[1];
+    extent[1]=end;
+  }
+  else {
+    overlap[1]=end;
+    extent[1]=region[1];
+  }
+  if (overlap[0]>=0) { # GOT OVERLAP */
+    my_length=end-start;
+    if (overlap[1]-overlap[0]>threshold*my_length && overlap[1]-overlap[0]>threshold2*(region[1]-region[0])) {
+#      printf("REPEAT [%d,%d]: overlaps [%d,%d]\n",start,end,region[0],region[1]);
+      region[0]=extent[0]; # SAVE THE UNION OF THE OVERLAPPING REGIONS*/
+      region[1]=extent[1];
+      return 1; # THIS IS A REPEAT!*/
+    }
+  }
+
+  region[0]= start; # SAVE THE CURRENT REGION FOR CHECKING THE NEXT ONE*/
+  region[1]= end;
+  return 0;  # NO REPETITIVE OVERLAP */
+}
+
+
+
+
+
+function print_interval()
+{
+    if (mode=="all") {
+	if (IDENTITY_PERCENT+0<identity_min) {
+	    return;
+	}
+	if (BLAST_FRAME+0>=0) {
+	    printf("MATCH_INTERVAL\t%d\t%s\t%s\t%d\t%s\t%s\t%s\t%d\t%d\t%d\n",hit_id,SEQ_ID,SUBJ_ID,BLAST_SCORE+0,E_VALUE,IDENTITY_PERCENT,BLAST_FRAME,q_interval_start,i_query-q_interval_start,s_interval_start);
+	}
+	else {
+	    printf("MATCH_INTERVAL\t%d\t%s\t%s\t%d\t%s\t%s\t%s\t%d\t%d\t%d\n",hit_id,SEQ_ID,SUBJ_ID,BLAST_SCORE+0,E_VALUE,IDENTITY_PERCENT,BLAST_FRAME,q_interval_start,i_query-q_interval_start,i_subj-BLAST_FRAME);
+	}
+    }
+    else if (mode=="detail") {
+	printf("%d\t%d\t%d\t%d\t%d\n",hit_id,q_interval_start,i_query-1,s_interval_start,i_subj-BLAST_FRAME);
+    }
+}
+
+
+
+
+function print_hit()
+{
+  if (remove_repeats) {
+    if (is_repetitive_hit(QUERY_START,QUERY_END,0.9,0.8)) {
+      if (nrepeat++ > 20) {
+	printf("REMOVING REPEAT %d-%d\n",QUERY_START,QUERY_END);
+        return 0;
+      }
+    }
+    else {
+      nrepeat=0;
+    }
+  }
+    hit_id++;
+    query_len=length(QUERY_SEQ);
+    q_interval_start= -1;
+    i_query=QUERY_START;
+    if (BLAST_FRAME+0>0) {
+	i_subj=SUBJ_START;
+    }
+    else {
+	i_subj=SUBJ_END;
+    }
+    for (i=1;i<=query_len;i++) {
+	if (substr(QUERY_SEQ,i,1)=="-") {
+	    if (q_interval_start>0) {
+		print_interval();
+	    }
+	    q_interval_start= -1;
+	    i_subj+= BLAST_FRAME;
+	}
+	else {
+	    if (substr(SUBJ_SEQ,i,1)=="-") {
+		if (q_interval_start>0) {
+		    print_interval();
+		}
+		q_interval_start= -1;
+	    }
+	    else {
+		if (q_interval_start<0) {
+		    q_interval_start=i_query;
+		    s_interval_start=i_subj;
+		}
+		i_subj+= BLAST_FRAME;
+	    }
+	    i_query++;
+	}
+    }
+    if (q_interval_start>0) {
+	print_interval();
+    }
+    gsub("-","",QUERY_SEQ);
+    gsub("-","",SUBJ_SEQ);
+    if (mode=="summary") {
+	printf("%d\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n",hit_id,SEQ_ID,SUBJ_ID,BLAST_SCORE,E_VALUE,IDENTITY_PERCENT,BLAST_FRAME,QUERY_START,QUERY_END,SUBJ_START,SUBJ_END);
+    }
+    QUERY_START=9999999;
+    QUERY_END= -1;
+    SUBJ_START=9999999;
+    SUBJ_END= -1;
+}
+
+
+
+/^Query=/ {
+    SEQ_ID=$2;
+    TITLE=substr($0,index($0,$3));
+    QUERY_START=9999999;
+    QUERY_END= -1;
+}
+
+/No hits/ {
+}
+
+
+/^>/ {
+    if (QUERY_START<QUERY_END) {
+	print_hit();
+    }
+    SUBJ_ID=substr($1,2);
+    SUBJ_TITLE=substr($0,index($0,$2));
+    BLAST_FRAME="+1"
+}
+
+/^ Score =/ {
+    if (QUERY_START<QUERY_END) {
+	print_hit();
+    }
+    BLAST_SCORE=$3;
+    E_VALUE=$8;
+    if (substr(E_VALUE,1,1)=="e") {
+	E_VALUE="1" E_VALUE;
+    }
+    if (E_VALUE+0.0 == 0.0) {
+	E_VALUE=300;
+    }
+    else {
+	E_VALUE= -log(E_VALUE+0.0)/log(10.0);
+	if (E_VALUE=="inf") {
+	    E_VALUE=300;
+	}
+    }
+    QUERY_SEQ="";
+    SUBJ_SEQ="";
+    SUBJ_START=9999999;
+    SUBJ_END= -1;
+}
+
+
+/^  Database:/ {
+    if (QUERY_START<QUERY_END) {
+	print_hit();
+    }
+}
+
+
+/Identities =/ {
+    IDENTITY_PERCENT=substr($4,2);
+    IDENTITY_PERCENT=substr(IDENTITY_PERCENT,1,index(IDENTITY_PERCENT,"%")-1);
+}
+
+
+/^ Frame =/ {
+    BLAST_FRAME=$3;
+}
+
+
+/^ Strand = / {
+    if ($5=="Plus") {
+	BLAST_FRAME="+1";
+    }
+    else if ($5=="Minus") {
+	BLAST_FRAME="-1";
+    }
+}
+
+
+/^Query:/ {
+    if ($2<QUERY_START) {
+	QUERY_START=$2;
+    }
+    if ($4<QUERY_START) {
+	QUERY_START=$4;
+    }
+    if ($2>QUERY_END) {
+	QUERY_END=$2;
+    }
+    if ($4>QUERY_END) {
+	QUERY_END=$4;
+    }
+    QUERY_SEQ=QUERY_SEQ $3;
+}
+
+
+/^Sbjct:/ {
+    if ($2<SUBJ_START) {
+	SUBJ_START=$2;
+    }
+    if ($4<SUBJ_START) {
+	SUBJ_START=$4;
+    }
+    if ($2>SUBJ_END) {
+	SUBJ_END=$2;
+    }
+    if ($4>SUBJ_END) {
+	SUBJ_END=$4;
+    }
+    SUBJ_SEQ=SUBJ_SEQ $3;
+}


checkFile: check for copyright 2014; more liberal check for spaces after import.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/citycloud-bigdata/mondrian.git/'


fixed bug #52, invalid operator |&

fixed bug #52, invalid operator |&


print "try 2.1 for FTP"

print "try 2.1 for FTP"

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/svnpenn/sage.git/'


add truecolortest.awk

add truecolortest.awk

error: pathspec 'truecolortest.awk' did not match any file(s) known to git

--- truecolortest.awk
+++ truecolortest.awk
@@ -0,0 +1,16 @@
+#!/usr/bin/awk -f
+# a simple script to test 24 bit compatibility in a terminal
+# source: https://gist.github.com/XVilka/8346728
+BEGIN{
+    s="/\\/\\/\\/\\/\\"; s=s s s s s s s s;
+    for (colnum = 0; colnum<77; colnum++) {
+        r = 255-(colnum*255/76);
+        g = (colnum*510/76);
+        b = (colnum*255/76);
+        if (g>255) g = 510-g;
+        printf "\033[48;2;%d;%d;%dm", r,g,b;
+        printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
+        printf "%s\033[0m", substr(s,colnum+1,1);
+    }
+    printf "\n";
+}


Added awk script to split FASTA file into codons

error: pathspec 'splitcodon.awk' did not match any file(s) known to git

--- splitcodon.awk
+++ splitcodon.awk
@@ -0,0 +1,27 @@
+#!/usr/bin/awk -f
+
+BEGIN{
+    RS=">";
+    FS ="\n";
+    OFS=""
+    ORS=""
+    if (ARGC < 3){
+	print "usage: awk  [INFILE] [codon number] > outfile";
+	exit 1
+	}
+    c = ARGV[2]
+    print c
+    delete ARGV[2];
+}
+{
+    if (NF > 1){
+	i = c;
+	print ">"$1 "\n"
+	sl=length($2);
+	while( i <= sl ){
+	    print substr($2, i, 1)
+	    i = i + 3;
+	}
+	print "\n"
+    }
+}


add Translate (initial)

add Translate (initial)

error: pathspec 'lib/Translate.awk' did not match any file(s) known to git

--- lib/Translate.awk
+++ lib/Translate.awk
@@ -0,0 +1,164 @@
+#!/usr/bin/gawk -f
+
+@include "lib/Commons"
+@include "lib/PLTokenizer"
+@include "lib/PLParser"
+
+# Get the translation of a string.
+function getTranslation(text, sl, tl, hl,
+                        isVerbose, toSpeech, returnPlaylist,
+                        ####
+                        altTranslations, article, ast, content,
+                        explanation, group, i, il,
+                        isPhonetic, j, original, phonetics,
+                        r, rtl, saveSortedIn, segments,
+                        temp, tokens, translation, translations,
+                        word, words, wordClasses) {
+    isPhonetic = match(tl, /^@/)
+    tl = substr(tl, 1 + isPhonetic)
+
+    if (!getCode(tl)) {
+        # Check if target language is supported
+        w("[WARNING] Unknown target language code: " tl)
+    } else if (rtl = Locale[getCode(tl)]["rtl"]) {
+        # Check if target language is RTL
+        if (!FriBidi)
+            w("[WARNING] " Locale[getCode(tl)]["name"] " is a right-to-left language, but GNU FriBidi is not found on your system.\nText might be displayed incorrectly.")
+    }
+
+    content = getResponse(text, sl, tl, hl)
+
+    plTokenize(tokens, content)
+    plParse(ast, tokens)
+
+    if (!anything(ast)) {
+        e("[ERROR] Oops! Something went wrong and I can't translate it for you :(")
+        ExitCode = 1
+    }
+
+    # Debug mode
+    if (Option["debug"]) {
+        d(sprintf("content='%s'", content))
+        da(tokens, "tokens[%s]='%s'")
+        da(ast, "ast[%s]='%s'")
+    }
+
+    saveSortedIn = PROCINFO["sorted_in"]
+    PROCINFO["sorted_in"] = "@ind_num_asc"
+    for (i in ast) {
+        if (i ~ "^0" SUBSEP "0" SUBSEP "[[:digit:]]+" SUBSEP "0$")
+            append(translations, postprocess(literal(ast[i])))
+        if (i ~ "^0" SUBSEP "0" SUBSEP "[[:digit:]]+" SUBSEP "1$")
+            append(original, literal(ast[i]))
+        if (i ~ "^0" SUBSEP "0" SUBSEP "[[:digit:]]+" SUBSEP "2$")
+            append(phonetics, literal(ast[i]))
+
+        if (match(i, "^0" SUBSEP "1" SUBSEP "([[:digit:]]+)" SUBSEP "0$", group))
+            wordClasses[group[1]] = literal(ast[i])
+
+        if (match(i, "^0" SUBSEP "1" SUBSEP "([[:digit:]]+)" SUBSEP "2" SUBSEP "([[:digit:]]+)" SUBSEP "([[:digit:]]+)$", group))
+            words[group[1]][group[2]][group[3]] = literal(ast[i])
+        if (match(i, "^0" SUBSEP "1" SUBSEP "([[:digit:]]+)" SUBSEP "2" SUBSEP "([[:digit:]]+)" SUBSEP "1" SUBSEP "([[:digit:]]+)$", group))
+            words[group[1]][group[2]]["1"][group[3]] = literal(ast[i])
+
+        if (match(i, "^0" SUBSEP "5" SUBSEP "([[:digit:]]+)" SUBSEP "0$", group))
+            segments[group[1]] = literal(ast[i])
+
+        if (match(i, "^0" SUBSEP "5" SUBSEP "([[:digit:]]+)" SUBSEP "2" SUBSEP "([[:digit:]]+)" SUBSEP "0$", group))
+            altTranslations[group[1]][group[2]] = postprocess(literal(ast[i]))
+
+        # Identified source languages
+        if (i ~ "^0" SUBSEP "8" SUBSEP "0" SUBSEP "[[:digit:]]+$")
+            append(il, literal(ast[i]))
+    }
+    PROCINFO["sorted_in"] = saveSortedIn
+
+    translation = join(translations)
+
+    if (!anything(il)) il[0] = sl
+
+    # Generate output
+    if (!isVerbose) {
+        # Brief mode
+
+        r = isPhonetic && anything(phonetics) ?
+            join(phonetics) :  # phonetic transcription
+            s(translation, tl) # target language
+
+        if (toSpeech) {
+            returnPlaylist[0]["text"] = translation
+            returnPlaylist[0]["tl"] = tl
+        }
+
+    } else {
+        # Verbose mode
+
+        r = AnsiCode["bold"] s(translation, tl) AnsiCode["no bold"] # target language
+        if (anything(phonetics))
+            r = r "\n" AnsiCode["bold"] join(phonetics) AnsiCode["no bold"] # phonetic transcription
+
+        if (anything(altTranslations[0])) {
+            # List alternative translations
+
+            if (Locale[getCode(hl)]["rtl"] || Locale[getCode(il[0])]["rtl"])
+                r = r "\n\n" s(sprintf(Locale[getCode(hl)]["message"], join(original))) # caution: mixed languages, BiDi invoked must be implemented correctly (i.e. FriBidi is required)
+            else
+                r = r "\n\n" sprintf(Locale[getCode(hl)]["message"], join(original))
+            if (Locale[getCode(il[0])]["rtl"] || Locale[getCode(tl)]["rtl"])
+                r = r "\n" s("(" Locale[getCode(il[0])]["endonym"] " ➔ " Locale[getCode(tl)]["endonym"] ")") # caution: mixed languages
+            else
+                r = r "\n" "(" Locale[getCode(il[0])]["endonym"] " ➔ " Locale[getCode(tl)]["endonym"] ")"
+
+            temp = segments[0] "(" join(altTranslations[0], "/") ")"
+            for (i = 1; i < length(altTranslations); i++)
+                temp = temp " " segments[i] "(" join(altTranslations[i], "/") ")"
+            if (Locale[getCode(il[0])]["rtl"] || Locale[getCode(tl)]["rtl"])
+                r = r "\n" AnsiCode["bold"] s(temp) AnsiCode["no bold"] # caution: mixed languages
+            else
+                r = r "\n" AnsiCode["bold"] temp AnsiCode["no bold"]
+        }
+
+        if (anything(wordClasses)) {
+            # List dictionary entries
+
+            for (i = 0; i < length(words); i++) {
+                r = r "\n\n" s("[" wordClasses[i] "]", hl) # home language
+                for (j = 0; j < length(words[i]); j++) {
+                    word = words[i][j][0]
+                    explanation = join(words[i][j][1], ", ")
+                    article = words[i][j][4]
+
+                    if (rtl) {
+                        r = r "\n" AnsiCode["bold"] sprintf("%" Option["width"] - 4 "s", s((article ?
+                                                                                "(" article ")" :
+                                                                                "") " " word, tl, Option["width"] - 4)) AnsiCode["no bold"] # target language
+                        r = r "\n" s(explanation, il[0], Option["width"] - 8) # identified source language
+                    } else {
+                        r = r "\n" "    " AnsiCode["bold"] show((article ?
+                                                                 "(" article ") " :
+                                                                 "") word, tl) AnsiCode["no bold"] # target language
+                        r = r "\n" "        " s(explanation, il[0], Option["width"] - 8) # identified source language
+                    }
+                }
+            }
+        }
+
+        if (toSpeech) {
+            if (index(Locale[getCode(hl)]["message"], "%s") > 2) {
+                returnPlaylist[0]["text"] = sprintf(Locale[getCode(hl)]["message"], "")
+                returnPlaylist[0]["tl"] = hl
+                returnPlaylist[1]["text"] = join(original)
+                returnPlaylist[1]["tl"] = il[0]
+            } else {
+                returnPlaylist[0]["text"] = join(original)
+                returnPlaylist[0]["tl"] = il[0]
+                returnPlaylist[1]["text"] = sprintf(Locale[getCode(hl)]["message"], "")
+                returnPlaylist[1]["tl"] = hl
+            }
+            returnPlaylist[2]["text"] = translation
+            returnPlaylist[2]["tl"] = tl
+        }
+    }
+
+    return r
+}


use return instead of exit in main to avoid a warning

git-svn-id: 193148810cf65385f3a195dbc9a8b504846da3a2@8941 ec53bebd-3082-4978-b11e-865c3cabbd6b

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/madscientist159/heimdal.git/'


add missing file - fix build breakage

add missing file - fix build breakage

error: pathspec 'awk/svgcolor.awk' did not match any file(s) known to git

--- awk/svgcolor.awk
+++ awk/svgcolor.awk
@@ -0,0 +1,26 @@
+#
+# /**********************************************************
+# *      This software is part of the graphviz package      *
+# *                http://www.graphviz.org/                 *
+# *                                                         *
+# *            Copyright (c) 1994-2005 AT&T Corp.           *
+# *                and is licensed under the                *
+# *            Common Public License, Version 1.0           *
+# *                      by AT&T Corp.                      *
+# *                                                         *
+# *        Information and Software Systems Research        *
+# *              AT&T Research, Florham Park NJ             *
+# **********************************************************/
+#
+# Convert SVG-1.1 color data to same RGBA format used in color_names.
+# See svgcolor_names for input format.
+#
+# All colors assumed opaque, so A = 255 in all colors
+BEGIN {
+	FS = "[ ,()]*";
+}
+/^[ 	]*$/    { next; }
+/^#/    { next; }
+{
+	printf ("/svg/%s %s %s %s 255\n", $1, $5, $6, $7);
+}


Se quitan comentarios

Se quitan comentarios

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/interwaremx/Caudal.git/'


Add tool to extract options from configure help output

error: pathspec 'tool/extract-configure-options.awk' did not match any file(s) known to git

--- tool/extract-configure-options.awk
+++ tool/extract-configure-options.awk
@@ -0,0 +1,5 @@
+$1 ~ /^--/ {
+    gsub("[[]", " ")
+    split($1,OPTION,"=")
+    print OPTION[1]
+}


added missing processdelivered.awk script

error: pathspec 'solenv/gbuild/processdelivered.awk' did not match any file(s) known to git

--- solenv/gbuild/processdelivered.awk
+++ solenv/gbuild/processdelivered.awk
@@ -0,0 +1,36 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org.  If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+BEGIN {
+    RS=" "
+    FS=":"
+}
+
+NF == 2 {
+    print "COPY " $1 " " $2;
+}
+


Create zad11.awk

Create zad11.awk

error: pathspec 'AWK/zad11.awk' did not match any file(s) known to git

--- AWK/zad11.awk
+++ AWK/zad11.awk
@@ -0,0 +1,3 @@
+#Z pliku telefony.txt wypisać imiona i nazwiska wszystkich osób, których telefony zaczynają się od 058.
+
+$NF ~ /^058/ {print $2" "$1}


add tool.subCh

add tool.subCh

error: pathspec 'tool.subCh/makeInit.awk' did not match any file(s) known to git

--- tool.subCh/makeInit.awk
+++ tool.subCh/makeInit.awk
@@ -0,0 +1,28 @@
+BEGIN{
+    # base parameter
+    dnbs = 1e7;
+    tpbs = 1e8;
+    vxbs = 0.;
+    # hotspot parameter
+    xdis = 1e7;
+    tdis = 3e9;
+
+    xmax = 1e8;
+    nmax = 800;
+
+    dx   = 2 * xmax / nmax;
+    for(i = 0; i < nmax; i++) {
+        px = dx * i - xmax;
+        if(px*px < xdis*xdis) {
+            dn = dnbs;
+            vx = vxbs;
+            xx = (px > 0.) ? px : -px;
+            tp = tdis - (tdis - tpbs) * (xx / xdis) + tpbs;
+        } else {
+            dn = dnbs;
+            vx = vxbs;
+            tp = tpbs;
+        }
+        printf("%+e %+e %+e %+e\n", px, dn, tp, vx);
+    }
+}


a_new(dc, "sage-spy.awk <timeout>", "", "try 2.1 for FTP"


adding my gpxutil iso date conversion script

error: pathspec 'gpx/iso-date/src/gpxutil.awk' did not match any file(s) known to git

--- gpx/iso-date/src/gpxutil.awk
+++ gpx/iso-date/src/gpxutil.awk
@@ -0,0 +1,63 @@
+#!/usr/bin/env gawk -f
+
+# script to convert garmin gpx files's comment/description field's
+# silly DD-MMM-YY format to ISO date format, so native ascii order
+# will sort waypoints by the time they are created.
+#
+# from: <cmt>05-JUL-13 16:34:05</cmt>
+#   to: <cmt>2013-07-05 16:34:05</cmt>
+
+BEGIN {
+    # use < or > as field separator for XML content
+    FS = "[<>]"
+
+    # we are only interested in these lines
+    p_line = "<cmt>|<desc>"
+
+    # regex pattern for the timestamp garmin outputs
+    # 05-JUL-13 16:34:05
+    # the hour can be one digit, so we group it separately
+    p_date = "([0-9]{2})-([a-zA-Z]{3})-([0-9]{2}) ([0-9]{1,2}):([0-9]{2}:[0-9]{2})"
+
+    # create the month['jan'] = '01' ... array
+    build_month()
+}
+
+# print non matching lines (implicit action)
+$0 !~ p_line
+
+# matching lines, convert matching timestamp
+$0 ~ p_line {
+    date = $3  # get the date we are interested in
+
+    if (match(date, p_date, A)) {
+        new_date = sprintf("20%s-%s-%s %02d:%s",  # assumes > year 2000
+                           A[3],
+                           month[tolower(A[2])],
+                           A[1],
+                           A[4],
+                           A[5])
+        # print date " -> " new_date
+        # replace date with new_date in line
+        sub(date, new_date, $0)
+        count++
+    }
+    print
+}
+
+END {
+    print FILENAME ":", count, "line(s) update." > "/dev/stderr"
+}
+
+# create the month['jan'] = '01' ... array
+function build_month(   i, n, mlist)
+{
+    # parameters are used as local vars, no need to pass it in
+    n = split("jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec", mlist, "|")
+    for (i = 1; i <= n; i++) {
+        month[mlist[i]] = sprintf("%02d", i)
+    }
+}
+
+# var initializes to 0 or "" as appropriate depend on use.
+# so basically no need to initialize variables


Add utility to check proper scheduling of SI

There are several types of System Information messages with tricky
scheduling rules described in 3GPP TS 05.02 § 6.3.1.3. This GNU Awk
script takes in .csv file with sequence of scheduled SI messages (for
example generated using tshark from GSMTAP capture - see usage note
inside the script) and check the scheduling rules compliance.

error: pathspec 'contrib/si_check.gawk' did not match any file(s) known to git

--- contrib/si_check.gawk
+++ contrib/si_check.gawk
@@ -0,0 +1,91 @@
+#!/usr/bin/gawk -f
+
+# Usage example:
+# tshark -2 -t r -E 'header=n' -E 'separator=,' -E 'quote=n' -T fields -e gsmtap.frame_nr -e gsmtap.ts -e gsmtap.arfcn -e _ws.col.Info -Y 'gsmtap' -r test.pcapng.gz | grep Information | env ARFCN=878 ./si_check.gawk
+# read summary on number of bis/ter messages and adjust BT_BOTH and BT_NONE environment variables accordingly
+
+BEGIN {
+	FS = ","
+	FAILED = 0
+	IGNORE = 0
+	BIS = 0
+	TER = 0
+	QUA = 0
+	BT_BOTH = ENVIRON["BOTH"]
+	BT_NONE = ENVIRON["NONE"]
+	TC_INDEX = 0
+	TC4[4] = 0
+}
+
+{ # expected .csv input as follows: gsmtap.frame_nr,gsmtap.ts,gsmtap.arfcn,_ws.col.Info
+	if ("ARFCN" in ENVIRON) { # ARFCN filtering is enabled
+		if (ENVIRON["ARFCN"] != $3) { # ignore other ARFCNs
+			IGNORE++
+			next
+		}
+	}
+	type = get_si_type($4)
+	tc = get_tc($1)
+	result = "FAIL"
+
+	if (1 == check_si_tc(tc, type)) { result = "OK" }
+	else { FAILED++ }
+
+	if (4 == tc) {
+		TC4[TC_INDEX] = type
+		TC_INDEX = int((TC_INDEX + 1) % 4)
+		if (0 == check_tc4c(type) && "OK" == result) {
+			result = "FAIL"
+			FAILED++
+		}
+	}
+	if (type == "2bis") { BIS++ }
+	if (type == "2ter") { TER++ }
+	if (type == "2quater") { QUA++ }
+	# for (i in TC4) print TC4[i] # debugging
+	printf "ARFCN=%d FN=%d TS=%d TC=%d TYPE=%s %s\n", $3, $1, $2, tc, type, result
+}
+
+END {
+	printf "check completed: total %d, failed %d, ignored %d, ok %d\nSI2bis = %d, SI2ter = %d, SI2quater = %d\n", NR, FAILED, IGNORE, NR - FAILED - IGNORE, BIS, TER, QUA
+	if ((BIS > 0 || TER > 0) && BT_NONE) { printf "please re-run with correct environment: unset 'NONE' variable\n" }
+	if ((BIS > 0 && TER > 0) && !BT_BOTH) { printf "please re-run with correct environment: set 'BOTH' variable\n" }
+}
+
+func get_si_type(s, x) { # we rely on format of Info column in wireshark output - if it's changed we're screwed
+	return x[split(s, x, " ")]
+}
+
+func get_tc(f) { # N. B: all numbers in awk are float
+	return int(int(f / 51) % 8)
+}
+
+func check_tc4c(si, count) { # check for "once in 4 consecutive occurrences" rule
+	count = 0
+	if ("2quater" != si || "2ter" != si) { return 1 } # rules is not applicable to other types
+	if (BT_NONE && "2quater" == si) { return 0 } # should be on TC=5 instead
+	if (!BT_BOTH && "2ter" == si) { return 0 } # should be on TC=5 instead
+	if (0 in TC4 && 1 in TC4 && 2 in TC4 && 3 in TC4) { # only check if we have 4 consecutive occurrences already
+		if (si == TC4[0]) { count++ }
+		if (si == TC4[1]) { count++ }
+		if (si == TC4[2]) { count++ }
+		if (si == TC4[3]) { count++ }
+		if (0 == count) { return 0 }
+	}
+	return 1
+}
+
+func check_si_tc(tc, si) { # check that SI scheduling on BCCH Norm is matching rules from 3GPP TS 05.02 § 6.3.1.3
+	switch (si) {
+	case "1":       return (0 == tc) ? 1 : 0
+	case "2":       return (1 == tc) ? 1 : 0
+	case "2bis":    return (5 == tc) ? 1 : 0
+	case "13":      return (4 == tc) ? 1 : 0
+	case "9":       return (4 == tc) ? 1 : 0
+	case "2ter":    if (BT_BOTH) { return (4 == tc) ? 1 : 0 } else { return (5 == tc) ? 1 : 0 }
+	case "2quater": if (BT_NONE) { return (5 == tc) ? 1 : 0 } else { return (4 == tc) ? 1 : 0 }
+	case "3":       return (2 == tc || 6 == tc) ? 1 : 0
+	case "4":       return (3 == tc || 7 == tc) ? 1 : 0
+	}
+	return 0
+}


builtin

builtin

error: pathspec 'src/awk/builtin.awk' did not match any file(s) known to git

--- src/awk/builtin.awk
+++ src/awk/builtin.awk
@@ -0,0 +1,13 @@
+#! /bin/awk -f
+
+#find mean and variance of a column from a file
+BEGIN {
+}
+#body
+{
+   alen=length($2)
+   if (alen >= 29)
+      print $2, alen
+}
+END {
+}


Separate awk script.

Separate awk script.

Separate awk script.

error: pathspec 'vmvar.awk' did not match any file(s) known to git


Use waas cache on Advanced page

Use waas cache on Advanced page

error: pathspec 'RPi_system/waas_all_info_cached.awk' did not match any file(s) known to git

--- RPi_system/waas_all_info_cached.awk
+++ RPi_system/waas_all_info_cached.awk
@@ -0,0 +1,100 @@
+#!/usr/bin/awk -f
+BEGIN {
+  NUM_ASIC = 6;
+  NUM_DIE = 4;
+  NUM_DCDC = 8;
+  for (asic = 0; asic < NUM_ASIC; ++asic) {
+    asic_temp[asic] = "";
+    asic_type[asic] = "OFF";
+    for (die = 0; die < NUM_DIE; ++die) {
+      asic_freq[asic, die] = 0;
+    }
+    for (dcdc = 0; dcdc < NUM_DCDC; ++dcdc)
+      asic_dcdctemp[asic, dcdc] = "";
+  }
+  cur_asic = 0;
+ }
+
+/ASICCACHE/ { asic = $2;
+  asic_type[asic] = $3;
+  asic_temp[asic] = $4;
+  for (die = 0; die < NUM_DIE; ++die) {
+    asic_freq[asic, die] = $(5 + die*2);
+    asic_volt[asic, die] = $(5 + die*2 + 1);
+  }
+  for (dcdc = 0; dcdc < NUM_DCDC; ++dcdc) {
+    asic_dcdctemp[asic, dcdc] = $(5 + NUM_DIE*2 + dcdc*3);
+    asic_dcdcVout[asic, dcdc] = $(5 + NUM_DIE*2 + dcdc*3 + 1);
+    asic_dcdcIout[asic, dcdc] = $(5 + NUM_DIE*2 + dcdc*3 + 2);
+  }
+}
+
+END {
+  print "{"
+  for (asic = 0; asic < NUM_ASIC; ++asic) {
+    num = asic + 1;
+    printf("\"asic_%d\": {\n", num);
+
+    for (dcdc = 0; dcdc < NUM_DCDC; ++dcdc) {
+      vout = "";
+      if ("" != asic_dcdcVout[asic, dcdc])
+        vout = (0.0 + asic_dcdcVout[asic, dcdc]);
+      if (vout <= 0)
+        vout_s = "";
+      else
+        vout_s = sprintf("%.4f", vout);
+      print "\t\"dcdc" dcdc "_Vout\": \"" vout_s "\","
+
+      iout = "";
+      if ("" != asic_dcdcIout[asic, dcdc])
+        iout = (0.0 + asic_dcdcIout[asic, dcdc]);
+      if (iout <= 0)
+        iout_s = "";
+      else
+        iout_s = sprintf("%.4f", iout);
+      print "\t\"dcdc" dcdc "_Iout\": \"" iout_s "\","
+
+      temp = "";
+      if ("" != asic_dcdctemp[asic, dcdc])
+        temp = (0.0 + asic_dcdctemp[asic, dcdc]);
+      if (temp <= 0)
+        temp_s = "";
+      else
+        temp_s = sprintf("%.1f", temp);
+      print "\t\"dcdc" dcdc "_Temp\": \"" temp_s "\","
+    }
+
+    for (die = 0; die < NUM_DIE; ++die) {
+      freq = "";
+      if ("" != asic_freq[asic, die])
+        freq = (0 + asic_freq[asic, die]);
+      if (freq <= 0)
+        freq = "";
+      print "\t\"die" die "_Freq\": \"" freq "\",";
+
+      volt = "";
+      if ("" != asic_volt[asic, die])
+        volt = (0.0 + asic_volt[asic, die]);
+      if (volt <= -1000)
+        volt_s = "";
+      else
+        volt_s = sprintf("%.4f", volt);
+      print "\t\"die" die "_Voffset\": \"" volt_s "\",";
+    }
+
+    temp = "";
+    if ("" != asic_temp[asic])
+      temp = (0.0 + asic_temp[asic]);
+    if (temp <= 0)
+      temp_s = "";
+    else
+      temp_s = sprintf("%.1f", temp);
+    print "\t\"temperature\": \"" temp_s "\"";
+
+    if (asic < (NUM_ASIC - 1))
+      print "},"
+    else
+      print "}"
+  }
+  print "}"
+}


pushing

pushing

error: pathspec 'auk/libOk.auk' did not match any file(s) known to git

--- auk/libOk.auk
+++ auk/libOk.auk
@@ -0,0 +1,12 @@
+# vim: ft=awk:ts=2 sw=2 sts=2 expandtab:cindent:formatoptions+=cro
+
+@include "lib"
+
+BEGIN {
+  data(d)
+  Csv(d,"data/weather" The.dot "csv")
+  _ISORTER=3
+  asort(d.rows,_,"isort_cmp")
+  o(d.rows)
+}
+


Histogram awk script

Histogram awk script

error: pathspec 'bin/histogram.awk' did not match any file(s) known to git

--- bin/histogram.awk
+++ bin/histogram.awk
@@ -0,0 +1,19 @@
+#!/usr/bin/env awk -f
+
+# draws histogram for a reverse sorted count file
+
+NR == 1 {
+    width = 60
+    max = $1;
+}
+{
+    title = $2;
+    size = width * ($1 / max);
+
+    bar = "";
+    for (i = 0; i < size; i++)
+        bar = bar"#";
+
+    count = sprintf("(%d)", $1);
+    printf "%-10s %10s %s\n", title, count, bar;
+}


s_split("/", url, br)

s_split("/", url, br)

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/svnpenn/sage.git/'


add first version of parser (AWK ftw)

add first version of parser (AWK ftw)

error: pathspec 'parser.awk' did not match any file(s) known to git

--- parser.awk
+++ parser.awk
@@ -0,0 +1,37 @@
+#!/usr/bin/awk -f
+
+function parse(string, ss, toks, f) {
+
+   if(index(string, "(") != 0) {
+      match(string, /(.*)\(([^()]+)\)(.*)/, ss);
+      toparse = ss[1] parse(ss[2]) ss[3];
+      return parse(toparse);
+   }
+
+   if(index(string, " or ") != 0) {
+      match(string, /(.*) or (.*)/, ss);
+      return "max[" parse(ss[1]) "," parse(ss[2]) "]";
+   }
+
+   if(index(string, " and ") != 0) {
+      match(string, /(.*) and (.*)/, ss);
+      return "min[" parse(ss[1]) "," parse(ss[2]) "]";
+   }
+
+   if(index(string, "min[") == 0 && index(string, "max[") == 0)
+      return "f{\""string"\"}";
+   else
+      return string;
+}
+
+{
+   split($0,ss," => ");
+   header = "Fitness rule"++n"(Fitnesses f) {";
+   result = parse(ss[1]);
+   gsub(/\[/,"(",result);
+   gsub(/\]/,")",result);
+   gsub(/\{/,"[",result);
+   gsub(/\}/,"]",result);
+   body = "\t return " result ";";
+   print header "\n" body "\n}\nrules[\"" ss[2] "\"] = rule" n ";";
+}


Add anm3 config

Add anm3 config

error: pathspec 'anm3rc.awk' did not match any file(s) known to git

--- anm3rc.awk
+++ anm3rc.awk
@@ -0,0 +1,82 @@
+@include "anm3.awk"
+
+/+1$/ {
+	magic_key("Home")
+}
+
+/+2$/ && W_COMMAND !~ /Discord/ {
+	magic_key("End")
+}
+
+/+2$/ && W_COMMAND ~ /Discord/ {
+	key("Escape") # Go to newest message and mark unread.
+}
+
+/+2$/ && W_TITLE ~ /Minecraft/ {
+	key("F5 F5") # Look behind character.
+}
+
+/-2$/ && W_TITLE ~ /Minecraft/ {
+	key("F5")
+}
+
+/-3$/ && W_COMMAND ~ /Discord/ {
+	key("Shift+Prior")
+}
+
+/+4$/ {
+	MINIMIZE_WIN = W_TITLE " " W_COMMAND
+}
+
+/-4$/ {
+	if (MINIMIZE_WIN == W_TITLE " " W_COMMAND) {
+		xdo("getactivewindow windowminimize") # Iconify window.
+	}
+}
+
+/-7$/ && W_COMMAND ~ /firefox|chrom/ {
+	key("Ctrl+Shift+t")
+}
+
+/+10$/ && W_COMMAND ~ /firefox|chrom/ { # Works for firefox, chrome, and chromium
+	key("Ctrl+w") # Close Tab
+}
+
+/+10$/ && W_COMMAND ~ /Discord/ {
+	if (W_TITLE ~ /^Discord$/) {
+		# xdo("getactivewindow windowclose") # Discord can't be reopened?
+	} else {
+		key("Ctrl+1 Ctrl+1") # Switch to start screen
+	}
+}
+
+/+10$/ && W_TITLE ~ /Terminal - man/ {
+	key("q") # quit man
+}
+
+/+10$/ && W_TITLE ~ /Terminal - (fish|.*@grant-arch-desk-1:)/ {
+	xdo("getactivewindow windowclose") # close window
+}
+
+/+10$/ && W_COMMAND ~ /mirage/ {
+	xdo("getactivewindow windowclose") # close window
+}
+
+/+10$/ && W_COMMAND ~ /pcmanfm/ {
+	key("Ctrl+w")
+}
+
+/+10$/ && W_TITLE ~ /^Terminal - .* - VIM$/ {
+	key("Escape")
+	type(":q")
+	key("Return")
+}
+
+/+11$/ {
+	magic_key("XF86Back")
+}
+
+/+12$/ {
+	magic_key("XF86Forward")
+}
+


recognize partial register operands in i386 CFI generation

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/chardi/musl.git/'


adding in addstats script for mega

adding in addstats script for mega

error: pathspec 'CPU/common/makemega_addstats.awk' did not match any file(s) known to git

--- CPU/common/makemega_addstats.awk
+++ CPU/common/makemega_addstats.awk
@@ -0,0 +1,66 @@
+#!/usr/bin/awk -f
+##########
+#The MIT License (MIT)
+#
+# Copyright (c) 2015 Aiden Lab
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+#  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+#  THE SOFTWARE.
+##########
+# Helper script for taking in multiple inter.txt and producing sums
+# Juicer version 1.5
+$1=="Sequenced"{
+gsub(/,/,"",$4);
+ total=total+$4;
+}
+$1=="Unmapped:"{
+gsub(/,/,"",$2);
+ unmapped=unmapped+$2
+}
+$1=="Normal"{
+gsub(/,/,"",$3);
+ regular=regular+$3}
+$1=="Chimeric" && $2=="Paired:"{
+gsub(/,/,"",$3);
+ normal=normal+$3}
+$2=="Ambiguous:"{
+gsub(/,/,"",$3);
+ abnorm=abnorm+$3}
+$1=="Alignable"{
+gsub(/,/,"",$4);
+ alignable=alignable+$4}
+$1=="Unique" {
+gsub(/,/,"",$3);
+ dedup=dedup+$3}
+$1=="PCR"{
+gsub(/,/,"",$3);
+ dups=dups+$3}
+$1=="Optical"{
+gsub(/,/,"",$3);
+ optdups=optdups+$3}
+END{
+ printf("%s %'d\n", "Sequenced Read Pairs:", total);
+ printf(" %s %'d (%0.2f%)\n", "Normal Paired:", regular, regular*100/total);
+ printf(" %s %'d (%0.2f%)\n", "Chimeric Paired:", normal, normal*100/total);
+ printf(" %s %'d (%0.2f%)\n", "Chimeric Ambiguous:", abnorm, abnorm*100/total);
+ printf(" %s %'d (%0.2f%)\n", "Unmapped:", unmapped, unmapped*100/total);
+ printf(" %s %'d (%0.2f%)\n", "Alignable (Normal+Chimeric Paired):", alignable, alignable*100/total);
+ printf("%s %'d\n", "Unique Reads:", dedup);
+ printf("%s %'d\n", "PCR Duplicates:", dups);
+  printf("%s %'d\n", "Optical Duplicates:", optdups);
+}


Add cubic_roots.awk

Add cubic_roots.awk

1. Awk script to compute zeros of a cubic function.

error: pathspec 'scripts/cubic_roots.awk' did not match any file(s) known to git

--- scripts/cubic_roots.awk
+++ scripts/cubic_roots.awk
@@ -0,0 +1,40 @@
+BEGIN{
+    pi = atan2(1,1)*4.0
+}{
+    # Solve for x given a3*x^3 + a2*x^2 + a1*x +a0 = 0
+    # Input is: a3 a2 a1 a0
+    a3 = $1
+    a2 = $2
+    a1 = $3
+    a0 = $4
+
+    # Normalize equation so that a3 = 1
+    a0 = a0/a3
+    a1 = a1/a3
+    a2 = a2/a3
+    a3 = a3/a3
+
+    Q = (3*a1-a2*a2)/9
+    R = (9*a2*a1-27*a0-2*a2*a2*a2)/54
+
+    D = Q*Q*Q + R*R
+
+    # Depending on number of roots, calculate differently
+    if (D<=0) {
+        print "D<=0: ",D
+        x = R/sqrt(-Q*Q*Q)
+        theta = atan2(sqrt(1-x*x), x)
+        x1 = 2*sqrt(-Q)*cos(theta/3) - a2/3
+        x2 = 2*sqrt(-Q)*cos((theta+2*pi)/3) - a2/3
+        x3 = 2*sqrt(-Q)*cos((theta+4*pi)/3) - a2/3
+        print x1,x2,x3
+    } else {
+        print "D POSITIVE: ",D
+        S = (R+sqrt(D))^(1/3)
+        T = (R-sqrt(D))^(1/3)
+        x1 = S + T - a2/3
+        print x1
+    }
+}END{
+
+}


Added an awk script to check for leaks in the memory logging output we just added.

error: pathspec 'leaks.awk' did not match any file(s) known to git

--- leaks.awk
+++ leaks.awk
@@ -0,0 +1,56 @@
+# 7 april 2015
+
+$2 == "alloc" {
+	if ($1 in A) {
+		problem($1 " already allocated (" A[$1] "); allocated at " NR)
+		next
+	}
+	A[$1] = type()
+	next
+}
+
+$2 == "realloc" {
+	if (!($1 in A)) {
+		problem($1 " not yet allocated; reallocated at " NR)
+		next
+	}
+	if ($3 in A) {
+		problem($3 " already allocated (" A[$3] "); reallocated at " NR)
+		next
+	}
+	t = A[$1]
+	delete A[$1]
+	A[$3] = t
+	next
+}
+
+$2 == "free" {
+	if (!($1 in A)) {
+		problem($1 " not yet allocated; freed at " NR)
+		next
+	}
+	delete A[$1]
+	next
+}
+
+{ problem("unrecognized line " $0 " at " NR) }
+
+END {
+	for (i in A)
+		problem("leaked " A[i] " at " i)
+	close("/dev/stderr")
+	if (hasProblems)
+		exit 1
+}
+
+function problem(s) {
+	print s > "/dev/stderr"
+	hasProblems = 1
+}
+
+function type(		s, i) {
+	s = $3
+	for (i = 4; i <= NF; i++)
+		s = s " " $i
+	return s
+}


print "try 2 for FTP"

print "try 2 for FTP"


ARM: SAMSUNG: Add script to change old clksrc_clk to new register defs

This script is used to change the old style clksrc_clk as originally
found in plat-s3c64xx to the new style. It is here for reference if needed
for future code merges.

Signed-off-by: Ben Dooks <1177f64998f284a7348354b8e91cbbe575d9858a@fluff.org>

error: pathspec 'Documentation/arm/Samsung/clksrc-change-registers.awk' did not match any file(s) known to git

--- Documentation/arm/Samsung/clksrc-change-registers.awk
+++ Documentation/arm/Samsung/clksrc-change-registers.awk
@@ -0,0 +1,167 @@
+#!/usr/bin/awk -f
+#
+# Copyright 2010 Ben Dooks <ben-linux@fluff.org>
+#
+# Released under GPLv2
+
+# example usage
+# ./clksrc-change-registers.awk arch/arm/plat-s5pc1xx/include/plat/regs-clock.h < src > dst
+
+function extract_value(s)
+{
+    eqat = index(s, "=")
+    comat = index(s, ",")
+    return substr(s, eqat+2, (comat-eqat)-2)
+}
+
+function remove_brackets(b)
+{
+    return substr(b, 2, length(b)-2)
+}
+
+function splitdefine(l, p)
+{
+    r = split(l, tp)
+
+    p[0] = tp[2]
+    p[1] = remove_brackets(tp[3])
+}
+
+function find_length(f)
+{
+    if (0)
+	printf "find_length " f "\n" > "/dev/stderr"
+
+    if (f ~ /0x1/)
+	return 1
+    else if (f ~ /0x3/)
+	return 2
+    else if (f ~ /0x7/)
+	return 3
+    else if (f ~ /0xf/)
+	return 4
+
+    printf "unknown legnth " f "\n" > "/dev/stderr"
+    exit
+}
+
+function find_shift(s)
+{
+    id = index(s, "<")
+    if (id <= 0) {
+	printf "cannot find shift " s "\n" > "/dev/stderr"
+	exit
+    }
+
+    return substr(s, id+2)
+}
+
+
+BEGIN {
+    if (ARGC < 2) {
+	print "too few arguments" > "/dev/stderr"
+	exit
+    }
+
+# read the header file and find the mask values that we will need
+# to replace and create an associative array of values
+
+    while (getline line < ARGV[1] > 0) {
+	if (line ~ /\#define.*_MASK/ &&
+	    !(line ~ /S5PC100_EPLL_MASK/) &&
+	    !(line ~ /USB_SIG_MASK/)) {
+	    splitdefine(line, fields)
+	    name = fields[0]
+	    if (0)
+		printf "MASK " line "\n" > "/dev/stderr"
+	    dmask[name,0] = find_length(fields[1])
+	    dmask[name,1] = find_shift(fields[1])
+	    if (0)
+		printf "=> '" name "' LENGTH=" dmask[name,0] " SHIFT=" dmask[name,1] "\n" > "/dev/stderr"
+	} else {
+	}
+    }
+
+    delete ARGV[1]
+}
+
+/clksrc_clk.*=.*{/ {
+    shift=""
+    mask=""
+    divshift=""
+    reg_div=""
+    reg_src=""
+    indent=1
+
+    print $0
+
+    for(; indent >= 1;) {
+	if ((getline line) <= 0) {
+	    printf "unexpected end of file" > "/dev/stderr"
+	    exit 1;
+	}
+
+	if (line ~ /\.shift/) {
+	    shift = extract_value(line)
+	} else if (line ~ /\.mask/) {
+	    mask = extract_value(line)
+	} else if (line ~ /\.reg_divider/) {
+	    reg_div = extract_value(line)
+	} else if (line ~ /\.reg_source/) {
+	    reg_src = extract_value(line)
+	} else if (line ~ /\.divider_shift/) {
+	    divshift = extract_value(line)
+	} else if (line ~ /{/) {
+		indent++
+		print line
+	    } else if (line ~ /}/) {
+	    indent--
+
+	    if (indent == 0) {
+		if (0) {
+		    printf "shift '" shift   "' ='" dmask[shift,0] "'\n" > "/dev/stderr"
+		    printf "mask  '" mask    "'\n" > "/dev/stderr"
+		    printf "dshft '" divshift "'\n" > "/dev/stderr"
+		    printf "rdiv  '" reg_div "'\n" > "/dev/stderr"
+		    printf "rsrc  '" reg_src "'\n" > "/dev/stderr"
+		}
+
+		generated = mask
+		sub(reg_src, reg_div, generated)
+
+		if (0) {
+		    printf "/* rsrc " reg_src " */\n"
+		    printf "/* rdiv " reg_div " */\n"
+		    printf "/* shift " shift " */\n"
+		    printf "/* mask " mask " */\n"
+		    printf "/* generated " generated " */\n"
+		}
+
+		if (reg_div != "") {
+		    printf "\t.reg_div = { "
+		    printf ".reg = " reg_div ", "
+		    printf ".shift = " dmask[generated,1] ", "
+		    printf ".size = " dmask[generated,0] ", "
+		    printf "},\n"
+		}
+
+		printf "\t.reg_src = { "
+		printf ".reg = " reg_src ", "
+		printf ".shift = " dmask[mask,1] ", "
+		printf ".size = " dmask[mask,0] ", "
+
+		printf "},\n"
+
+	    }
+
+	    print line
+	} else {
+	    print line
+	}
+
+	if (0)
+	    printf indent ":" line "\n" > "/dev/stderr"
+    }
+}
+
+// && ! /clksrc_clk.*=.*{/ { print $0 }


split out samples by animal

split out samples by animal

error: pathspec '15.figures.ft.awk' did not match any file(s) known to git

--- 15.figures.ft.awk
+++ 15.figures.ft.awk
@@ -0,0 +1,22 @@
+{
+	if (line == 0) {
+		for (i = 1; i <= NF; ++i) {
+			header[i] = $i;
+		}
+		headers = NF;
+	} else {
+		if ($1 == "Donor")
+			file = prefix ".Donor.tab";
+		else
+			file = prefix "." substr($1, 1, 2) ".tab";
+		if (first[file] == 0) {
+			first[file] = 1;
+			printf("%s", header[1]) > file;
+			for (i = 2; i <= headers; ++i)
+				printf("\t%s", header[i]) >> file;
+			printf("\n") >> file;
+		}
+		print $0 >> file;
+	}
+	line++;
+}


A script to show per allocator overhead/fragmentation.

Can be used as follows:

  ./scripts/allocators.awk --(current|max|max-ever) erl_crash.dump.n_0.ns_server

Produces something that looks like this:

binary_alloc[0]

	mbcs size: 32872
	mbcs overhead: 7624
	mbcs fragmentation: 23

	sbcs size: 0
	sbcs overhead: 0
	sbcs fragmentation: 0

	combined size: 32872
	combined overhead: 7624
	combined fragmentation: 23
...
Top allocators by used memory:

	eheap_alloc[1]: 166645864
	ll_alloc: 37748800
	binary_alloc[4]: 13541480
	eheap_alloc[5]: 11784296
	eheap_alloc[4]: 10031208
	eheap_alloc[2]: 8900712
	eheap_alloc[3]: 8736872
	binary_alloc[2]: 8159336
	eheap_alloc[8]: 6922344
	binary_alloc[1]: 5537896

Top allocators by memory overhead:

	binary_alloc[2]: 5073408
	binary_alloc[4]: 4742216
	eheap_alloc[8]: 3658200
	eheap_alloc[1]: 3557856
	eheap_alloc[4]: 3447792
	eheap_alloc[2]: 2049672
	ll_alloc: 1886176
	eheap_alloc[3]: 1705592
	eheap_alloc[7]: 1666024
	binary_alloc[1]: 1120688

Top allocators by memory fragmentation:

	temp_alloc[1]: 100
	temp_alloc[2]: 100
	sl_alloc[0]: 100
	temp_alloc[4]: 100
	temp_alloc[6]: 100
	sl_alloc[4]: 100
	temp_alloc[8]: 100
	sl_alloc[6]: 100
	sl_alloc[7]: 100
	temp_alloc[0]: 100

Totals:

	mbcs size: 98508160
	mbcs overhead: 35793400
	mbcs fragmentation: 36

	sbcs size: 205307904
	sbcs overhead: 6765800
	sbcs fragmentation: 3

	combined size: 303816064
	combined overhead: 42559200
	combined fragmentation: 14

Change-Id: I6319826abac003619f9de0e52ae54858d3f73680
Reviewed-on: http://review.couchbase.org/50656
Tested-by: Aliaksey Artamonau <3c875bcfb3adf2a65b2ae7686ca921e6c9433147@gmail.com>
Reviewed-by: Aliaksey Artamonau <3c875bcfb3adf2a65b2ae7686ca921e6c9433147@gmail.com>

error: pathspec 'scripts/allocators.awk' did not match any file(s) known to git

--- scripts/allocators.awk
+++ scripts/allocators.awk
@@ -0,0 +1,155 @@
+#!/usr/bin/gawk -f
+
+BEGIN {
+    type = "current"
+
+    argc = 0
+
+    for (i in ARGV) {
+        if (match(ARGV[i], /--(max|max-ever|current)/, m)) {
+            type = m[1]
+        } else {
+            argv[argc] = ARGV[i]
+            argc += 1
+        }
+    }
+
+    ARGC = argc
+    for (i in argv) {
+        ARGV[i] = argv[i]
+    }
+
+    if (type == "current") {
+        size_index = 0
+    } else if (type == "max") {
+        size_index = 1
+    } else if (type == "max-ever") {
+        size_index = 2
+    }
+}
+
+match($0, /=allocator:(.*)/, matches) {
+    allocator = matches[1]
+}
+
+match($0, /(mbcs|sbcs) (blocks|carriers) size: ([[:digit:]]+) ([[:digit:]]+) ([[:digit:]]+)/, matches) {
+    if (allocator) {
+        allocators[allocator] = ""
+        sizes[allocator "," matches[1] "," matches[2]] = matches[3 + size_index]
+    }
+}
+
+END {
+    total_mbcs_blocks = 0
+    total_mbcs_carriers = 0
+
+    total_sbcs_blocks = 0
+    total_sbcs_carriers = 0
+
+    PROCINFO["sorted_in"] = "@ind_str_asc"
+    for (allocator in allocators) {
+        mbcs_blocks = sizes[allocator ",mbcs,blocks"]
+        mbcs_carriers = sizes[allocator ",mbcs,carriers"]
+
+        sbcs_blocks = sizes[allocator ",sbcs,blocks"]
+        sbcs_carriers = sizes[allocator ",sbcs,carriers"]
+
+        mbcs_size[allocator] = mbcs_carriers
+        mbcs_overhead[allocator] = mbcs_carriers - mbcs_blocks
+        mbcs_fragmentation[allocator] = fragmentation(mbcs_overhead[allocator], mbcs_size[allocator])
+
+        sbcs_size[allocator] = sbcs_carriers
+        sbcs_overhead[allocator] = sbcs_carriers - sbcs_blocks
+        sbcs_fragmentation[allocator] = fragmentation(sbcs_overhead[allocator], sbcs_size[allocator])
+
+        total_mbcs_blocks += mbcs_blocks
+        total_mbcs_carriers += mbcs_carriers
+        total_sbcs_blocks += sbcs_blocks
+        total_sbcs_carriers += sbcs_carriers
+
+        combined_size[allocator] = mbcs_size[allocator] + sbcs_size[allocator]
+        combined_overhead[allocator] = mbcs_overhead[allocator] + sbcs_overhead[allocator]
+        combined_fragmentation[allocator] = fragmentation(combined_overhead[allocator],
+                                                          combined_size[allocator])
+
+        printf("%s\n\n", allocator)
+        printf("\tmbcs size: %d\n", mbcs_size[allocator])
+        printf("\tmbcs overhead: %d\n", mbcs_overhead[allocator])
+        printf("\tmbcs fragmentation: %d\n\n", mbcs_fragmentation[allocator])
+        printf("\tsbcs size: %d\n", sbcs_size[allocator])
+        printf("\tsbcs overhead: %d\n", sbcs_overhead[allocator])
+        printf("\tsbcs fragmentation: %d\n\n", sbcs_fragmentation[allocator])
+        printf("\tcombined size: %d\n", combined_size[allocator])
+        printf("\tcombined overhead: %d\n", combined_overhead[allocator])
+        printf("\tcombined fragmentation: %d\n\n", combined_fragmentation[allocator])
+    }
+
+    total_mbcs_overhead = total_mbcs_carriers - total_mbcs_blocks;
+    total_mbcs_fragmentation = fragmentation(total_mbcs_overhead, total_mbcs_carriers)
+
+    total_sbcs_overhead = total_sbcs_carriers - total_sbcs_blocks;
+    total_sbcs_fragmentation = fragmentation(total_sbcs_overhead, total_sbcs_carriers)
+
+    total_blocks = total_mbcs_blocks + total_sbcs_blocks
+    total_carriers = total_mbcs_carriers + total_sbcs_carriers
+    total_overhead = total_carriers - total_blocks
+    total_fragmentation = fragmentation(total_overhead, total_carriers)
+
+    top(combined_size, top_size, 10)
+    top(combined_overhead, top_overhead, 10)
+    top(combined_fragmentation, top_fragmentation, 10)
+
+    PROCINFO["sorted_in"] = "@val_type_desc"
+
+    printf("Top allocators by used memory:\n\n")
+    for (allocator in top_size) {
+        printf("\t%s: %d\n", allocator, top_size[allocator])
+    }
+
+    printf("\n")
+
+    printf("Top allocators by memory overhead:\n\n")
+    for (allocator in top_overhead) {
+        printf("\t%s: %d\n", allocator, top_overhead[allocator])
+    }
+
+    printf("\n")
+
+    printf("Top allocators by memory fragmentation:\n\n")
+    for (allocator in top_fragmentation) {
+        printf("\t%s: %d\n", allocator, top_fragmentation[allocator])
+    }
+
+    printf("\n")
+    printf("Totals:\n\n")
+    printf("\tmbcs size: %d\n", total_mbcs_carriers)
+    printf("\tmbcs overhead: %d\n", total_mbcs_overhead)
+    printf("\tmbcs fragmentation: %d\n\n", total_mbcs_fragmentation)
+    printf("\tsbcs size: %d\n", total_sbcs_carriers)
+    printf("\tsbcs overhead: %d\n", total_sbcs_overhead)
+    printf("\tsbcs fragmentation: %d\n\n", total_sbcs_fragmentation)
+    printf("\tcombined size: %d\n", total_carriers)
+    printf("\tcombined overhead: %d\n", total_overhead)
+    printf("\tcombined fragmentation: %d\n\n", total_fragmentation)
+}
+
+function fragmentation(overhead, size) {
+    if (size == 0) {
+        return 0
+    }
+
+    return 100 * overhead / size
+}
+
+function top(arr, result, count) {
+    PROCINFO["sorted_in"] = "@val_type_desc"
+
+    for (allocator in arr) {
+        result[allocator] = arr[allocator]
+
+        count -= 1
+        if (count <= 0) {
+            break
+        }
+    }
+}


2008-01-02  Martin Sebor  <sebor@roguewave.com>

	* bin/xcomp.awk: Added a pattern to extract date formatted in the
	Windows format (the output of date /T).
	(get_date): Handled badly formatted/empty dates more robustly.
	(get_buildtype): Handled build types with the [redundant] "win32" bit
	indicating Windows threads.
	(print_section): Stripped the leading directory component from the log
	file name (the equivalent of basename).
	(print_section): Formatted empty date as "N/A".

git-svn-id: 1e8a4076bc3774682289f662a06025447996ff23@608297 13f79535-47bb-0310-9956-ffa450edef68

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/pathscale/stdcxx.git/'


sage-spy: FTP

sage-spy: FTP


Add Netflix specific link generator

Add Netflix specific link generator

error: pathspec 'generateLinksFrom-NetflixActivityPage.awk' did not match any file(s) known to git

--- generateLinksFrom-NetflixActivityPage.awk
+++ generateLinksFrom-NetflixActivityPage.awk
@@ -0,0 +1,35 @@
+# Helper for converting Netflix "viewing activity" into hyperlinks
+#
+
+# Death in Paradise: Season 6: "Man Overboard, Part 2"
+# Ugly Delicious: Season 1: "Pizza"
+# Hinterland: Season 3: "Episode 2"
+
+# INVOCATION:
+#    Browse to https://www.netflix.com/viewingactivity
+#    Save as 'Page Source'
+#    awk -f generateLinksFrom-NetflixActivityPage.awk ~/Downloads/Netflix.html
+
+BEGIN {
+    RS="\<"
+    # print 10 records unless overridden with "-v maxRecordsToPrint=<n>"
+    if (maxRecordsToPrint == "") maxRecordsToPrint = 10
+}
+
+/div class="col date nowrap"/ {
+    split ($0,fld,">")
+    date = fld[2]
+}
+
+/a href="\/title\// {
+    split ($0,fld,">")
+    title = fld[2]
+    split ($0,fld,"\"")
+    URL = fld[2]
+    gsub (/"/,"",title)
+    printf ("=HYPERLINK(\"https://www.netflix.com/%s\";\"%s\")\t%s\tNetflix Streaming\n",\
+        URL,title,date)
+    recordsPrinted += 1
+    if (recordsPrinted >= maxRecordsToPrint)
+        exit
+}


Added rounding routind for awk

Added rounding routind for awk

error: pathspec 'round.awk' did not match any file(s) known to git

--- round.awk
+++ round.awk
@@ -0,0 +1,26 @@
+# round.awk --- do normal rounding
+
+function round(x,   ival, aval, fraction)
+{
+   ival = int(x)    # integer part, int() truncates
+
+   # see if fractional part
+   if (ival == x)   # no fraction
+      return ival   # ensure no decimals
+
+   if (x < 0) {
+      aval = -x     # absolute value
+      ival = int(aval)
+      fraction = aval - ival
+      if (fraction >= .5)
+         return int(x) - 1   # -2.5 --> -3
+      else
+         return int(x)       # -2.3 --> -2
+   } else {
+      fraction = x - ival
+      if (fraction >= .5)
+         return ival + 1
+      else
+         return ival
+   }
+}


New file.

New file.

error: pathspec 'LINEBREAK.awk' did not match any file(s) known to git

--- LINEBREAK.awk
+++ LINEBREAK.awk
@@ -0,0 +1,133 @@
+# LINEBREAK.awk -- awk script to produce a compact linebreak property map
+# Copyright (C) 2005
+#   National Institute of Advanced Industrial Science and Technology (AIST)
+#   Registration Number H15PRO112
+
+# This file is part of the m17n database; a sub-part of the m17n
+# library.
+
+# The m17n library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+
+# The m17n library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the m17n library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307, USA.
+
+function setLBC(name, code) {
+  if (code % 10 == 0)
+    printf "\n# %2d:%s", code, name;
+  else
+    printf "  %2d:%s", code, name;
+  to_lbc[name] = code;
+}
+
+BEGIN {
+  FS = "[; ]";
+  from = "";
+  to = "";
+  prev_lbc = -1;
+  i = 0;
+  printf "# Code:LineBreakingClass";
+  # Assign a uniq integer code to each line breaking class.
+  # The codes must be the same as "enum LineBreakingClass" of
+  # m17n-lib/src/linebreak.c
+  setLBC("OP", i++);		# open
+  setLBC("CL", i++);		# close
+  setLBC("QU", i++);		# quotation
+  setLBC("GL", i++);		# glue
+  setLBC("NS", i++);		# no-start
+  setLBC("EX", i++);		# exclamation/interrogation
+  setLBC("SY", i++);		# Syntax (slash)
+  setLBC("IS", i++);		# infix (numeric) separator
+  setLBC("PR", i++);		# prefix
+  setLBC("PO", i++);		# postfix
+  setLBC("NU", i++);		# numeric
+  setLBC("AL", i++);		# alphabetic
+  setLBC("ID", i++);		# ideograph (atomic)
+  setLBC("IN", i++);		# inseparable
+  setLBC("HY", i++);		# hyphen
+  setLBC("BA", i++);		# break after
+  setLBC("BB", i++);		# break before
+  setLBC("B2", i++);		# break both
+  setLBC("ZW", i++);		# ZW space
+  setLBC("CM", i++);		# combining mark
+  setLBC("WJ", i++);		# word joiner
+
+  # For UAX#14 7.6 Korean Syllable Block Pair Table.
+  setLBC("H2", i++);		# Hamgul 2 Jamo Syllable
+  setLBC("H3", i++);		# Hangul 3 Jamo Syllable
+  setLBC("JL", i++);		# Jamo leading consonant
+  setLBC("JV", i++);		# Jamo vowel
+  setLBC("JT", i++);		# Jamo trailing consonant
+
+  # Not handled in the pair table.
+  setLBC("SA", i++);		# south (east) asian
+  setLBC("SP", i++);		# space
+  setLBC("PS", i++);		# paragraph and line separators
+  setLBC("BK", i++);		# hard break (newline)
+  setLBC("CR", i++);		# carriage return
+  setLBC("LF", i++);		# line feed
+  setLBC("NL", i++);		# next line
+  setLBC("CB", i++);		# contingent break opportunity
+  setLBC("SG", i++);		# surrogate
+  setLBC("AI", i++);		# ambiguous
+  setLBC("XX", i);		# unknown
+
+  # The default is "XX".
+  printf "\n0x0000-0x3FFFFF %d\n", i;
+}
+
+/^[0-9A-Za-z]*;/ {
+  lbc = to_lbc[$2];
+  if (prev_lbc != lbc)
+    {
+      if (prev_lbc != -1)
+	{
+	  if (from == to)
+	    printf "%s %d\n", from, prev_lbc;
+	  else
+	    printf "%s-%s %d\n", from, to, prev_lbc;
+	}
+      from = "0x" $1;
+      to = "0x" $1;
+      prev_lbc = lbc;
+    }
+  else
+    to = "0x" $1;
+  next;
+}
+
+/^[0-9A-Za-z]*\.\.[0-9A-Za-z]*;/ {
+  lbc = to_lbc[$2];
+  if (prev_lbc != -1)
+    {
+      if (from == to)
+	printf "%s %d\n", from, prev_lbc;
+      else
+	printf "%s-%s %d\n", from, to, prev_lbc;
+    }
+  gsub("\\.\\.", "-0x");
+  printf "0x%s %d\n", $1, lbc;
+  from = "";
+  to = "";
+  prev_lbc = -1;
+  next;
+}
+
+END {
+  if (prev_lbc != -1)
+    {
+      if (from == to)
+	printf "0x%s %d\n", from, prev_lbc;
+      else
+	printf "0x%s-0x%s %d\n", from, to, prev_lbc;
+    }
+}


Create webserver.awk

Create webserver.awk

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/lramage94/dotfiles.git/'


dc["sage-spy.awk <timeout>", "", "try 2.1 for FTP"]


Added script to check if a file is grouped.

It's in awk, don't hate me.

error: pathspec 'check_grouped.awk' did not match any file(s) known to git

--- check_grouped.awk
+++ check_grouped.awk
@@ -0,0 +1,10 @@
+#!/usr/bin/gawk -f
+$1 in edges && current != $1 {
+  print "File is not grouped.";
+  exit;
+}
+
+{
+  current = $1;
+  edges[$1] = 1;
+}


Moved from ../LANGUAGE.awk.  Modified to use native.ext.

error: pathspec 'LANGDATA/LANGUAGE.awk' did not match any file(s) known to git

--- LANGDATA/LANGUAGE.awk
+++ LANGDATA/LANGUAGE.awk
@@ -0,0 +1,114 @@
+# LANGUAGE.awk -- awk script to generate LANGUAGE.tbl	-*- coding: utf-8; -*-
+# Copyright (C) 2007
+#   National Institute of Advanced Industrial Science and Technology (AIST)
+#   Registration Number H15PRO112
+
+# This file is part of the m17n database; a sub-part of the m17n
+# library.
+
+# The m17n library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+
+# The m17n library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the m17n library; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+BEGIN {
+    print ";; LANGUAGE.tbl -- ISO639 Language Code		-*- mode:lisp; coding:utf-8; -*-";
+    print ";; Copyright (C) 2007";
+    print ";;   National Institute of Advanced Industrial Science and Technology (AIST)";
+    print ";;   Registration Number H15PRO112";
+    print "";
+    print ";; This file is part of the m17n database; a sub-part of the m17n";
+    print ";; library.";
+    print "";
+    print ";; The m17n library is free software; you can redistribute it and/or";
+    print ";; modify it under the terms of the GNU Lesser General Public License";
+    print ";; as published by the Free Software Foundation; either version 2.1 of";
+    print ";; the License, or (at your option) any later version.";
+    print "";
+    print ";; The m17n library is distributed in the hope that it will be useful,";
+    print ";; but WITHOUT ANY WARRANTY; without even the implied warranty of";
+    print ";; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU";
+    print ";; Lesser General Public License for more details.";
+    print "";
+    print ";; You should have received a copy of the GNU Lesser General Public";
+    print ";; License along with the m17n library; if not, write to the Free";
+    print ";; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,";
+    print ";; Boston, MA 02110-1301, USA.";
+    print ";;";
+    print ";; The file format is this:";
+    print ";;    (ISO639-2 ISO639-1 \"ENGLISH-NAME\" [ \"NATIVE-NAME\" [ \"EXTRA-CHARS\" ]]) ...";
+    print ";; ISO639-2: 3-letter language code of ISO639-2.";
+    print ";; ISO639-1: 2-letter language code of ISO639-1, or nil if it doesn't exist.";
+    print ";; ENGLISH-NAME: English name of the language.";
+    print ";; NATIVE-NAME: Native name of the language.";
+    print ";; EXTRA-CHARS: Extra characters that uniquifies the language.";
+    print ";;";
+    print ";; ISO639-2 and ISO639-1 are extracted from ISO-639-2.txt.";
+    print ";; ENGLISH-NAME and NATIVE-NAME are mainly extracted from CLDR,";
+    print ";;   but are also supplemented from these sites:";
+
+    while (getline < "native.txt") {
+	if ($0 ~ /^[a-z]/) {
+	    NATIVE[$1] = $2;
+	    if ($3 != "")
+		CHARS[$1] = $3;
+	} else if ($0 ~ /^;;/) {
+	    print;
+	}
+    }
+    while (getline < "native.ext") {
+	if ($0 ~ /^[a-z]/) {
+	    NATIVE[$1] = $2;
+	}
+    }
+    while (getline < "en.tbl") {
+	split($0, array, "\(| \"|\" \"|\"\)")
+	ENGLISH[array[2]] = array[3];
+    }
+}
+
+/^[a-z][a-z][a-z]\|/ {
+    code3 = $1;
+    code2 = $3;
+    if (code2 == "" || code2 == "NULL")
+	code2 = "nil";
+    native = NATIVE[code2];
+    if (! native)
+	native = NATIVE[code3];
+    chars = CHARS[code3];
+    name = $4;
+    name = ENGLISH[code2];
+    if (! name)
+	name = ENGLISH[code3];
+    if (name == "Greek, Modern (1453-)")
+	name = "Greek";
+    else {
+	gsub("; .*", "", name);
+	gsub(" \\(Other\\)$", "", name);
+	gsub(" languages$", "", name);
+	if (name ~ /\(.*[0-9].*\)$/)
+	    gsub(" \\([^)]*\\)$", "", name);
+	if (name ~ ", ") {
+	    split(name, array, ", ");
+	    name = array[2] " " array[1];
+	}
+    }
+    printf "(%s %-3s \"%s\"", code3, code2, name;
+    if (native != "")
+	printf " \"%s\"", native;
+    else if (chars != "")
+	printf " nil";
+    if (chars != "")
+	printf " \"%s\"", chars;
+    printf ")\n";
+}


struggle with speedseq

struggle with speedseq

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/marcelm/CAW.git/'


Create zad4.awk

Create zad4.awk

error: pathspec 'AWK/zad4.awk' did not match any file(s) known to git

--- AWK/zad4.awk
+++ AWK/zad4.awk
@@ -0,0 +1,5 @@
+#Z pliku /etc/passwd wypisać wszystkie wpisy o innych użytkownikach niż root, których UID jest równy 0, w przeciwnym przypadku wypisać test informujący, że takich użytkowników nie znaleziono.
+
+BEGIN {FS=":"}
+$1!="root" && $3=="0"{brak++;print $1}
+END {if(brak==0) print"brak uzytkownikow"}


fixed bug of missing header variable in file exist check

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/orbifx/yamado.git/'


added awk script

added awk script

error: pathspec 'src/build/addcolon.awk' did not match any file(s) known to git

--- src/build/addcolon.awk
+++ src/build/addcolon.awk
@@ -0,0 +1,13 @@
+#!/bin/awk -f
+#
+# buraq: this awk script was used to add a colon to .neg files in test suite.
+#        though it might be useful to have it somewhere for non-awk users as a reference.
+#
+{ i = match ($0, /scala:[0-9]+/);
+   if(i == 0) {
+	 print $0
+   } else {
+	   sub(/scala:[0-9]+/, "&:")
+		   print $0
+   }
+}


Create postbanken.awk

Create postbanken.awk

Um aus der CSV-Datei von der Poatbank für GNUCash eine QIF-Datei zu erzeugen, kann dieses AWK-Skript verwenden.
Ich habe dieses AWK-Skript auf der Webseite "http://wiki.gnucash.org/wiki/FAQ#Q:_How_do_I_convert_from_CSV.2C_TSV.2C_XLS_.28Excel.29.2C_or_SXC_.28OpenOffice.org_Calc.29_to_a_QIF.3F" gefunden.

error: pathspec 'postbanken.awk' did not match any file(s) known to git

--- postbanken.awk
+++ postbanken.awk
@@ -0,0 +1,39 @@
+#
+# Quelle (2014-12-07):
+# http://wiki.gnucash.org/wiki/FAQ#Q:_How_do_I_convert_from_CSV.2C_TSV.2C_XLS_.28Excel.29.2C_or_SXC_.28OpenOffice.org_Calc.29_to_a_QIF.3F
+# Anwendung:
+# awk -f postbanken.awk kontoutskrift.csv > import.qif
+#
+# awk convert fra Postbankens CSV til QIF(Gnucash, quicken, osv)
+# CSV fra Postbanken er ikke en kommaseparert fil, men en tekstfil med feltene på fast plass.
+# Bruker derfor fieldwidths i awk. Det går også ant å bruke substr().
+# Kilder:
+# http://wiki.gnucash.org/wiki/FAQ
+# http://www.ibm.com/developerworks/library/l-awk1.html
+# http://www.ibm.com/developerworks/library/l-awk2.html
+# http://www.grymoire.com/Unix/Awk.html#uh-67
+# Samt manualen til awk og egrep.
+#
+# Bruk filen slik:
+# $ awk -f postbanken.awk kontoutskrift.csv > import.qif
+#
+#
+# Arve Seljebu - juni 2010
+
+
+# Del opp filen i felter og skriv "!Type:Bank" bare en gang i toppen av filen
+BEGIN {FIELDWIDTHS="8 5 17 35 31 11 1 11"; print "!Type:Bank";}
+# Bare bruk linjen hvis den inneholder dato
+{ if ($0 ~ /[0-9][0-9].[0-9][0-9].[0-9][0-9]/) {
+# Dato
+  print "D" $1;
+# Avkommenter neste linje for å bruke BETALING, BETALING UTLAND osv som konto/kategori
+# print "L" $3;
+# Beskrivelse/memo
+  print "M" $4;
+# Debit eller kredit
+  if ($6 == 0) { print "T-" $8; }
+  else { print "T" $6; }
+  print "^";
+  }
+}


packager monitoring

packager monitoring

error: pathspec 'node_addons/FormatConverter/test/anal_nginx_log_packager.awk' did not match any file(s) known to git

--- node_addons/FormatConverter/test/anal_nginx_log_packager.awk
+++ node_addons/FormatConverter/test/anal_nginx_log_packager.awk
@@ -0,0 +1,82 @@
+BEGIN{
+    if(!maxInterval)
+        maxInterval=60
+    if(!maxChunkDuration)
+        maxChunkDuration=12000
+    if(!minChunkDuration)
+        minChunkDuration=1000
+    state = "waitChunk"
+    if(!verbose)
+        verbose=1
+}
+
+function addStats(caption,data){
+    cnts[caption] = cnts[caption] + 1
+    sums[caption] = sums[caption] + data
+    sums2[caption] = sums2[caption] + data*data
+}
+
+function printStats(caption){
+    cnt = cnts[caption]
+    if(cnt){
+        sum = sums[caption]
+        sum2 = sums2[caption]
+        stddev = 0
+        if((cnt > 1)){
+         stddev = sqrt( (sum2*cnt -sum*sum) / (cnt*(cnt-1)))
+        }
+        printf "%s avg request interval: %.2f stddev: %.2f #: %d\n", caption,sum/cnt,stddev,cnt
+    } else {
+        print "couldn't find stats for "caption
+    }
+}
+
+
+
+$0 ~ /\[debug\]/ && $0 ~ /GET \/hls\/(.*)\/playlist.json\/seg/ {
+    split($10,b,"-");
+    lastChunkPath=$10
+    if(verbose){
+        print $2 " "lastChunkPath;
+    }
+    if(lastChunk && lastChunk+1 != b[2]){
+        print $2" "lastChunkPath" error: expected chunk "lastChunk+1" got: "b[2]
+        delete __lastDTS[0]
+    }
+    lastChunk=b[2];
+    split($2,a,":");
+    time=a[3]+a[2]*60+a[1]*3600;
+    if(lastTime){
+        diff=time-lastTime
+        if(diff>maxInterval){
+            print $2" "lastChunkPath" error: requested chunk after "diff" sec."
+        }
+        if(diff>0){
+            addStats("chunkInterval",diff)
+        }
+    }
+    lastTime = time
+    state = "checkDTS"
+}
+
+verbose && state == "checkDTS" && $0 ~ /parsed clip source/ {
+    print $2" "$11" "$12" "$13
+}
+
+state == "checkDTS" && $0 ~ /first frame dts/ {
+    state = "waitChunk"
+    if( __lastDTS[0]){
+        chunkDuration = $11 -  __lastDTS[0]
+
+        addStats("chunkDuration",chunkDuration)
+        if(chunkDuration > maxChunkDuration || chunkDuration < minChunkDuration){
+            print $2" "lastChunkPath" bad chunk duration "chunkDuration
+        }
+    }
+     __lastDTS[0] = $11
+}
+
+END {
+    printStats("chunkInterval")
+    printStats("chunkDuration")
+}


2008-01-03  Martin Sebor  <sebor@roguewave.com>

	* bin/xcomp.awk (sectcomponents): Added an array of lists of component
	names for each section with each list maintaining the same order as
	in the logs.
	(print_section): Used the sectcomponents array to print components
	in each table in the same order as they appear in the build logs.

git-svn-id: 1e8a4076bc3774682289f662a06025447996ff23@608678 13f79535-47bb-0310-9956-ffa450edef68


ch = str_split(br[3], pa, ".")

ch = str_split(br[3], pa, ".")

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/svnpenn/sage.git/'


Add a minimal constants.awk for Caml. (sh)

git-svn-id: 30a5f035a20f1bc647618dbad7eea2a951b61b7c@2849 91a5dbb7-01b9-0310-9b5f-b28072856b6e

error: pathspec 'Bindings/Caml/constants.awk' did not match any file(s) known to git

--- Bindings/Caml/constants.awk
+++ Bindings/Caml/constants.awk
@@ -0,0 +1,113 @@
+###############################################################################
+# BRLTTY - A background process providing access to the console screen (when in
+#          text mode) for a blind person using a refreshable braille display.
+#
+# Copyright (C) 1995-2006 by The BRLTTY Developers.
+#
+# BRLTTY comes with ABSOLUTELY NO WARRANTY.
+#
+# This is free software, placed under the terms of the
+# GNU General Public License, as published by the Free Software
+# Foundation.  Please see the file COPYING for details.
+#
+# Web Page: http://mielke.cc/brltty/
+#
+# This software is maintained by Dave Mielke <dave@mielke.cc>.
+###############################################################################
+
+BEGIN {
+  print "type t ="
+}
+
+END {
+}
+
+function brlCommand(name, symbol, value, help) {
+  writeCommandDefinition(name, value, help)
+}
+
+function brlBlock(name, symbol, value, help) {
+
+  if (value ~ /^0[xX][0-9a-fA-F]+00$/) {
+    writeCommandDefinition(name, hexadecimalValue(value) "00", help)
+  }
+}
+
+function brlKey(name, symbol, value, help) {
+#  print "braille key:"
+#  print name symbol value
+#  print "(** " help " *)"
+}
+
+function brlFlag(name, symbol, value, help) {
+#  if (value ~ /^0[xX][0-9a-fA-F]+0000$/) {
+#    value = hexadecimalValue(substr(value, 1, length(value)-4))
+#    if (name ~ /^CHAR_/) {
+#      name = substr(name, 6)
+#    } else {
+#      value = value "00"
+#    }
+#  } else if (value ~ /^\(/) {
+#    gsub("BRL_FLG_", "KEY_FLG_", value)
+#  } else {
+#    return
+#  }
+#  writeCamlConstant("int", "KEY_FLG_" name, value, help)
+}
+
+function brlDot(number, symbol, value, help) {
+#  writeCamlConstant("int", "DOT" number, value, help)
+}
+
+function apiConstant(name, symbol, value, help) {
+#  writeCamlConstant("int", name, value);
+}
+
+function apiMask(name, symbol, value, help) {
+#  writeCamlConstant("long", "KEY_" name, hexadecimalValue(value) "L");
+}
+
+function apiShift(name, symbol, value, help) {
+#  writeCamlConstant("int", "KEY_" name, hexadecimalValue(value));
+}
+
+function apiType(name, symbol, value, help) {
+#  writeCamlConstant("int", "KEY_TYPE_" name, hexadecimalValue(value));
+}
+
+function apiKey(name, symbol, value, help) {
+#  value = hexadecimalValue(value)
+#
+#  if (name == "FUNCTION") {
+#    for (i=0; i<35; ++i) {
+#      writeKeyDefinition("F" (i+1), "(" value " + " i ")")
+#    }
+#  } else {
+#    writeKeyDefinition(name, value)
+#  }
+}
+
+function writeCommandDefinition(name, value, help) {
+  print "  | CMD_" name " (** " help " *)"
+}
+
+function writeKeyDefinition(name, value) {
+#  writeCamlConstant("int", "KEY_SYM_" name, value)
+}
+
+function writeCamlConstant(type, name, value, help) {
+#  writeCamldocComment(help)
+#  print "  public static final " type " " name " = " value ";"
+}
+
+function writeCamldocComment(text) {
+#  if (length(text) > 0) print " (** " text " *)"
+}
+
+function hexadecimalValue(value) {
+  value = tolower(value)
+  gsub("x0+", "x", value)
+  gsub("x$", "x0", value)
+  return value
+}
+


A script that allows comparison between two S4 runs.

git-svn-id: a8b04003a33e1d3e001b9d20391fa392a9f62d91@1467 94700074-3cef-4d97-a70e-9c8c206c02f5

error: pathspec 'scripts/compareResults.awk' did not match any file(s) known to git

--- scripts/compareResults.awk
+++ scripts/compareResults.awk
@@ -0,0 +1,32 @@
+#
+#
+# An [gn]awk script that allows a comparison between two runs of S4
+# This script will annotate the output of S4 with the corresponding
+# WER from a given previously collected S4 output.  This is useful
+# when tuning the recognizer.
+#
+# Typical usage:
+#
+# make an4_words_trigram > results.out &
+# tail -f results.out | gawk -f compareResults.awk previousResults.out
+#
+#
+BEGIN {
+        other = ARGV[1];
+        ARGV[1] = "";
+        print ARGV[1];
+}
+
+$1 != "Words:" { print $0; }
+
+$1 == "Words:" {
+   words = $2;
+   while (getline oRes < other > 0) {
+       split(oRes, arr);
+       if (arr[1] == "Words:" && arr[2] == words) {
+           otherWER = arr[6];
+           break;
+       }
+   }
+   printf("%s  Previous WER: %s\n", $0, otherWER);
+}


a short script used to make a cpu runs 100%

error: pathspec 'runCPU.awk' did not match any file(s) known to git


normal and tumor indexes have to be added as command-line parameters -v NORMAL_IDX=10 -v TUMOUR_IDX=9

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/szilvajuhos/CAW.git/'


remove useless file

remove useless file

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/mancoast/cado-nfs.git/'


fix _

fix _

git-svn-id: 193148810cf65385f3a195dbc9a8b504846da3a2@4139 ec53bebd-3082-4978-b11e-865c3cabbd6b

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/madscientist159/heimdal.git/'


text matching

text matching

This example uses the sub() function to make a change to the input record. (sub() replaces the first instance of any text matched by the first argument with the string provided as the second argument; see String-Manipulation Functions.) Here, the regexp /a+/ indicates “one or more ‘a’ characters,” and the replacement text is ‘<A>’.

error: pathspec 'REGEX/txt.awk' did not match any file(s) known to git

--- REGEX/txt.awk
+++ REGEX/txt.awk
@@ -0,0 +1 @@
+echo aaaabcd | awk '{ sub(/a+/, "<A>"); print }'


2008-05-14  Martin Sebor  <sebor@roguewave.com>

	* bin/xcomp.awk (get_gzlogfname): Temporarily hardcoded "logs/"
	as the directory prefix for logs HTML href tags, until a cleaner
	solution is devised.

git-svn-id: 8ce9432b95a2a271c6c279131eb1bb968a8ee7fb@656477 13f79535-47bb-0310-9956-ffa450edef68

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/pathscale/stdcxx.git/'


make grammar_to_rules work with actions, sort of

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/darkfoxprime/foxCAT.git/'


use full prototype for main

use full prototype for main

git-svn-id: 193148810cf65385f3a195dbc9a8b504846da3a2@11676 ec53bebd-3082-4978-b11e-865c3cabbd6b


Add AWK script to compute the corrected sample standard deviation

error: pathspec 'tools/awk/stdev.awk' did not match any file(s) known to git

--- tools/awk/stdev.awk
+++ tools/awk/stdev.awk
@@ -0,0 +1,36 @@
+#!/usr/bin/env awk -f
+#
+# Computes the corrected sample standard deviation.
+#
+# Usage: stdev
+#
+# Input:
+#   - a column of numbers
+#
+# Output:
+#   - corrected sample standard deviation
+#
+# Notes:
+#   - Uses [Welford's method][1].
+#
+# [1]: https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Online_algorithm
+
+BEGIN {
+	delta = 0
+	mean = 0
+	M2 = 0
+	N = 0
+}
+{
+	N += 1
+	delta = $1 - mean
+	mean += delta / N
+	M2 += delta * ($1 - mu)
+}
+END {
+	if (N < 2) {
+		print 0
+	} else {
+		print sqrt(M2 / (N-1))
+	}
+}


added one more auxiliary script for getting random vectors

error: pathspec 'scripts/get_vectors.awk' did not match any file(s) known to git

--- scripts/get_vectors.awk
+++ scripts/get_vectors.awk
@@ -0,0 +1,40 @@
+#!/usr/bin/awk -f
+
+##################################################################
+BEGIN {
+    FS = "\t"
+    if (ARGC != 4) {
+	printf("Incorrect number of arguments.") > "/sys/stderr"
+	exit 1
+    }
+
+    ret = 0
+    WCL = 0 + ARGV[1]
+    # obtain words to fetch
+    ifile = ARGV[2]
+    while ((ret = (getline < ifile)) > 0) {
+	if (!NF)
+	    continue
+	else if (NF != 2) {
+	    printf("Incorrect line format: %s", $0) > "/sys/stderr"
+	    exit 2
+	}
+	WORD2SEEK[$1] = ""
+    }
+    ARGV[1] = ARGV[2] = ""
+    # obtain random line numbers to fetch
+    srand()
+    wcl = WCL - 1
+    for (i = 1; i < WCL; ++i) {
+	randarr[i] = rand() * wcl + 1
+    }
+    asorti(randarr, tmparr)
+    delete randarr
+    wcl = WCL / 100
+    for (i = 1; i < WCL; ++i) {
+	FNR2SEEK[tmparr[i]] = ""
+    }
+}
+
+##################################################################
+NF && FNR > 1 && ($1 in WORD2SEEK || FNR in FNR2SEEK)


Make script to process top level BritBox shows

error: pathspec 'getBritBoxProgramsFrom-webscraper.awk' did not match any file(s) known to git

--- getBritBoxProgramsFrom-webscraper.awk
+++ getBritBoxProgramsFrom-webscraper.awk
@@ -0,0 +1,72 @@
+BEGIN {
+    FS="\t"
+    print "Sortkey\tTitle\tSeasons\tDuration\tYear\tRating\tDescription"
+}
+
+# if needed for debugging record placment, replace "/nosuchrecord/" below
+/nosuchrecord/ {
+    print ""
+    print NR " - " $0
+    for ( i = 1; i <= NF; i++ ) {
+        print "field " i " = " $i
+    }
+}
+
+{
+    for ( i = 1; i <= NF; i++ ) {
+        if ($i == "null")
+            $i = ""
+    }
+}
+
+/\/us\/movie\/|\/us\/show\//{
+    URL = $3
+    showTitle = $4
+    Year = $5
+    NumSeasons = $6
+    Duration = $7
+    Rating = $8
+    Description = $9
+
+    sub (/ Season[s]/,"",NumSeasons)
+    sub( / min/,"",Duration)
+
+    # Convert duration from minutes to HMS
+    secs = 0
+    mins = Duration % 60
+    hrs = int(Duration / 60)
+    HMS = sprintf ("%02d:%02d:%02d", hrs, mins, secs)
+
+    # Titles starting with "The" should not sort based on "The"
+    if (match (showTitle, /^The /)) {
+        showTitle = substr(showTitle, 5) ", The"
+    }
+}
+
+/\/us\/movie\// {
+    # Extract movie sortkey from URL
+    nflds = split (URL,fld,"_")
+    if (URL ~ /_[[:digit:]]*$/) {
+        sortkey = sprintf ("M%05d", fld[nflds])
+        printf \
+            ("%s %s - mv\t=HYPERLINK(\"https://www.britbox.com%s\";\"%s, %s, %s\"\)\t\t%s\t%s\t%s\t%s\n", \
+             showTitle, sortkey, URL, showTitle, sortkey, \
+             Title, HMS, Year, Rating, Description)
+    }
+    next
+}
+
+/\/us\/show\// {
+    # Extract show sortkey from URL
+    nflds = split (URL,fld,"_")
+    if (URL ~ /_[[:digit:]]*$/) {
+        sortkey = sprintf ("S%05d", fld[nflds])
+        printf \
+            ("%s %s - sh\t=HYPERLINK(\"https://www.britbox.com%s\";\"%s, %s, %s\"\)\t\t%s\t%s\t%s\t%s\n", \
+             showTitle, sortkey, URL, showTitle, sortkey, \
+             Title, HMS, Year, Rating, Description)
+    }
+    next
+}
+
+


2011-08-08: parsegaspriceshtml.awk: Created.

error: pathspec 'parsegaspriceshtml.awk' did not match any file(s) known to git

--- parsegaspriceshtml.awk
+++ parsegaspriceshtml.awk
@@ -0,0 +1,100 @@
+BEGIN {
+   False=0
+   True=!False
+   i=0
+   inGasPriceRecord=False
+   expectName=False
+}
+
+/
<div class=\"p","")
+   sub("^[ ]*

[ ]*$","")
+   # print
+   price[i]=$0
+}
+
+inGasPriceRecord && /
/ {
+   sub("^[ ]*
","")
+   sub("
[ ]*$","")
+   sub("&","\\&")
+   address[i,ai[i]]=$0
+   # print "address["ai[i]"]="address[i,ai[i]]
+   ai[i]++
+}
+
+inGasPriceRecord && /
/ {
+   expectName=True
+}
+
+inGasPriceRecord && expectName && /<a href="/ {
+   expectName=False
+   sub("[ ]*$","")
+   sub("^.*>","")
+   sub("&","\\&")
+   name[i]=$0
+   # print
+}
+
+inGasPriceRecord && / class="p_area">/ {
+   sub("^.* class=\"p_area\">","")
+   sub("[ ]*$","")
+   area[i]=$0
+   # print
+}
+
+inGasPriceRecord && /<a href="\/Profile[.]aspx[?]member=/ {
+   sub("^.*<a href=\"/Profile[.]aspx[?]member=","")
+   sub("\".*$","")
+   reporter[i]=$0
+   # print
+}
+
+inGasPriceRecord && expectRelativeTime {
+   expectRelativeTime=False
+   sub("^[ ]*","")
+   sub("[ ]ago[ ]*$","")
+   timeAgo[i]=$0
+   # print
+}
+
+inGasPriceRecord && /<div class="tm" / {
+   sub("^[ ]*
[ ]*$","")
+   time[i]=$0
+   expectRelativeTime=True
+   # print
+}
+
+inGasPriceRecord && /<\/tr>/ {
+   i ++
+   # print "EOR"
+   # print $0
+   inGasPriceRecord=False
+}
+
+END {
+   for (j=0;j<i && True;j++) {
+      if (False) {
+         print j
+         print price[j]
+         print name[j]
+         print address[j,0]
+         print area[j]
+         print reporter[j]
+         print time[j]
+         print timeAgo[j]
+      }
+
+      delimiter="\t"
+      print price[j] delimiter name[j] delimiter address[j,0] delimiter area[j] delimiter reporter[j] delimiter time[j] delimiter timeAgo[j]
+   }
+}


forgot pop_push.awk

forgot pop_push.awk

error: pathspec 'util/opt/pop_push.awk' did not match any file(s) known to git

--- util/opt/pop_push.awk
+++ util/opt/pop_push.awk
@@ -0,0 +1,30 @@
+BEGIN	{ print "#define CONDBRA        '\001'" > "pop_push.h"
+	  print "#define JUMP           '\002'" >> "pop_push.h"
+	  print "#define HASLABEL       '\004'" >> "pop_push.h"
+	  print "#include \"pop_push.h\""
+	  print
+	  print "char *pop_push[] = {"
+	  print "\"\","
+	  switch = 0
+}
+/aar/	{ switch = NR }
+	{ if (switch) {
+	      printf("\"%s\",\n",$3)
+	      col_2[NR-switch] = $2
+	  }
+	}
+END	{ print "};"
+	  print
+	  print "char flow_tab[]= {"
+	  print "'\000',"
+	  for(i=0; i < NR-switch; i++) {
+		inf = col_2[i]
+		f_out = ""
+		if (substr(inf,1,1)=="b") f_out = "HASLABEL|"
+		if (substr(inf,2,1)=="c") f_out = f_out "CONDBRA"
+		else if (substr(inf,2,1)=="t") f_out = f_out "JUMP"
+		else f_out = "'\000'"
+		print f_out","
+	  }
+	  print "};"
+	}


Add AWK script to compute the unbiased sample variance

error: pathspec 'tools/awk/variance.awk' did not match any file(s) known to git

--- tools/awk/variance.awk
+++ tools/awk/variance.awk
@@ -0,0 +1,36 @@
+#!/usr/bin/env awk -f
+#
+# Computes the unbiased sample variance.
+#
+# Usage: variance
+#
+# Input:
+#   - a column of numbers
+#
+# Output:
+#   - unbiased sample variance
+#
+# Notes:
+#   - Uses [Welford's method][1].
+#
+# [1]: https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Online_algorithm
+
+BEGIN {
+	delta = 0
+	mean = 0
+	M2 = 0
+	N = 0
+}
+{
+	N += 1
+	delta = $1 - mean
+	mean += delta / N
+	M2 += delta * ($1 - mu)
+}
+END {
+	if (N < 2) {
+		print 0
+	} else {
+		print M2 / (N-1)
+	}
+}


iorev_tagger now working (file was missing)

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@8324 e6417c60-b987-48fd-844e-b20f0fcc1017

error: pathspec 'seqan/misc/iorev_tagger_level2.awk' did not match any file(s) known to git

--- seqan/misc/iorev_tagger_level2.awk
+++ seqan/misc/iorev_tagger_level2.awk
@@ -0,0 +1,48 @@
+#!/usr/bin/awk -f
+
+BEGIN {
+
+    LINE_FC_INDEX = 1
+    LINE_T_INDEX = 1
+#     split(substr($lines, 2, length($lines)), LINES_LIST)
+    split(substr(lines_fc,2,length(lines_fc)), LINES_FC_LIST, "_")
+    split(substr(lines_t,2,length(lines_t)), LINES_T_LIST, "_")
+    NEWFC = 0
+    NEWT = 0
+
+#     print "lines_fc " lines_fc | "cat 1>&2"
+#     print "lines_fc_list[2] " LINES_FC_LIST[2] | "cat 1>&2"
+#     print LINES_T_LIST[1] | "cat 1>&2"
+
+}
+
+NR == LINES_FC_LIST[LINE_FC_INDEX] {
+    NEWFC = 1
+}
+
+NR == LINES_T_LIST[LINE_T_INDEX] {
+    NEWT = 1
+}
+
+
+{
+    if (NEWT == 1) {
+        print $0 " //IOREV _todo_"
+        LINE_T_INDEX = LINE_T_INDEX + 1
+        NEWT = 0
+    }
+    else
+        print $0
+}
+
+
+
+$0 ~ "{" {
+#     print "reached braces"
+    if (NEWFC == 1) {
+        NEWFC = 0
+        LINE_FC_INDEX = LINE_FC_INDEX + 1
+        print "//IOREV _todo_"
+    }
+}
+


add prntblk

add prntblk

- util for printing a block of text
  matching between two regular expressions

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/grafoo/utl.git/'


Added an awk script to check for leaks in the memory logging output we just added.

error: pathspec 'new/leaks.awk' did not match any file(s) known to git

--- new/leaks.awk
+++ new/leaks.awk
@@ -0,0 +1,56 @@
+# 7 april 2015
+
+$2 == "alloc" {
+	if ($1 in A) {
+		problem($1 " already allocated (" A[$1] "); allocated at " NR)
+		next
+	}
+	A[$1] = type()
+	next
+}
+
+$2 == "realloc" {
+	if (!($1 in A)) {
+		problem($1 " not yet allocated; reallocated at " NR)
+		next
+	}
+	if ($3 in A) {
+		problem($3 " already allocated (" A[$3] "); reallocated at " NR)
+		next
+	}
+	t = A[$1]
+	delete A[$1]
+	A[$3] = t
+	next
+}
+
+$2 == "free" {
+	if (!($1 in A)) {
+		problem($1 " not yet allocated; freed at " NR)
+		next
+	}
+	delete A[$1]
+	next
+}
+
+{ problem("unrecognized line " $0 " at " NR) }
+
+END {
+	for (i in A)
+		problem("leaked " A[i] " at " i)
+	close("/dev/stderr")
+	if (hasProblems)
+		exit 1
+}
+
+function problem(s) {
+	print s > "/dev/stderr"
+	hasProblems = 1
+}
+
+function type(		s, i) {
+	s = $3
+	for (i = 4; i <= NF; i++)
+		s = s " " $i
+	return s
+}


Create zad9.awk

Create zad9.awk

error: pathspec 'AWK/zad9.awk' did not match any file(s) known to git

--- AWK/zad9.awk
+++ AWK/zad9.awk
@@ -0,0 +1,6 @@
+#Przepisz z pliku wejściowego liczby.txt linie, które są liczbami rzeczywistymi.
+
+#BEGIN {cyfry="^[0-9]+$" }; $0 ~cyfry
+
+
+{printf "%f\n", $1}


bin/cat-press.awk: new file

bin/cat-press.awk: new file

error: pathspec 'bin/cat-press.awk' did not match any file(s) known to git

--- bin/cat-press.awk
+++ bin/cat-press.awk
@@ -0,0 +1,23 @@
+#!/usr/bin/awk -f
+
+function flush() {
+    if (n > 0) {
+	if (n > 1)
+	    printf("<%u times> ", n);
+	print mem
+	mem = ""
+	n = 0
+    }
+}
+
+BEGIN { mem = n = 0 }
+
+$0 == mem { ++n; next }
+
+{
+    flush()
+    mem = $0
+    n = 1
+}
+
+END { flush() }


Added src_from_args

Added src_from_args

error: pathspec 'test/src_from_args.awk' did not match any file(s) known to git

--- test/src_from_args.awk
+++ test/src_from_args.awk
@@ -0,0 +1 @@
+/^\(<FSItem/{s=index($0,"/mnt/a"); e=index($0,">, <FSItem "); l=e-s; printf("%s\n",substr($0,s,l))}


fixed awk missmatch of publish category

fixed awk missmatch of publish category

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/orbifx/yamado.git/'