diff options
| -rw-r--r-- | challenge-184/laurent-rosenfeld/blog.txt | 1 | ||||
| -rw-r--r-- | challenge-184/laurent-rosenfeld/perl/ch-1.pl | 14 | ||||
| -rw-r--r-- | challenge-184/laurent-rosenfeld/perl/ch-2.pl | 12 | ||||
| -rw-r--r-- | challenge-184/laurent-rosenfeld/raku/ch-1.raku | 9 | ||||
| -rw-r--r-- | challenge-184/laurent-rosenfeld/raku/ch-2.raku | 8 | ||||
| -rw-r--r-- | stats/pwc-current.json | 379 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown-summary.json | 62 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown.json | 1124 | ||||
| -rw-r--r-- | stats/pwc-leaders.json | 364 | ||||
| -rw-r--r-- | stats/pwc-summary-1-30.json | 104 | ||||
| -rw-r--r-- | stats/pwc-summary-121-150.json | 40 | ||||
| -rw-r--r-- | stats/pwc-summary-151-180.json | 34 | ||||
| -rw-r--r-- | stats/pwc-summary-181-210.json | 112 | ||||
| -rw-r--r-- | stats/pwc-summary-211-240.json | 112 | ||||
| -rw-r--r-- | stats/pwc-summary-241-270.json | 44 | ||||
| -rw-r--r-- | stats/pwc-summary-31-60.json | 46 | ||||
| -rw-r--r-- | stats/pwc-summary-61-90.json | 114 | ||||
| -rw-r--r-- | stats/pwc-summary-91-120.json | 120 | ||||
| -rw-r--r-- | stats/pwc-summary.json | 52 |
19 files changed, 1409 insertions, 1342 deletions
diff --git a/challenge-184/laurent-rosenfeld/blog.txt b/challenge-184/laurent-rosenfeld/blog.txt new file mode 100644 index 0000000000..7fcea54b6a --- /dev/null +++ b/challenge-184/laurent-rosenfeld/blog.txt @@ -0,0 +1 @@ +http://blogs.perl.org/users/laurent_r/2022/09/perl-weekly-challenge-184-sequence-number-and-split-array.html diff --git a/challenge-184/laurent-rosenfeld/perl/ch-1.pl b/challenge-184/laurent-rosenfeld/perl/ch-1.pl new file mode 100644 index 0000000000..ae8998ca0d --- /dev/null +++ b/challenge-184/laurent-rosenfeld/perl/ch-1.pl @@ -0,0 +1,14 @@ +use strict; +use warnings; +use feature qw/say/; + +for my $test ([<ab1234 cd5678 ef1342>], [<pq1122 rs3334>]) { + my $i = 0; + my @out = @$test; + for (@out) { + my $count = sprintf("%02d", $i); + s/^[a-z]{2}/$count/; + $i++; + } + say "@$test => @out"; +} diff --git a/challenge-184/laurent-rosenfeld/perl/ch-2.pl b/challenge-184/laurent-rosenfeld/perl/ch-2.pl new file mode 100644 index 0000000000..af2648028c --- /dev/null +++ b/challenge-184/laurent-rosenfeld/perl/ch-2.pl @@ -0,0 +1,12 @@ +use strict; +use warnings; +use feature qw/say/; + +for my $test (['a 1 2 b 0', '3 c 4 d'], ['1 2', 'p q r', 's 3', '4 5 t']) { + my (@letters, @digits); + for my $item (@$test) { + push @letters, grep { /[a-zA-Z]+/ } split /\s+/, $item; + push @digits, grep { /\d+/ } split /\s+/, $item;; + } + say "@letters \n@digits"; +} diff --git a/challenge-184/laurent-rosenfeld/raku/ch-1.raku b/challenge-184/laurent-rosenfeld/raku/ch-1.raku new file mode 100644 index 0000000000..bdd1969605 --- /dev/null +++ b/challenge-184/laurent-rosenfeld/raku/ch-1.raku @@ -0,0 +1,9 @@ +for <ab1234 cd5678 ef1342>, <pq1122 rs3334> -> @test { + my $i = 0; + my @out; + for @test { + push @out, .subst(/^<[a..z]>**2/, $i.fmt("%02d")); + $i++; + } + say "@test[] => @out[]"; +} diff --git a/challenge-184/laurent-rosenfeld/raku/ch-2.raku b/challenge-184/laurent-rosenfeld/raku/ch-2.raku new file mode 100644 index 0000000000..ba14a49232 --- /dev/null +++ b/challenge-184/laurent-rosenfeld/raku/ch-2.raku @@ -0,0 +1,8 @@ +for ('a 1 2 b 0', '3 c 4 d'), ('1 2', 'p q r', 's 3', '4 5 t') -> @test { + my (@letters, @digits); + for @test -> $item { + append @letters, grep { /<alpha>+/ }, $item.split(/\s+/); + append @digits, grep { /\d+/ }, $item.split(/\s+/); + } + .say for @letters, @digits; +} diff --git a/stats/pwc-current.json b/stats/pwc-current.json index e206f6dffe..5f41627355 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,145 +1,4 @@ { - "chart" : { - "type" : "column" - }, - "xAxis" : { - "type" : "category" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "series" : [ - { - "colorByPoint" : 1, - "data" : [ - { - "name" : "Branislav Zahradnik", - "drilldown" : "Branislav Zahradnik", - "y" : 2 - }, - { - "name" : "Cheok-Yin Fung", - "drilldown" : "Cheok-Yin Fung", - "y" : 2 - }, - { - "y" : 2, - "drilldown" : "Dario Mazzeo", - "name" : "Dario Mazzeo" - }, - { - "y" : 2, - "drilldown" : "Dave Cross", - "name" : "Dave Cross" - }, - { - "name" : "E. Choroba", - "y" : 2, - "drilldown" : "E. Choroba" - }, - { - "name" : "Humberto Massa", - "y" : 2, - "drilldown" : "Humberto Massa" - }, - { - "name" : "James Smith", - "y" : 3, - "drilldown" : "James Smith" - }, - { - "name" : "Kjetil Skotheim", - "drilldown" : "Kjetil Skotheim", - "y" : 2 - }, - { - "drilldown" : "Luca Ferrari", - "y" : 8, - "name" : "Luca Ferrari" - }, - { - "drilldown" : "Mark Anderson", - "y" : 2, - "name" : "Mark Anderson" - }, - { - "drilldown" : "Matthew Neleigh", - "y" : 2, - "name" : "Matthew Neleigh" - }, - { - "name" : "Mohammad S Anwar", - "y" : 2, - "drilldown" : "Mohammad S Anwar" - }, - { - "name" : "Niels van Dijke", - "y" : 2, - "drilldown" : "Niels van Dijke" - }, - { - "name" : "Peter Campbell Smith", - "y" : 3, - "drilldown" : "Peter Campbell Smith" - }, - { - "drilldown" : "Robert DiCicco", - "y" : 2, - "name" : "Robert DiCicco" - }, - { - "name" : "Robert Ransbottom", - "y" : 2, - "drilldown" : "Robert Ransbottom" - }, - { - "name" : "Roger Bell_West", - "drilldown" : "Roger Bell_West", - "y" : 5 - }, - { - "y" : 2, - "drilldown" : "Solathian", - "name" : "Solathian" - }, - { - "y" : 5, - "drilldown" : "Stephen G. Lynn", - "name" : "Stephen G. Lynn" - }, - { - "y" : 4, - "drilldown" : "Ulrich Rieke", - "name" : "Ulrich Rieke" - }, - { - "y" : 3, - "drilldown" : "W. Luis Mochan", - "name" : "W. Luis Mochan" - } - ], - "name" : "The Weekly Challenge - 184" - } - ], - "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/>" - }, - "title" : { - "text" : "The Weekly Challenge - 184" - }, - "plotOptions" : { - "series" : { - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - }, - "borderWidth" : 0 - } - }, "drilldown" : { "series" : [ { @@ -153,57 +12,57 @@ "name" : "Branislav Zahradnik" }, { + "name" : "Cheok-Yin Fung", + "id" : "Cheok-Yin Fung", "data" : [ [ "Perl", 2 ] - ], - "name" : "Cheok-Yin Fung", - "id" : "Cheok-Yin Fung" + ] }, { - "id" : "Dario Mazzeo", + "name" : "Dario Mazzeo", "data" : [ [ "Perl", 2 ] ], - "name" : "Dario Mazzeo" + "id" : "Dario Mazzeo" }, { - "name" : "Dave Cross", + "id" : "Dave Cross", "data" : [ [ "Perl", 2 ] ], - "id" : "Dave Cross" + "name" : "Dave Cross" }, { - "name" : "E. Choroba", + "id" : "E. Choroba", "data" : [ [ "Perl", 2 ] ], - "id" : "E. Choroba" + "name" : "E. Choroba" }, { + "name" : "Humberto Massa", "id" : "Humberto Massa", "data" : [ [ "Raku", 2 ] - ], - "name" : "Humberto Massa" + ] }, { - "name" : "James Smith", + "id" : "James Smith", "data" : [ [ "Perl", @@ -214,19 +73,38 @@ 1 ] ], - "id" : "James Smith" + "name" : "James Smith" }, { + "name" : "Kjetil Skotheim", "data" : [ [ "Perl", 2 ] ], - "name" : "Kjetil Skotheim", "id" : "Kjetil Skotheim" }, { + "name" : "Laurent Rosenfeld", + "id" : "Laurent Rosenfeld", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Luca Ferrari", "data" : [ [ "Raku", @@ -237,50 +115,50 @@ 6 ] ], - "name" : "Luca Ferrari", - "id" : "Luca Ferrari" + "name" : "Luca Ferrari" }, { + "name" : "Mark Anderson", "data" : [ [ "Raku", 2 ] ], - "id" : "Mark Anderson", - "name" : "Mark Anderson" + "id" : "Mark Anderson" }, { + "id" : "Matthew Neleigh", "data" : [ [ "Perl", 2 ] ], - "name" : "Matthew Neleigh", - "id" : "Matthew Neleigh" + "name" : "Matthew Neleigh" }, { - "name" : "Mohammad S Anwar", "data" : [ [ "Perl", 2 ] ], - "id" : "Mohammad S Anwar" + "id" : "Mohammad S Anwar", + "name" : "Mohammad S Anwar" }, { + "id" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] ], - "id" : "Niels van Dijke", "name" : "Niels van Dijke" }, { + "name" : "Peter Campbell Smith", "data" : [ [ "Perl", @@ -291,11 +169,10 @@ 1 ] ], - "name" : "Peter Campbell Smith", "id" : "Peter Campbell Smith" }, { - "id" : "Robert DiCicco", + "name" : "Robert DiCicco", "data" : [ [ "Perl", @@ -306,20 +183,20 @@ 1 ] ], - "name" : "Robert DiCicco" + "id" : "Robert DiCicco" }, { + "name" : "Robert Ransbottom", "id" : "Robert Ransbottom", "data" : [ [ "Raku", 2 ] - ], - "name" : "Robert Ransbottom" + ] }, { - "id" : "Roger Bell_West", + "name" : "Roger Bell_West", "data" : [ [ "Perl", @@ -334,7 +211,7 @@ 1 ] ], - "name" : "Roger Bell_West" + "id" : "Roger Bell_West" }, { "name" : "Solathian", @@ -347,7 +224,7 @@ "id" : "Solathian" }, { - "name" : "Stephen G. Lynn", + "id" : "Stephen G. Lynn", "data" : [ [ "Perl", @@ -362,10 +239,10 @@ 1 ] ], - "id" : "Stephen G. Lynn" + "name" : "Stephen G. Lynn" }, { - "id" : "Ulrich Rieke", + "name" : "Ulrich Rieke", "data" : [ [ "Perl", @@ -376,9 +253,10 @@ 2 ] ], - "name" : "Ulrich Rieke" + "id" : "Ulrich Rieke" }, { + "name" : "W. Luis Mochan", "id" : "W. Luis Mochan", "data" : [ [ @@ -389,8 +267,7 @@ "Blog", 1 ] - ], - "name" : "W. Luis Mochan" + ] } ] }, @@ -398,6 +275,152 @@ "enabled" : 0 }, "subtitle" : { - "text" : "[Champions: 21] Last updated at 2022-09-30 16:23:07 GMT" + "text" : "[Champions: 22] Last updated at 2022-10-01 08:14:57 GMT" + }, + "series" : [ + { + "name" : "The Weekly Challenge - 184", + "colorByPoint" : 1, + "data" : [ + { + "drilldown" : "Branislav Zahradnik", + "y" : 2, + "name" : "Branislav Zahradnik" + }, + { + "name" : "Cheok-Yin Fung", + "y" : 2, + "drilldown" : "Cheok-Yin Fung" + }, + { + "name" : "Dario Mazzeo", + "y" : 2, + "drilldown" : "Dario Mazzeo" + }, + { + "drilldown" : "Dave Cross", + "name" : "Dave Cross", + "y" : 2 + }, + { + "name" : "E. Choroba", + "y" : 2, + "drilldown" : "E. Choroba" + }, + { + "y" : 2, + "name" : "Humberto Massa", + "drilldown" : "Humberto Massa" + }, + { + "drilldown" : "James Smith", + "y" : 3, + "name" : "James Smith" + }, + { + "drilldown" : "Kjetil Skotheim", + "y" : 2, + "name" : "Kjetil Skotheim" + }, + { + "y" : 5, + "name" : "Laurent Rosenfeld", + "drilldown" : "Laurent Rosenfeld" + }, + { + "drilldown" : "Luca Ferrari", + "y" : 8, + "name" : "Luca Ferrari" + }, + { + "y" : 2, + "name" : "Mark Anderson", + "drilldown" : "Mark Anderson" + }, + { + "drilldown" : "Matthew Neleigh", + "name" : "Matthew Neleigh", + "y" : 2 + }, + { + "drilldown" : "Mohammad S Anwar", + "name" : "Mohammad S Anwar", + "y" : 2 + }, + { + "name" : "Niels van Dijke", + "y" : 2, + "drilldown" : "Niels van Dijke" + }, + { + "drilldown" : "Peter Campbell Smith", + "y" : 3, + "name" : "Peter Campbell Smith" + }, + { + "drilldown" : "Robert DiCicco", + "name" : "Robert DiCicco", + "y" : 2 + }, + { + "name" : "Robert Ransbottom", + "y" : 2, + "drilldown" : "Robert Ransbottom" + }, + { + "y" : 5, + "name" : "Roger Bell_West", + "drilldown" : "Roger Bell_West" + }, + { + "name" : "Solathian", + "y" : 2, + "drilldown" : "Solathian" + }, + { + "drilldown" : "Stephen G. Lynn", + "name" : "Stephen G. Lynn", + "y" : 5 + }, + { + "name" : "Ulrich Rieke", + "y" : 4, + "drilldown" : "Ulrich Rieke" + }, + { + "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan", + "y" : 3 + } + ] + } + ], + "tooltip" : { + "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>", + "followPointer" : 1, + "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>" + }, + "chart" : { + "type" : "column" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "xAxis" : { + "type" : "category" + }, + "title" : { + "text" : "The Weekly Challenge - 184" + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + } + } } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 815daf1a08..ceda50b5a3 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,21 +1,21 @@ { - "legend" : { - "enabled" : "false" + "chart" : { + "type" : "column" }, - "subtitle" : { - "text" : "Last updated at 2022-09-30 16:23:07 GMT" + "tooltip" : { + "pointFormat" : "<b>{point.y:.0f}</b>" }, "xAxis" : { - "type" : "category", "labels" : { "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" } - } + }, + "type" : "category" }, - "chart" : { - "type" : "column" + "title" : { + "text" : "The Weekly Challenge Contributions [2019 - 2022]" }, "yAxis" : { "title" : { @@ -25,39 +25,39 @@ }, "series" : [ { + "dataLabels" : { + "color" : "#FFFFFF", + "y" : 10, + "enabled" : "true", + "rotation" : -90, + "format" : "{point.y:.0f}", + "align" : "right", + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + } + }, + "name" : "Contributions", "data" : [ [ "Blog", - 2893 + 2894 ], [ "Perl", - 8947 + 8949 ], [ "Raku", - 5346 + 5348 ] - ], - "name" : "Contributions", - "dataLabels" : { - "color" : "#FFFFFF", - "align" : "right", - "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" - }, - "y" : 10, - "rotation" : -90, - "enabled" : "true", - "format" : "{point.y:.0f}" - } + ] } ], - "title" : { - "text" : "The Weekly Challenge Contributions [2019 - 2022]" + "legend" : { + "enabled" : "false" }, - "tooltip" : { - "pointFormat" : "<b>{point.y:.0f}</b>" + "subtitle" : { + "text" : "Last updated at 2022-10-01 08:14:57 GMT" } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index 2714ef7802..5e246d07d2 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -20,6 +20,8 @@ "id" : "001" }, { + "name" : "002", + "id" : "002", "data" : [ [ "Perl", @@ -33,11 +35,10 @@ "Blog", 10 ] - ], - "name" : "002", - "id" : "002" + ] }, { + "name" : "003", "id" : "003", "data" : [ [ @@ -52,10 +53,11 @@ "Blog", 9 ] - ], - "name" : "003" + ] }, { + "name" : "004", + "id" : "004", "data" : [ [ "Perl", @@ -69,9 +71,7 @@ "Blog", 10 ] - ], - "id" : "004", - "name" : "004" + ] }, { "name" : "005", @@ -92,7 +92,6 @@ "id" : "005" }, { - "id" : "006", "data" : [ [ "Perl", @@ -107,9 +106,11 @@ 7 ] ], + "id" : "006", "name" : "006" }, { + "id" : "007", "data" : [ [ "Perl", @@ -124,10 +125,10 @@ 10 ] ], - "name" : "007", - "id" : "007" + "name" : "007" }, { + "id" : "008", "data" : [ [ "Perl", @@ -142,7 +143,6 @@ 12 ] ], - "id" : "008", "name" : "008" }, { @@ -164,6 +164,7 @@ "name" : "009" }, { + "name" : "010", "id" : "010", "data" : [ [ @@ -178,8 +179,7 @@ "Blog", 11 ] - ], - "name" : "010" + ] }, { "data" : [ @@ -200,7 +200,6 @@ "name" : "011" }, { - "id" : "012", "data" : [ [ "Perl", @@ -215,6 +214,7 @@ 11 ] ], + "id" : "012", "name" : "012" }, { @@ -232,10 +232,11 @@ 13 ] ], - "name" : "013", - "id" : "013" + "id" : "013", + "name" : "013" }, { + "name" : "014", "data" : [ [ "Perl", @@ -250,10 +251,11 @@ 15 ] ], - "name" : "014", "id" : "014" }, { + "name" : "015", + "id" : "015", "data" : [ [ "Perl", @@ -267,9 +269,7 @@ "Blog", 15 ] - ], - "name" : "015", - "id" : "015" + ] }, { "id" : "016", @@ -290,6 +290,7 @@ "name" : "016" }, { + "name" : "017", "data" : [ [ "Perl", @@ -304,10 +305,10 @@ 12 ] ], - "name" : "017", "id" : "017" }, { + "id" : "018", "data" : [ [ "Perl", @@ -322,7 +323,6 @@ 14 ] ], - "id" : "018", "name" : "018" }, { @@ -358,8 +358,8 @@ 13 ] ], - "name" : "020", - "id" : "020" + "id" : "020", + "name" : "020" }, { "data" : [ @@ -376,10 +376,11 @@ 10 ] ], - "name" : "021", - "id" : "021" + "id" : "021", + "name" : "021" }, { + "name" : "022", "id" : "022", "data" : [ [ @@ -394,11 +395,9 @@ "Blog", 10 ] - ], - "name" : "022" + ] }, { - "id" : "023", "data" : [ [ "Perl", @@ -413,9 +412,11 @@ 12 ] ], + "id" : "023", "name" : "023" }, { + "name" : "024", "id" : "024", "data" : [ [ @@ -430,11 +431,11 @@ "Blog", 11 ] - ], - "name" : "024" + ] }, { "name" : "025", + "id" : "025", "data" : [ [ "Perl", @@ -448,11 +449,9 @@ "Blog", 12 ] - ], - "id" : "025" + ] }, { - "name" : "026", "data" : [ [ "Perl", @@ -467,10 +466,11 @@ 10 ] ], - "id" : "026" + "id" : "026", + "name" : "026" }, { - "name" : "027", + "id" : "027", "data" : [ [ "Perl", @@ -485,10 +485,10 @@ 9 ] ], - "id" : "027" + "name" : "027" }, { - "id" : "028", + "name" : "028", "data" : [ [ "Perl", @@ -503,10 +503,9 @@ 9 ] ], - "name" : "028" + "id" : "028" }, { - "id" : "029", "data" : [ [ "Perl", @@ -521,9 +520,11 @@ 12 ] ], + "id" : "029", "name" : "029" }, { + "id" : "030", "data" : [ [ "Perl", @@ -538,10 +539,10 @@ 10 ] ], - "id" : "030", "name" : "030" }, { + "name" : "031", "id" : "031", "data" : [ [ @@ -556,8 +557,7 @@ "Blog", 9 ] - ], - "name" : "031" + ] }, { "data" : [ @@ -578,7 +578,6 @@ "name" : "032" }, { - "name" : "033", "data" : [ [ "Perl", @@ -593,9 +592,12 @@ 10 ] ], - "id" : |
