aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-062/laurent-rosenfeld/addresses.txt7
-rw-r--r--challenge-062/laurent-rosenfeld/blog.txt1
-rw-r--r--challenge-062/laurent-rosenfeld/perl/ch-1.pl32
-rw-r--r--challenge-062/laurent-rosenfeld/raku/ch-1.p619
-rw-r--r--stats/pwc-current.json173
-rw-r--r--stats/pwc-language-breakdown-summary.json68
-rw-r--r--stats/pwc-language-breakdown.json454
-rw-r--r--stats/pwc-leaders.json750
-rw-r--r--stats/pwc-summary-1-30.json102
-rw-r--r--stats/pwc-summary-121-150.json38
-rw-r--r--stats/pwc-summary-151-180.json64
-rw-r--r--stats/pwc-summary-31-60.json114
-rw-r--r--stats/pwc-summary-61-90.json48
-rw-r--r--stats/pwc-summary-91-120.json52
-rw-r--r--stats/pwc-summary.json54
15 files changed, 1029 insertions, 947 deletions
diff --git a/challenge-062/laurent-rosenfeld/addresses.txt b/challenge-062/laurent-rosenfeld/addresses.txt
new file mode 100644
index 0000000000..fe64dfd5a6
--- /dev/null
+++ b/challenge-062/laurent-rosenfeld/addresses.txt
@@ -0,0 +1,7 @@
+name@example.org
+rjt@cpan.org
+Name@example.org
+rjt@CPAN.org
+rjt@cpan.org
+user@alpha.example.org
+rjt@cpan.org
diff --git a/challenge-062/laurent-rosenfeld/blog.txt b/challenge-062/laurent-rosenfeld/blog.txt
new file mode 100644
index 0000000000..07972964ea
--- /dev/null
+++ b/challenge-062/laurent-rosenfeld/blog.txt
@@ -0,0 +1 @@
+http://blogs.perl.org/users/laurent_r/2020/05/perl-weekly-challenge-62-sort-email-addresses.html
diff --git a/challenge-062/laurent-rosenfeld/perl/ch-1.pl b/challenge-062/laurent-rosenfeld/perl/ch-1.pl
new file mode 100644
index 0000000000..6a4d76469a
--- /dev/null
+++ b/challenge-062/laurent-rosenfeld/perl/ch-1.pl
@@ -0,0 +1,32 @@
+use strict;
+use warnings;
+use feature qw /say/;
+
+sub normalize {
+ my $addr = shift;
+ my ($box, $domain) = split /@/, $addr;
+ return (uc $domain . "@" . $box);
+}
+my ($unique, @files);
+my $first_param = shift;
+if ($first_param eq "-u") {
+ $unique = 1;
+ @files = @ARGV;
+} else {
+ $unique = 0;
+ @files = ($first_param, @ARGV);
+}
+my @addresses;
+for my $file(@files) {
+ open my $IN, "<", $file or die "Unable to open $file";
+ push @addresses, <$IN>;
+}
+chomp @addresses;
+my @sorted = map { $_->[0] }
+ sort { $a->[1] cmp $b->[1] }
+ map { [$_, normalize $_] } @addresses;
+if ($unique) {
+ my $last = "";
+ @sorted = grep { my $bool = $last ne normalize $_; $last = normalize $_; $bool} @sorted;
+}
+say for @sorted;
diff --git a/challenge-062/laurent-rosenfeld/raku/ch-1.p6 b/challenge-062/laurent-rosenfeld/raku/ch-1.p6
new file mode 100644
index 0000000000..e5b276c4d5
--- /dev/null
+++ b/challenge-062/laurent-rosenfeld/raku/ch-1.p6
@@ -0,0 +1,19 @@
+use v6;
+
+sub normalize (Str $addr) {
+ my ($box, $domain) = split /'@'/, $addr;
+ $domain.uc ~ '@' ~ $box;
+}
+sub process-addresses( @addresses, Bool $unique) {
+ @addresses = @addresses.unique(:as(&normalize)) if $unique;
+ my @sorted = sort &normalize, @addresses;
+ .say for @sorted;
+}
+multi sub MAIN (Bool :u(:$unique) = False, *@files) {
+ my @addresses = @files.IO.lines;
+ process-addresses @addresses, $unique;
+}
+multi sub MAIN (Bool :u(:$unique) = False) {
+ my @addresses = $*IN.lines;
+ process-addresses @addresses, $unique;
+}
diff --git a/stats/pwc-current.json b/stats/pwc-current.json
index 19d2ce73ea..f647de0c81 100644
--- a/stats/pwc-current.json
+++ b/stats/pwc-current.json
@@ -1,11 +1,35 @@
{
+ "xAxis" : {
+ "type" : "category"
+ },
+ "subtitle" : {
+ "text" : "[Champions: 17] Last updated at 2020-05-31 21:24:21 GMT"
+ },
+ "chart" : {
+ "type" : "column"
+ },
+ "plotOptions" : {
+ "series" : {
+ "dataLabels" : {
+ "enabled" : 1,
+ "format" : "{point.y}"
+ },
+ "borderWidth" : 0
+ }
+ },
+ "yAxis" : {
+ "title" : {
+ "text" : "Total Solutions"
+ }
+ },
"series" : [
{
+ "colorByPoint" : 1,
"data" : [
{
- "y" : 2,
+ "name" : "Athanasius",
"drilldown" : "Athanasius",
- "name" : "Athanasius"
+ "y" : 2
},
{
"y" : 5,
@@ -13,19 +37,24 @@
"drilldown" : "Javier Luque"
},
{
- "drilldown" : "Leo Manfredi",
+ "drilldown" : "Laurent Rosenfeld",
+ "name" : "Laurent Rosenfeld",
+ "y" : 3
+ },
+ {
"name" : "Leo Manfredi",
+ "drilldown" : "Leo Manfredi",
"y" : 1
},
{
- "name" : "Luca Ferrari",
"drilldown" : "Luca Ferrari",
+ "name" : "Luca Ferrari",
"y" : 2
},
{
- "y" : 1,
+ "drilldown" : "Markus Holzer",
"name" : "Markus Holzer",
- "drilldown" : "Markus Holzer"
+ "y" : 1
},
{
"name" : "Mohammad S Anwar",
@@ -33,9 +62,9 @@
"y" : 3
},
{
- "y" : 3,
"drilldown" : "Niels van Dijke",
- "name" : "Niels van Dijke"
+ "name" : "Niels van Dijke",
+ "y" : 3
},
{
"drilldown" : "Pete Houston",
@@ -43,9 +72,9 @@
"y" : 1
},
{
- "y" : 1,
"name" : "Richard Park",
- "drilldown" : "Richard Park"
+ "drilldown" : "Richard Park",
+ "y" : 1
},
{
"drilldown" : "Roger Bell_West",
@@ -58,19 +87,19 @@
"y" : 4
},
{
- "drilldown" : "Shahed Nooshmand",
"name" : "Shahed Nooshmand",
+ "drilldown" : "Shahed Nooshmand",
"y" : 3
},
{
- "y" : 1,
+ "name" : "Simon Miner",
"drilldown" : "Simon Miner",
- "name" : "Simon Miner"
+ "y" : 1
},
{
- "y" : 1,
+ "drilldown" : "Simon Proctor",
"name" : "Simon Proctor",
- "drilldown" : "Simon Proctor"
+ "y" : 1
},
{
"y" : 1,
@@ -83,49 +112,15 @@
"drilldown" : "Yet Ebreo"
}
],
- "name" : "Perl Weekly Challenge - 062",
- "colorByPoint" : 1
+ "name" : "Perl Weekly Challenge - 062"
}
],
"title" : {
"text" : "Perl Weekly Challenge - 062"
},
- "plotOptions" : {
- "series" : {
- "dataLabels" : {
- "enabled" : 1,
- "format" : "{point.y}"
- },
- "borderWidth" : 0
- }
- },
- "xAxis" : {
- "type" : "category"
- },
- "subtitle" : {
- "text" : "[Champions: 16] Last updated at 2020-05-31 21:00:40 GMT"
- },
- "chart" : {
- "type" : "column"
- },
- "yAxis" : {
- "title" : {
- "text" : "Total Solutions"
- }
- },
- "legend" : {
- "enabled" : 0
- },
- "tooltip" : {
- "followPointer" : 1,
- "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>",
- "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>"
- },
"drilldown" : {
"series" : [
{
- "id" : "Athanasius",
- "name" : "Athanasius",
"data" : [
[
"Perl",
@@ -135,11 +130,13 @@
"Raku",
1
]
- ]
+ ],
+ "name" : "Athanasius",
+ "id" : "Athanasius"
},
{
- "id" : "Javier Luque",
"name" : "Javier Luque",
+ "id" : "Javier Luque",
"data" : [
[
"Perl",
@@ -160,32 +157,51 @@
[
"Perl",
1
+ ],
+ [
+ "Raku",
+ 1
+ ],
+ [
+ "Blog",
+ 1
]
],
+ "id" : "Laurent Rosenfeld",
+ "name" : "Laurent Rosenfeld"
+ },
+ {
+ "id" : "Leo Manfredi",
"name" : "Leo Manfredi",
- "id" : "Leo Manfredi"
+ "data" : [
+ [
+ "Perl",
+ 1
+ ]
+ ]
},
{
+ "name" : "Luca Ferrari",
"id" : "Luca Ferrari",
"data" : [
[
"Raku",
2
]
- ],
- "name" : "Luca Ferrari"
+ ]
},
{
+ "id" : "Markus Holzer",
+ "name" : "Markus Holzer",
"data" : [
[
"Raku",
1
]
- ],
- "name" : "Markus Holzer",
- "id" : "Markus Holzer"
+ ]
},
{
+ "name" : "Mohammad S Anwar",
"id" : "Mohammad S Anwar",
"data" : [
[
@@ -200,12 +216,9 @@
"Blog",
1
]
- ],
- "name" : "Mohammad S Anwar"
+ ]
},
{
- "id" : "Niels van Dijke",
- "name" : "Niels van Dijke",
"data" : [
[
"Perl",
@@ -215,30 +228,31 @@
"Blog",
1
]
- ]
+ ],
+ "name" : "Niels van Dijke",
+ "id" : "Niels van Dijke"
},
{
- "name" : "Pete Houston",
"data" : [
[
"Perl",
1
]
],
+ "name" : "Pete Houston",
"id" : "Pete Houston"
},
{
+ "name" : "Richard Park",
"id" : "Richard Park",
"data" : [
[
"Blog",
1
]
- ],
- "name" : "Richard Park"
+ ]
},
{
- "id" : "Roger Bell_West",
"data" : [
[
"Perl",
@@ -253,9 +267,11 @@
1
]
],
+ "id" : "Roger Bell_West",
"name" : "Roger Bell_West"
},
{
+ "name" : "Sangeet Kar",
"id" : "Sangeet Kar",
"data" : [
[
@@ -266,8 +282,7 @@
"Raku",
2
]
- ],
- "name" : "Sangeet Kar"
+ ]
},
{
"id" : "Shahed Nooshmand",
@@ -294,35 +309,43 @@
"id" : "Simon Miner"
},
{
- "name" : "Simon Proctor",
"data" : [
[
"Raku",
1
]
],
+ "name" : "Simon Proctor",
"id" : "Simon Proctor"
},
{
+ "name" : "Wanderdoc",
+ "id" : "Wanderdoc",
"data" : [
[
"Perl",
1
]
- ],
- "name" : "Wanderdoc",
- "id" : "Wanderdoc"
+ ]
},
{
"name" : "Yet Ebreo",
+ "id" : "Yet Ebreo",
"data" : [
[
"Perl",
1
]
- ],
- "id" : "Yet Ebreo"
+ ]
}
]
+ },
+ "tooltip" : {
+ "followPointer" : 1,
+ "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>",
+ "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>"
+ },
+ "legend" : {
+ "enabled" : 0
}
}
diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json
index 90a12ddee8..a4c5ee2f33 100644
--- a/stats/pwc-language-breakdown-summary.json
+++ b/stats/pwc-language-breakdown-summary.json
@@ -1,63 +1,63 @@
{
- "subtitle" : {
- "text" : "Last updated at 2020-05-31 21:00:40 GMT"
- },
"chart" : {
"type" : "column"
},
+ "yAxis" : {
+ "min" : 0,
+ "title" : {
+ "text" : null
+ }
+ },
"xAxis" : {
"type" : "category",
"labels" : {
"style" : {
- "fontFamily" : "Verdana, sans-serif",
- "fontSize" : "13px"
+ "fontSize" : "13px",
+ "fontFamily" : "Verdana, sans-serif"
}
}
},
+ "subtitle" : {
+ "text" : "Last updated at 2020-05-31 21:24:21 GMT"
+ },
+ "tooltip" : {
+ "pointFormat" : "<b>{point.y:.0f}</b>"
+ },
+ "legend" : {
+ "enabled" : "false"
+ },
"title" : {
"text" : "Perl Weekly Challenge Contributions [2019 - 2020]"
},
"series" : [
{
- "dataLabels" : {
- "format" : "{point.y:.0f}",
- "rotation" : -90,
- "style" : {
- "fontSize" : "13px",
- "fontFamily" : "Verdana, sans-serif"
- },
- "y" : 10,
- "color" : "#FFFFFF",
- "align" : "right",
- "enabled" : "true"
- },
+ "name" : "Contributions",
"data" : [
[
"Blog",
- 711
+ 712
],
[
"Perl",
- 2590
+ 2591
],
[
"Raku",
- 1637
+ 1638
]
],
- "name" : "Contributions"
- }
- ],
- "tooltip" : {
- "pointFormat" : "<b>{point.y:.0f}</b>"
- },
- "legend" : {
- "enabled" : "false"
- },
- "yAxis" : {
- "min" : 0,
- "title" : {
- "text" : null
+ "dataLabels" : {
+ "enabled" : "true",
+ "color" : "#FFFFFF",
+ "align" : "right",
+ "rotation" : -90,
+ "y" : 10,
+ "format" : "{point.y:.0f}",
+ "style" : {
+ "fontSize" : "13px",
+ "fontFamily" : "Verdana, sans-serif"
+ }
+ }
}
- }
+ ]
}
diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json
index b928191ccf..9b235fb4b0 100644
--- a/stats/pwc-language-breakdown.json
+++ b/stats/pwc-language-breakdown.json
@@ -1,16 +1,30 @@
{
- "legend" : {
- "enabled" : "false"
+ "subtitle" : {
+ "text" : "Click the columns to drilldown the language breakdown. Last updated at 2020-05-31 21:24:21 GMT"
},
- "tooltip" : {
- "headerFormat" : "<span style=\"font-size:11px\"></span>",
- "pointFormat" : "<span style=\"color:{point.color}\">Challenge {point.name}</span>: <b>{point.y:f}</b><br/>",
- "followPointer" : "true"
+ "xAxis" : {
+ "type" : "category"
+ },
+ "yAxis" : {
+ "title" : {
+ "text" : "Total Solutions"
+ }
+ },
+ "chart" : {
+ "type" : "column"
+ },
+ "plotOptions" : {
+ "series" : {
+ "dataLabels" : {
+ "enabled" : 1,
+ "format" : "{point.y}"
+ },
+ "borderWidth" : 0
+ }
},
"drilldown" : {
"series" : [
{
- "name" : "001",
"data" : [
[
"Perl",
@@ -25,10 +39,12 @@
11
]
],
- "id" : "001"
+ "id" : "001",
+ "name" : "001"
},
{
"name" : "002",
+ "id" : "002",
"data" : [
[
"Perl",
@@ -42,11 +58,11 @@
"Blog",
10
]
- ],
- "id" : "002"
+ ]
},
{
"id" : "003",
+ "name" : "003",
"data" : [
[
"Perl",
@@ -60,11 +76,9 @@
"Blog",
9
]
- ],
- "name" : "003"
+ ]
},
{
- "id" : "004",
"data" : [
[
"Perl",
@@ -79,11 +93,12 @@
10
]
],
+ "id" : "004",
"name" : "004"
},
{
- "id" : "005",
"name" : "005",
+ "id" : "005",
"data" : [
[
"Perl",
@@ -100,7 +115,6 @@
]
},
{
- "id" : "006",
"data" : [
[
"Perl",
@@ -115,10 +129,10 @@
7
]
],
+ "id" : "006",
"name" : "006"
},
{
- "name" : "007",
"data" : [
[
"Perl",
@@ -133,10 +147,10 @@
10
]
],
- "id" : "007"
+ "id" : "007",
+ "name" : "007"
},
{
- "id" : "008",
"data" : [
[
"Perl",
@@ -151,10 +165,10 @@
12
]
],
- "name" : "008"
+ "name" : "008",
+ "id" : "008"
},
{
- "name" : "009",
"data" : [
[
"Perl",
@@ -169,9 +183,11 @@
13
]
],
- "id" : "009"
+ "id" : "009",
+ "name" : "009"
},
{
+ "id" : "010",
"name" : "010",
"data" : [
[
@@ -186,12 +202,11 @@
"Blog",
11
]
- ],
- "id" : "010"
+ ]
},
{
- "id" : "011",
"name" : "011",
+ "id" : "011",
"data" : [
[
"Perl",
@@ -208,6 +223,7 @@
]
},
{
+ "id" : "012",
"name" : "012",
"data" : [
[
@@ -222,12 +238,11 @@
"Blog",
11
]
- ],
- "id" : "012"
+ ]
},
{
- "id" : "013",
"name" : "013",
+ "id" : "013",
"data" : [
[
"Perl",
@@ -244,6 +259,8 @@
]
},
{
+ "id" : "014",
+ "name" : "014",
"data" : [
[
"Perl",
@@ -257,13 +274,9 @@
"Blog",
15
]
- ],
- "name" : "014",
- "id" : "014"
+ ]
},
{
- "id" : "015",
- "name" : "015",
"data" : [
[
"Perl",
@@ -277,9 +290,12 @@
"Blog",
15
]
- ]
+ ],
+ "id" : "015",
+ "name" : "015"
},
{
+ "name" : "016",
"id" : "016",
"data" : [
[
@@ -294,10 +310,11 @@
"Blog",
12
]
- ],
- "name" : "016"
+ ]
},
{
+ "id" : "017",
+ "name" : "017",
"data" : [
[
"Perl",
@@ -311,12 +328,9 @@
"Blog",
12
]
- ],
- "name" : "017",
- "id" : "017"
+ ]
},
{
- "id" : "018",
"data" : [
[
"Perl",
@@ -331,6 +345,7 @@
14
]
],
+ "id" : "018",
"name" : "018"
},
{
@@ -348,11 +363,10 @@
13
]
],
- "name" : "019",
- "id" : "019"
+ "id" : "019",
+ "name" : "019"
},
{
- "name" : "020",
"data" : [
[
"Perl",
@@ -367,10 +381,12 @@
13
]
],
+ "name" : "020",
"id" : "020"
},
{
"id" : "021",
+ "name" : "021",
"data" : [
[
"Perl",
@@ -384,11 +400,9 @@
"Blog",
10
]
- ],
- "name" : "021"
+ ]
},
{
- "name" : "022",
"data" : [
[
"Perl",
@@ -403,11 +417,12 @@
10
]
],
+ "name" : "022",
"id" : "022"
},
{
- "id" : "023",
"name" : "023",
+ "id" : "023",
"data" : [
[
"Perl",
@@ -424,8 +439,8 @@
]
},
{
- "id" : "024",
"name" : "024",
+ "id" : "024",
"data" : [
[
"Perl",
@@ -456,10 +471,12 @@
12
]
],
- "name" : "025",
- "id" : "025"
+ "id" : "025",
+ "name" : "025"
},
{
+ "name" : "026",
+ "id" : "026",
"data" : [
[
"Perl",
@@ -473,12 +490,9 @@
"Blog",
10
]
- ],
- "name" : "026",
- "id" : "026"
+ ]
},
{
- "id" : "027",
"data" : [
[
"Perl",
@@ -493,9 +507,11 @@
9
]
],
+ "id" : "027",
"name" : "027"
},
{
+ "name" : "028",
"id" : "028",
"data" : [
[
@@ -510,8 +526,7 @@
"Blog",
9
]
- ],
- "name" : "028"
+ ]
},
{
"data" : [
@@ -532,7 +547,6 @@
"id" : "029"
},
{
- "name" : "030",
"data" : [
[
"Perl",
@@ -547,10 +561,10 @@
10
]
],
+ "name" : "030",
"id" : "030"
},
{
- "name" : "031",
"data" : [
[
"Perl",
@@ -565,11 +579,10 @@
9
]
],
+ "name" : "031",
"id" : "031"
},
{
- "id" : "032",
- "name" : "032",
"data" : [
[
"Perl",
@@ -583,9 +596,12 @@
"Blog",
10
]
- ]
+ ],
+ "id" : "032",
+ "name" : "032"
},
{
+ "name" : "033",
"id" : "033",
"data" : [
[
@@ -600,11 +616,11 @@
"Blog",
10
]
- ],
- "name" : "033"
+ ]
},
{
"id" : "034",
+ "name" : "034",
"data" : [
[
"Perl",
@@ -618,11 +634,11 @@
"Blog",
11
]
- ],
- "name" : "034"
+ ]
},
{
"name" : "035",
+ "id" : "035",
"data" : [
[
"Perl",
@@ -636,10 +652,11 @@
"Blog",
9
]
- ],
- "id" : "035"
+ ]
},
{
+ "name" : "036",
+ "id" : "036",
"data" : [
[
"Perl",
@@ -653,12 +670,9 @@
"Blog",
11
]
- ],
- "name" : "036",
- "id" : "036"
+ ]
},
{
- "name" : "037",
"data" : [
[
"Perl",
@@ -673,6 +687,7 @@
9
]
],
+ "name" : "037",
"id" : "037"
},
{
@@ -694,6 +709,7 @@
]
},
{
+ "id" : "039",
"name" : "039",
"data" : [
[
@@ -708,12 +724,9 @@
"Blog",
12
]
- ],
- "id" : "039"
+ ]
},
{
- "id" : "040",
- "name" : "040",
"data" : [
[
"Perl",
@@ -727,9 +740,13 @@
"Blog",
10
]
- ]
+ ],
+ "name" : "040",
+ "id" : "040"
},
{
+ "name" : "041",
+ "id" : "041",
"data" : [
[
"Perl",
@@ -743,9 +760,7 @@
"Blog",
9
]
- ],
- "name" : "041",
- "id" : "041"
+ ]
},
{
"data" : [
@@ -762,11 +777,12 @@
11
]
],
- "name" : "042",
- "id" : "042"
+ "id" : "042",
+ "name" : "042"
},
{
"id" : "043",
+ "name" : "043",
"data" : [
[
"Perl",
@@ -780,8 +796,7 @@
"Blog",
11
]
- ],
- "name" : "043"
+ ]
},
{
"data" : [
@@ -798,8 +813,8 @@
11
]
],
- "name" : "044",
- "id" : "044"
+ "id" : "044",
+ "name" : "044"
},
{
"data" : [
@@ -820,8 +835,6 @@
"id" : "045"
},
{
- "id" : "046",
- "name" : "046",
"data" : [
[
"Perl",
@@ -835,9 +848,12 @@
"Blog",
10
]
- ]
+ ],
+ "id" : "046",
+ "name" : "046"
},
{
+ "id" : "047",
"name" : "047",
"data" : [
[
@@ -852,8 +868,7 @@
"Blog",
10
]
- ],
- "id" : "047"
+ ]
},
{
"id" : "048",
@@ -874,7 +889,6 @@
]
},
{
- "id" : "049",
"data" : [