[LON-CAPA-cvs] cvs: modules /gerd/usagestats domain_kinds.tab eval_domains.pl update_domain_kinds.pl

www www at source.lon-capa.org
Tue Dec 6 15:28:42 EST 2011


www		Tue Dec  6 20:28:42 2011 EDT

  Modified files:              
    /modules/gerd/usagestats	domain_kinds.tab eval_domains.pl 
                            	update_domain_kinds.pl 
  Log:
  Domain statistics
  
  
Index: modules/gerd/usagestats/domain_kinds.tab
diff -u modules/gerd/usagestats/domain_kinds.tab:1.9 modules/gerd/usagestats/domain_kinds.tab:1.10
--- modules/gerd/usagestats/domain_kinds.tab:1.9	Tue Dec  6 18:50:21 2011
+++ modules/gerd/usagestats/domain_kinds.tab	Tue Dec  6 20:28:42 2011
@@ -15,34 +15,29 @@
 mariettahs:Marietta High School:HS
 burnaby:Burnaby School District:HS
 johnht:Johnston Heights Secondary School:HS
-kyoto-u:Kyoto University:U
+kyoto-u:Kyoto University:U:1
 dallasisd:Dallas ISD:HS
 divinechild:Divine Child High School:HS
-rutgers:Rutgers:U
 lcc:Lower Canada College:CC
-koinonia:KoinoniaGroup:HS
-msudemo:Demo Machine:PR
-sunysb:SUNY Stony Brook:U
-showandtell:Problem Examples:PR
+sunysb:SUNY Stony Brook:U:1
 ucsc:University of California, Santa Cruz:U
-UNICAMP:UNICAMP:U
+UNICAMP:UNICAMP:U:1
 ufba:Universidade Federal da Bahia:U
 uftm:Universidade Federal do Triangulo Mineiro:U
-nagoya:Nagoya University:U
-colorado:University of Colorado:U
-harvard:Harvard University:U
+nagoya:Nagoya University:U:1
+colorado:University of Colorado:U:1
 uwinnipeg:University of Winnipeg:U
 umass:University of Massachusetts Amherst:U
 nyu:New York University:U
-upm:Universidad Politecnica de Madrid:U
+upm:Universidad Politecnica de Madrid:U:1
 umassd:University of Massachusetts Dartmouth:U
 fh-emden:Fachhochschule Emden:U
 oregonstate:Oregon State University:U
 itu:Istanbul Technical University:U
 uprm:University of Puerto Rico, Mayaguez Campus:U
-queensu:Queens University, Kingston:U
+queensu:Queens University, Kingston:U:1
 ncku:National Cheng Kung University:U
-fh-regensburg:Fachhochschule Regensburg:U
+fh-regensburg:Fachhochschule Regensburg:U:1
 ucsb:University of California Santa Barbara:U
 aicasa:American International College of Arts and Sciences Antigua:HS
 sbuniv:Southwest Baptist University:U
@@ -77,7 +72,7 @@
 birmingham:Birmingham Public Schools:HS
 ufm:Johann Wolfgang Goethe Universitaet Frankfurt am Main:U
 vinton:Vinton County Public Schools:HS
-hgu:Handong Global University:U
+hgu:Handong Global University:U:1
 carman:Carman-Ainsworth Community Schools:HS
 portage:Portage Public Schools:HS
 tamu:Texas A&M:U
@@ -121,7 +116,7 @@
 ohiou:Ohio University:U
 edison:Edison State College:U
 fsu:Florida State University:U
-harvard:Harvard University:
+harvard:Harvard University:U:1
 wiley:Wiley Publisher:PU
 luhs:Liberty Union High School:HS
 usask:University of Saskatchewan:U
@@ -165,13 +160,13 @@
 grandblanc:Grand Blanc Community Schools:HS
 fgcu:Florida Gulf Coast University:U
 wadsworth:Wadsworth Publishers:PU
-msudemo:Demo Machine:
+msudemo:Demo Machine:PR:1
 tabor:Tabor College:U
 brookscole:Brooks Cole Publisher:PU
 msu:Michigan State University:U
 psuerie:Penn State Erie:U
 rhs:Roosevelt High School Wyandotte:HS
