diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2023-09-11 03:00:16 +0100 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2023-09-11 03:00:16 +0100 |
| commit | be35f7cb0ebd77c643e594fde079bf4cddb27037 (patch) | |
| tree | eb6af506c93c1cebfd9040d1e6b1a1f9c7eafff2 | |
| parent | a9f8285c31f7b7fb2caf114fd0355023f0e52b91 (diff) | |
| download | perlweeklychallenge-club-be35f7cb0ebd77c643e594fde079bf4cddb27037.tar.gz perlweeklychallenge-club-be35f7cb0ebd77c643e594fde079bf4cddb27037.tar.bz2 perlweeklychallenge-club-be35f7cb0ebd77c643e594fde079bf4cddb27037.zip | |
- Added solutions by Arne Sommer.
| -rw-r--r-- | challenge-233/arne-sommer/blog.txt | 1 | ||||
| -rwxr-xr-x | challenge-233/arne-sommer/raku/ch-1.raku | 28 | ||||
| -rwxr-xr-x | challenge-233/arne-sommer/raku/ch-2.raku | 8 | ||||
| -rw-r--r-- | stats/pwc-current.json | 589 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown-summary.json | 70 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown.json | 3262 | ||||
| -rw-r--r-- | stats/pwc-leaders.json | 742 | ||||
| -rw-r--r-- | stats/pwc-summary-1-30.json | 108 | ||||
| -rw-r--r-- | stats/pwc-summary-121-150.json | 112 | ||||
| -rw-r--r-- | stats/pwc-summary-151-180.json | 36 | ||||
| -rw-r--r-- | stats/pwc-summary-181-210.json | 118 | ||||
| -rw-r--r-- | stats/pwc-summary-211-240.json | 102 | ||||
| -rw-r--r-- | stats/pwc-summary-241-270.json | 96 | ||||
| -rw-r--r-- | stats/pwc-summary-271-300.json | 100 | ||||
| -rw-r--r-- | stats/pwc-summary-31-60.json | 36 | ||||
| -rw-r--r-- | stats/pwc-summary-61-90.json | 108 | ||||
| -rw-r--r-- | stats/pwc-summary-91-120.json | 36 | ||||
| -rw-r--r-- | stats/pwc-summary.json | 32 |
18 files changed, 2820 insertions, 2764 deletions
diff --git a/challenge-233/arne-sommer/blog.txt b/challenge-233/arne-sommer/blog.txt new file mode 100644 index 0000000000..a4c897a936 --- /dev/null +++ b/challenge-233/arne-sommer/blog.txt @@ -0,0 +1 @@ +https://raku-musings.com/words-sort.html diff --git a/challenge-233/arne-sommer/raku/ch-1.raku b/challenge-233/arne-sommer/raku/ch-1.raku new file mode 100755 index 0000000000..75408a93d9 --- /dev/null +++ b/challenge-233/arne-sommer/raku/ch-1.raku @@ -0,0 +1,28 @@ +#! /usr/bin/env raku + +unit sub MAIN (*@words where @words.elems > 0, :w(:$very-verbose), :v(:$verbose) = $very-verbose); + +my @result; + +while @words +{ + my $first = @words.shift; + my $first-canonical = $first.comb.sort.unique.join; + + say ":First $first -> $first-canonical" if $very-verbose; + + for @words -> $second + { + my $second-canonical = $second.comb.sort.unique.join; + + say ":- Second $second -> $second-canonical" if $very-verbose; + + if $first-canonical eq $second-canonical + { + @result.push( ($first, $second) ); + say ":Pair {@result.elems }: similar words (\"$first\", \"$second\")" if $verbose; + } + } +} + +say @result.elems; diff --git a/challenge-233/arne-sommer/raku/ch-2.raku b/challenge-233/arne-sommer/raku/ch-2.raku new file mode 100755 index 0000000000..3fe2e6b312 --- /dev/null +++ b/challenge-233/arne-sommer/raku/ch-2.raku @@ -0,0 +1,8 @@ +#! /usr/bin/env raku + +unit sub MAIN (*@ints where @ints.elems > 1 && all(@ints) ~~ Int); + +my $bag = @ints.Bag; + +say "(", $bag.sort({ $^a.value <=> $^b.value || $^b.key <=> $^a.key }).map({ $_.key xx $_.value }).flat.join(","), ")"; + diff --git a/stats/pwc-current.json b/stats/pwc-current.json index b69481e8cb..b50af4675f 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,217 +1,26 @@ { "tooltip" : { + "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/>", - "followPointer" : 1, - "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>" + "followPointer" : 1 }, - "series" : [ - { - "colorByPoint" : 1, - "data" : [ - { - "drilldown" : "Adam Russell", - "y" : 4, - "name" : "Adam Russell" - }, - { - "drilldown" : "Ali Moradi", - "y" : 5, - "name" : "Ali Moradi" - }, - { - "drilldown" : "Andrew Shitov", - "y" : 4, - "name" : "Andrew Shitov" - }, - { - "name" : "Athanasius", - "y" : 4, - "drilldown" : "Athanasius" - }, - { - "drilldown" : "Avery Adams", - "name" : "Avery Adams", - "y" : 2 - }, - { - "drilldown" : "BarrOff", - "name" : "BarrOff", - "y" : 2 - }, - { - "drilldown" : "Bob Lied", - "name" : "Bob Lied", - "y" : 3 - }, - { - "drilldown" : "Bruce Gray", - "name" : "Bruce Gray", - "y" : 2 - }, - { - "name" : "Cheok-Yin Fung", - "y" : 2, - "drilldown" : "Cheok-Yin Fung" - }, - { - "y" : 2, - "name" : "Dave Jacoby", - "drilldown" : "Dave Jacoby" - }, - { - "y" : 2, - "name" : "David Ferrone", - "drilldown" : "David Ferrone" - }, - { - "drilldown" : "E. Choroba", - "y" : 2, - "name" : "E. Choroba" - }, - { - "drilldown" : "Humberto Massa", - "name" : "Humberto Massa", - "y" : 2 - }, - { - "drilldown" : "Jan Krnavek", - "y" : 2, - "name" : "Jan Krnavek" - }, - { - "drilldown" : "Jorg Sommrey", - "y" : 2, - "name" : "Jorg Sommrey" - }, - { - "drilldown" : "Laurent Rosenfeld", - "name" : "Laurent Rosenfeld", - "y" : 5 - }, - { - "name" : "Lubos Kolouch", - "y" : 3, - "drilldown" : "Lubos Kolouch" - }, - { - "y" : 8, - "name" : "Luca Ferrari", - "drilldown" : "Luca Ferrari" - }, - { - "name" : "Mariano Spadaccini", - "y" : 2, - "drilldown" : "Mariano Spadaccini" - }, - { - "name" : "Mark Anderson", - "y" : 2, - "drilldown" : "Mark Anderson" - }, - { - "drilldown" : "Marton Polgar", - "name" : "Marton Polgar", - "y" : 2 - }, - { - "name" : "Matthew Neleigh", - "y" : 2, - "drilldown" : "Matthew Neleigh" - }, - { - "y" : 3, - "name" : "Matthias Muth", - "drilldown" : "Matthias Muth" - }, - { - "y" : 2, - "name" : "mauke", - "drilldown" : "mauke" - }, - { - "y" : 2, - "name" : "Niels van Dijke", - "drilldown" : "Niels van Dijke" - }, - { - "drilldown" : "Packy Anderson", - "y" : 5, - "name" : "Packy Anderson" - }, - { - "name" : "Peter Campbell Smith", - "y" : 3, - "drilldown" : "Peter Campbell Smith" - }, - { - "name" : "Peter Meszaros", - "y" : 2, - "drilldown" : "Peter Meszaros" - }, - { - "y" : 3, - "name" : "Robbie Hatley", - "drilldown" : "Robbie Hatley" - }, - { - "y" : 2, - "name" : "Robert DiCicco", - "drilldown" : "Robert DiCicco" - }, - { - "drilldown" : "Robert Ransbottom", - "name" : "Robert Ransbottom", - "y" : 2 - }, - { - "y" : 5, - "name" : "Roger Bell_West", - "drilldown" : "Roger Bell_West" - }, - { - "y" : 3, - "name" : "Simon Green", - "drilldown" : "Simon Green" - }, - { - "y" : 2, - "name" : "Solathian", - "drilldown" : "Solathian" - }, - { - "drilldown" : "Stephen G. Lynn", - "y" : 3, - "name" : "Stephen G. Lynn" - }, - { - "drilldown" : "Thomas Kohler", - "y" : 4, - "name" : "Thomas Kohler" - }, - { - "drilldown" : "Ulrich Rieke", - "y" : 4, - "name" : "Ulrich Rieke" - }, - { - "drilldown" : "W. Luis Mochan", - "y" : 3, - "name" : "W. Luis Mochan" - }, - { - "name" : "Wanderdoc", - "y" : 2, - "drilldown" : "Wanderdoc" - } - ], - "name" : "The Weekly Challenge - 233" - } - ], "title" : { "text" : "The Weekly Challenge - 233" }, - "xAxis" : { - "type" : "category" + "legend" : { + "enabled" : 0 + }, + "chart" : { + "type" : "column" + }, + "plotOptions" : { + "series" : { + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + }, + "borderWidth" : 0 + } }, "yAxis" : { "title" : { @@ -219,13 +28,10 @@ } }, "subtitle" : { - "text" : "[Champions: 39] Last updated at 2023-09-11 01:40:00 GMT" - }, - "legend" : { - "enabled" : 0 + "text" : "[Champions: 40] Last updated at 2023-09-11 01:57:52 GMT" }, - "chart" : { - "type" : "column" + "xAxis" : { + "type" : "category" }, "drilldown" : { "series" : [ @@ -240,10 +46,11 @@ 2 ] ], - "id" : "Adam Russell", - "name" : "Adam Russell" + "name" : "Adam Russell", + "id" : "Adam Russell" }, { + "name" : "Ali Moradi", "data" : [ [ "Perl", @@ -258,22 +65,33 @@ 1 ] ], - "name" : "Ali Moradi", "id" : "Ali Moradi" }, { + "id" : "Andrew Shitov", "data" : [ [ "Raku", 4 ] ], - "name" : "Andrew Shitov", - "id" : "Andrew Shitov" + "name" : "Andrew Shitov" + }, + { + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Arne Sommer", + "id" : "Arne Sommer" }, { - "name" : "Athanasius", - "id" : "Athanasius", "data" : [ [ "Perl", @@ -283,31 +101,32 @@ "Raku", 2 ] - ] + ], + "name" : "Athanasius", + "id" : "Athanasius" }, { - "id" : "Avery Adams", - "name" : "Avery Adams", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Avery Adams", + "id" : "Avery Adams" }, { + "id" : "BarrOff", + "name" : "BarrOff", "data" : [ [ "Raku", 2 ] - ], - "id" : "BarrOff", - "name" : "BarrOff" + ] }, { "id" : "Bob Lied", - "name" : "Bob Lied", "data" : [ [ "Perl", @@ -317,57 +136,58 @@ "Blog", 1 ] - ] + ], + "name" : "Bob Lied" }, { - "id" : "Bruce Gray", "name" : "Bruce Gray", "data" : [ [ "Raku", 2 ] - ] + ], + "id" : "Bruce Gray" }, { + "id" : "Cheok-Yin Fung", + "name" : "Cheok-Yin Fung", "data" : [ [ "Perl", 2 ] - ], - "name" : "Cheok-Yin Fung", - "id" : "Cheok-Yin Fung" + ] }, { - "id" : "Dave Jacoby", "name" : "Dave Jacoby", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Dave Jacoby" }, { - "name" : "David Ferrone", "id" : "David Ferrone", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "David Ferrone" }, { + "id" : "E. Choroba", "data" : [ [ "Perl", 2 ] ], - "name" : "E. Choroba", - "id" : "E. Choroba" + "name" : "E. Choroba" }, { "id" : "Humberto Massa", @@ -380,14 +200,14 @@ ] }, { + "id" : "Jan Krnavek", + "name" : "Jan Krnavek", "data" : [ [ "Raku", 2 ] - ], - "id" : "Jan Krnavek", - "name" : "Jan Krnavek" + ] }, { "data" : [ @@ -396,8 +216,8 @@ 2 ] ], - "id" : "Jorg Sommrey", - "name" : "Jorg Sommrey" + "name" : "Jorg Sommrey", + "id" : "Jorg Sommrey" }, { "data" : [ @@ -418,6 +238,7 @@ "id" : "Laurent Rosenfeld" }, { + "name" : "Lubos Kolouch", "data" : [ [ "Perl", @@ -428,10 +249,10 @@ 1 ] ], - "id" : "Lubos Kolouch", - "name" : "Lubos Kolouch" + "id" : "Lubos Kolouch" }, { + "name" : "Luca Ferrari", "data" : [ [ "Raku", @@ -442,7 +263,6 @@ 6 ] ], - "name" : "Luca Ferrari", "id" : "Luca Ferrari" }, { @@ -457,23 +277,23 @@ }, { "name" : "Mark Anderson", - "id" : "Mark Anderson", "data" : [ [ "Raku", 2 ] - ] + ], + "id" : "Mark Anderson" }, { - "id" : "Marton Polgar", "name" : "Marton Polgar", "data" : [ [ "Raku", 2 ] - ] + ], + "id" : "Marton Polgar" }, { "id" : "Matthew Neleigh", @@ -500,24 +320,24 @@ ] }, { + "id" : "mauke", "data" : [ [ "Perl", 2 ] ], - "id" : "mauke", "name" : "mauke" }, { + "id" : "Niels van Dijke", + "name" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] - ], - "name" : "Niels van Dijke", - "id" : "Niels van Dijke" + ] }, { "id" : "Packy Anderson", @@ -538,8 +358,6 @@ ] }, { - "id" : "Peter Campbell Smith", - "name" : "Peter Campbell Smith", "data" : [ [ "Perl", @@ -549,7 +367,9 @@ "Blog", 1 ] - ] + ], + "name" : "Peter Campbell Smith", + "id" : "Peter Campbell Smith" }, { "data" : [ @@ -558,10 +378,12 @@ 2 ] ], - "id" : "Peter Meszaros", - "name" : "Peter Meszaros" + "name" : "Peter Meszaros", + "id" : "Peter Meszaros" }, { + "id" : "Robbie Hatley", + "name" : "Robbie Hatley", "data" : [ [ "Perl", @@ -571,9 +393,7 @@ "Blog", 1 ] - ], - "id" : "Robbie Hatley", - "name" : "Robbie Hatley" + ] }, { "id" : "Robert DiCicco", @@ -590,18 +410,18 @@ ] }, { + "name" : "Robert Ransbottom", "data" : [ [ "Raku", 2 ] ], - "name" : "Robert Ransbottom", "id" : "Robert Ransbottom" }, { - "name" : "Roger Bell_West", "id" : "Roger Bell_West", + "name" : "Roger Bell_West", "data" : [ [ "Perl", @@ -619,7 +439,6 @@ }, { "id" : "Simon Green", - "name" : "Simon Green", "data" : [ [ "Perl", @@ -629,7 +448,8 @@ "Blog", 1 ] - ] + ], + "name" : "Simon Green" }, { "data" : [ @@ -638,11 +458,10 @@ 2 ] ], - "id" : "Solathian", - "name" : "Solathian" + "name" : "Solathian", + "id" : "Solathian" }, { - "id" : "Stephen G. Lynn", "name" : "Stephen G. Lynn", "data" : [ [ @@ -653,10 +472,10 @@ "Blog", 1 ] - ] + ], + "id" : "Stephen G. Lynn" }, { - "name" : "Thomas Kohler", "id" : "Thomas Kohler", "data" : [ [ @@ -667,10 +486,10 @@ "Blog", 2 ] - ] + ], + "name" : "Thomas Kohler" }, { - "id" : "Ulrich Rieke", "name" : "Ulrich Rieke", "data" : [ [ @@ -681,7 +500,8 @@ "Raku", 2 ] - ] + ], + "id" : "Ulrich Rieke" }, { "data" : [ @@ -698,8 +518,8 @@ "id" : "W. Luis Mochan" }, { - "name" : "Wanderdoc", "id" : "Wanderdoc", + "name" : "Wanderdoc", "data" : [ [ "Perl", @@ -709,13 +529,212 @@ } ] }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - } + "series" : [ + { + "data" : [ + { + "name" : "Adam Russell", + "y" : 4, + "drilldown" : "Adam Russell" + }, + { + "name" : "Ali Moradi", + "y" : 5, + "drilldown" : "Ali Moradi" + }, + { + "name" : "Andrew Shitov", + "y" : 4, + "drilldown" : "Andrew Shitov" + }, + { + "y" : 3, + "name" : "Arne Sommer", + "drilldown" : "Arne Sommer" + }, + { + "y" : 4, + "name" : "Athanasius", + "drilldown" : "Athanasius" + }, + { + "drilldown" : "Avery Adams", + "name" : "Avery Adams", + "y" : 2 + }, + { + "name" : "BarrOff", + "y" : 2, + "drilldown" : "BarrOff" + }, + { + "y" : 3, + "name" : "Bob Lied", + "drilldown" : "Bob Lied" + }, + { + "drilldown" : "Bruce Gray", + "y" : 2, + "name" : "Bruce Gray" + }, + { + "drilldown" : "Cheok-Yin Fung", + "name" : "Cheok-Yin Fung", + "y" : 2 + }, + { + "drilldown" : "Dave Jacoby", + "name" : "Dave Jacoby", + "y" : 2 + }, + { + "drilldown" : "David Ferrone", + "name" : "David Ferrone", + "y" : 2 + }, + { + "y" : 2, + "name" : "E. Choroba", + "drilldown" : "E. Choroba" + }, + { + "name" : "Humberto Massa", + "y" : 2, + "drilldown" : "Humberto Massa" + }, + { + "name" : "Jan Krnavek", + "y" : 2, + "drilldown" : "Jan Krnavek" + }, + { + "name" : "Jorg Sommrey", + "y" : 2, + "drilldown" : "Jorg Sommrey" + }, + { + "y" : 5, + "name" : "Laurent Rosenfeld", + "drilldown" : "Laurent Rosenfeld" + }, + { + "name" : "Lubos Kolouch", + "y" : 3, + "drilldown" : "Lubos Kolouch" + }, + { + "name" : "Luca Ferrari", + "y" : 8, + "drilldown" : "Luca Ferrari" + }, + { + "drilldown" : "Mariano Spadaccini", + "y" : 2, + "name" : "Mariano Spadaccini" + }, + { + "y" : 2, + "name" : "Mark Anderson", + "drilldown" : "Mark Anderson" + }, + { + "drilldown" : "Marton Polgar", + "y" : 2, + "name" : "Marton Polgar" + }, + { + "drilldown" : "Matthew Neleigh", + "name" : "Matthew Neleigh", + "y" : 2 + }, + { + "drilldown" : "Matthias Muth", + "y" : 3, + "name" : "Matthias Muth" + }, + { + "drilldown" : "mauke", + "name" : "mauke", + "y" : 2 + }, + { + "name" : "Niels van Dijke", + "y" : 2, + "drilldown" : "Niels van Dijke" + }, + { + "name" : "Packy Anderson", + "y" : 5, + "drilldown" : "Packy Anderson" + }, + { + "name" : "Peter Campbell Smith", + "y" : 3, + "drilldown" : "Peter Campbell Smith" + }, + { + "name" : "Peter Meszaros", + "y" : 2, + "drilldown" : "Peter Meszaros" + }, + { + "y" : 3, + "name" : "Robbie Hatley", + "drilldown" : "Robbie Hatley" + }, + { + "drilldown" : "Robert DiCicco", + "name" : "Robert DiCicco", + "y" : 2 + }, + { + "name" : "Robert Ransbottom", + "y" : 2, + "drilldown" : "Robert Ransbottom" + }, + { + "drilldown" : "Roger Bell_West", + "y" : 5, + "name" : "Roger Bell_West" + }, + { + "drilldown" : "Simon Green", + "y" : 3, + "name" : "Simon Green" + }, + { + "name" : "Solathian", + "y" : 2, + "drilldown" : "Solathian" + }, + { + "drilldown" : "Stephen G. Lynn", + "name" : "Stephen G. Lynn", + "y" : 3 + }, + { + "drilldown" : "Thomas Kohler", + "name" : "Thomas Kohler", + "y" : 4 + }, + { + "y" : 4, + "name" : "Ulrich Rieke", + "drilldown" : "Ulrich Rieke" + }, + { + "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan", + "y" : 3 + }, + { + "drilldown" : "Wanderdoc", + "y" : 2, + "name" : "Wanderdoc" + } + ], + "colorByPoint" : 1, + "name" : "The Weekly Challenge - 233" } - } + ] } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 954aaaf056..30b66ebde5 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,31 +1,23 @@ { - "chart" : { - "type" : "column" - }, - "legend" : { - "enabled" : "false" - }, - "yAxis" : { - "title" : { - "text" : null - }, - "min" : 0 + "xAxis" : { + "type" : "category", + "labels" : { + "style" : { + "fontSize" : "13px", + "fontFamily" : "Verdana, sans-serif" + } + } }, "subtitle" : { - "text" : "Last updated at 2023-09-11 01:39:59 GMT" - }, - "tooltip" : { - "pointFormat" : "<b>{point.y:.0f}</b>" - }, - "title" : { - "text" : "The Weekly Challenge Contributions [2019 - 2023]" + "text" : "Last updated at 2023-09-11 01:57:51 GMT" }, "series" : [ { + "name" : "Contributions", "data" : [ [ "Blog", - 3926 + 3927 ], [ "Perl", @@ -33,31 +25,39 @@ ], [ "Raku", - 6886 + 6888 ] ], - "name" : "Contributions", "dataLabels" : { - "y" : 10, - "format" : "{point.y:.0f}", + "rotation" : -90, + "enabled" : "true", + "color" : "#FFFFFF", "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" }, "align" : "right", - "rotation" : -90, - "color" : "#FFFFFF", - "enabled" : "true" + "y" : 10, + "format" : "{point.y:.0f}" } } ], - "xAxis" : { - "labels" : { - "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" - } + "title" : { + "text" : "The Weekly Challenge Contributions [2019 - 2023]" + }, + "tooltip" : { + "pointFormat" : "<b>{point.y:.0f}</b>" + }, + "legend" : { + "enabled" : "false" + }, + "yAxis" : { + "title" : { + "text" : null |