-unisa:Universita degli Studi di Salerno:U
+unisa:Universita degli Studi di Salerno:U:1
 uwsp:University of Wisconsin - Stevens Point:U
 bccc:Beaufort County Community College:CC
 newlex:New Lexington High School:HS
@@ -183,7 +178,7 @@
 henrico:Henrico County Public Schools:HS
 prenhall:Prentice Hall Publisher:PU
 Selwyn:Selwyn House School:HS
-showandtell:Problem Examples:
+showandtell:Problem Examples:PR
 lakefenton:Lake Fenton Community Schools:HS
 ryerson:Ryerson University:U
 templecity:Temple City High School:HS
@@ -196,7 +191,7 @@
 ccpsnet:Chesterfield County Public Schools:HS
 ithaca:Ithaca High School:HS
 pickerington:Pickerington Public Schools:HS
-rutgers:Rutgers:
+rutgers:Rutgers:U:1
 huji:Hebrew University of Jerusalem:U
 webbervilleschools:Webberville Community Schools:HS
 georgetown:Georgetown University:U
@@ -208,7 +203,7 @@
 johnabbott:John Abbott College:U
 novi:Novi High School:HS
 motths:Waterford Mott High School:HS
-up:University of Pretoria:U
+up:University of Pretoria:U:1
 erps:Eaton Rapids Public Schools:HS
 judson:Judson High School:HS
 okemos:Okemos Public Schools:HS
@@ -219,6 +214,6 @@
 athens:Athens Public Schools:HS
 dal:Dalhousie University:U
 cps:Chicago Public Schools:HS
-koinonia:KoinoniaGroup:
+koinonia:KoinoniaGroup:HS:1
 acadiau:Acadia University:U
 arcadia:Arcadia High School:HS
Index: modules/gerd/usagestats/eval_domains.pl
diff -u modules/gerd/usagestats/eval_domains.pl:1.4 modules/gerd/usagestats/eval_domains.pl:1.5
--- modules/gerd/usagestats/eval_domains.pl:1.4	Wed Oct 20 15:41:58 2010
+++ modules/gerd/usagestats/eval_domains.pl	Tue Dec  6 20:28:42 2011
@@ -1,7 +1,9 @@
 open(IN,'domain_kinds.tab');
+my $total=0;
 while ($line=<IN>) {
     chomp($line);
-    my ($domain,$name,$type)=split(/\:/,$line);
+    my ($domain,$name,$type,$ign)=split(/\:/,$line);
+    if ($ign) { next; }
     if ($domaintype{$domain}) { print "\n --> Already have $domain\n"; next; }
     if ($type) { $domaintype{$domain}=$type; }
     if ($type=~/^U/) {
@@ -20,6 +22,7 @@
         print "Wrong domain type: $type\n";
         exit;
     }
+    $total++;
 }
 close(IN);
 print "<h2>Universities</h2>\n<ul>\n".join("\n",map{"<li>$_</li>"} sort @u)."\n</ul>\n";
@@ -35,4 +38,5 @@
 print "Middle Schools: ".($#ms+1)."\n";
 print "Publishers: ".($#pu+1)."\n";
 print "Projects: ".($#pr+1)."\n";
+print "Total: ".$total."\n";
 print "</pre>\n";
Index: modules/gerd/usagestats/update_domain_kinds.pl
diff -u modules/gerd/usagestats/update_domain_kinds.pl:1.3 modules/gerd/usagestats/update_domain_kinds.pl:1.4
--- modules/gerd/usagestats/update_domain_kinds.pl:1.3	Tue Dec  6 18:50:21 2011
+++ modules/gerd/usagestats/update_domain_kinds.pl	Tue Dec  6 20:28:42 2011
@@ -8,6 +8,8 @@
 close(IN);
 open(IN,'/home/www/loncapa/loncom/production_dns_domain.tab');
 while ($line=<IN>) {
+    chomp ($line);
+    unless ($line) { next; }
     if ($line=~/^\s*\#/) { next; }
     my ($domain,$name)=split(/\:/,$line);
 #    print "====>$domain $domaintype{$domain}\n";




More information about the LON-CAPA-cvs mailing list