diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2019-05-02 19:53:41 +0100 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2019-05-02 19:53:41 +0100 |
| commit | 32ab749b5a997c7791867f6e7e1c4a5f6fdab8d1 (patch) | |
| tree | c4a882062cc0804472a935b3e801d71efcea3f19 | |
| parent | be3984e65d30bc37fcae8a30a5b268dcccbaaff9 (diff) | |
| download | perlweeklychallenge-club-32ab749b5a997c7791867f6e7e1c4a5f6fdab8d1.tar.gz perlweeklychallenge-club-32ab749b5a997c7791867f6e7e1c4a5f6fdab8d1.tar.bz2 perlweeklychallenge-club-32ab749b5a997c7791867f6e7e1c4a5f6fdab8d1.zip | |
- Added solutions by E. Choroba.
| -rw-r--r-- | challenge-006/e-choroba/blog.txt | 1 | ||||
| -rw-r--r-- | challenge-006/e-choroba/perl5/ch-1.pl | 17 | ||||
| -rw-r--r-- | challenge-006/e-choroba/perl5/ch-2.pl | 14 | ||||
| -rw-r--r-- | stats/pwc-current.json | 117 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown.json | 132 | ||||
| -rw-r--r-- | stats/pwc-leaders.json | 816 | ||||
| -rw-r--r-- | stats/pwc-summary-1-30.json | 28 | ||||
| -rw-r--r-- | stats/pwc-summary-31-60.json | 98 | ||||
| -rw-r--r-- | stats/pwc-summary-61-90.json | 38 | ||||
| -rw-r--r-- | stats/pwc-summary.json | 194 |
10 files changed, 751 insertions, 704 deletions
diff --git a/challenge-006/e-choroba/blog.txt b/challenge-006/e-choroba/blog.txt new file mode 100644 index 0000000000..808a14970e --- /dev/null +++ b/challenge-006/e-choroba/blog.txt @@ -0,0 +1 @@ +http://blogs.perl.org/users/e_choroba/2019/04/perl-weekly-challenge-006-ranges-and-ramanujans-constant.html diff --git a/challenge-006/e-choroba/perl5/ch-1.pl b/challenge-006/e-choroba/perl5/ch-1.pl new file mode 100644 index 0000000000..de88538c0e --- /dev/null +++ b/challenge-006/e-choroba/perl5/ch-1.pl @@ -0,0 +1,17 @@ +#! /usr/bin/perl +use strict; +use warnings; + +use Test::More tests => 1; + +is compact('1,2,3,4,9,10,14,15,16'), '1-4,9,10,14-16'; + +use String::Util::Range qw{ convert_sequence_to_range }; +sub compact { + my ($seq_string) = @_; + join ',', @{ convert_sequence_to_range( + array => [split /,/, $seq_string], + threshold => 3, + separator => '-') + }; +} diff --git a/challenge-006/e-choroba/perl5/ch-2.pl b/challenge-006/e-choroba/perl5/ch-2.pl new file mode 100644 index 0000000000..f0c30638ed --- /dev/null +++ b/challenge-006/e-choroba/perl5/ch-2.pl @@ -0,0 +1,14 @@ +#! /usr/bin/perl +use warnings; +use strict; +use feature qw{ say }; + +use Math::BigFloat; + +use constant ACCURACY => 64; + +my $r = ('Math::BigFloat'->bpi(ACCURACY) + * 'Math::BigFloat'->new(163)->bsqrt(ACCURACY) + )->bexp; +$r->precision(-32); +say $r; diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 81858179b4..022df4c9c2 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,14 +1,6 @@ { - "tooltip" : { - "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>", - "followPointer" : 1, - "pointerFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>" - }, "subtitle" : { - "text" : "[Champions: 9] Last updated at 2019-05-02 18:26:10 GMT" - }, - "title" : { - "text" : "Perl Weekly Challenge - 006" + "text" : "[Champions: 10] Last updated at 2019-05-02 18:53:17 GMT" }, "xAxis" : { "type" : "category" @@ -16,8 +8,8 @@ "drilldown" : { "series" : [ { - "name" : "Alicia Bielsa", "id" : "Alicia Bielsa", + "name" : "Alicia Bielsa", "data" : [ [ "Perl 5", @@ -26,14 +18,14 @@ ] }, { + "name" : "Andrezgz", + "id" : "Andrezgz", "data" : [ [ "Perl 5", 2 ] - ], - "name" : "Andrezgz", - "id" : "Andrezgz" + ] }, { "data" : [ @@ -46,14 +38,24 @@ "id" : "Athanasius" }, { - "id" : "Gustavo Chaves", - "name" : "Gustavo Chaves", "data" : [ [ "Perl 5", 2 ] - ] + ], + "id" : "E. Choroba", + "name" : "E. Choroba" + }, + { + "data" : [ + [ + "Perl 5", + 2 + ] + ], + "id" : "Gustavo Chaves", + "name" : "Gustavo Chaves" }, { "data" : [ @@ -66,12 +68,10 @@ 2 ] ], - "name" : "Joelle Maslak", - "id" : "Joelle Maslak" + "id" : "Joelle Maslak", + "name" : "Joelle Maslak" }, { - "name" : "Laurent Rosenfeld", - "id" : "Laurent Rosenfeld", "data" : [ [ "Perl 5", @@ -81,17 +81,19 @@ "Perl 6", 1 ] - ] + ], + "id" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld" }, { - "id" : "Maxim Kolodyazhny", - "name" : "Maxim Kolodyazhny", "data" : [ [ "Perl 5", 2 ] - ] + ], + "id" : "Maxim Kolodyazhny", + "name" : "Maxim Kolodyazhny" }, { "data" : [ @@ -100,48 +102,54 @@ 1 ] ], - "id" : "Simon Proctor", - "name" : "Simon Proctor" + "name" : "Simon Proctor", + "id" : "Simon Proctor" }, { - "id" : "Tim Smith", - "name" : "Tim Smith", "data" : [ [ "Perl 6", 2 ] - ] + ], + "id" : "Tim Smith", + "name" : "Tim Smith" } ] }, "legend" : { "enabled" : 0 }, + "chart" : { + "type" : "column" + }, "series" : [ { - "name" : "Champions", - "colorByPoint" : 1, "data" : [ { "drilldown" : "Alicia Bielsa", - "y" : 1, - "name" : "Alicia Bielsa" + "name" : "Alicia Bielsa", + "y" : 1 }, { - "y" : 2, + "drilldown" : "Andrezgz", "name" : "Andrezgz", - "drilldown" : "Andrezgz" + "y" : 2 }, { - "name" : "Athanasius", "y" : 2, + "name" : "Athanasius", "drilldown" : "Athanasius" }, { "y" : 2, + "name" : "E. Choroba", + "drilldown" : "E. Choroba" + }, + { + "drilldown" : "Gustavo Chaves", "name" : "Gustavo Chaves", - "drilldown" : "Gustavo Chaves" + "y" : 2 }, { "y" : 4, @@ -150,27 +158,42 @@ }, { "drilldown" : "Laurent Rosenfeld", - "y" : 2, - "name" : "Laurent Rosenfeld" + "name" : "Laurent Rosenfeld", + "y" : 2 }, { - "name" : "Maxim Kolodyazhny", "y" : 2, + "name" : "Maxim Kolodyazhny", "drilldown" : "Maxim Kolodyazhny" }, { - "name" : "Simon Proctor", + "drilldown" : "Simon Proctor", "y" : 1, - "drilldown" : "Simon Proctor" + "name" : "Simon Proctor" }, { "drilldown" : "Tim Smith", "name" : "Tim Smith", "y" : 2 } - ] + ], + "colorByPoint" : 1, + "name" : "Champions" } ], + "title" : { + "text" : "Perl Weekly Challenge - 006" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "tooltip" : { + "pointerFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>", + "followPointer" : 1, + "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>" + }, "plotOptions" : { "series" : { "borderWidth" : 0, @@ -179,13 +202,5 @@ "format" : "{point.y}" } } - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "chart" : { - "type" : "column" } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index f1540892d5..5398874d5e 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,67 +1,32 @@ { - "title" : { - "text" : "Perl Weekly Challenge Language" + "tooltip" : { + "pointFormat" : "<span style=\"color:{point.color}\">{point.name}</span>: <b>{point.y:f}</b><br/>", + "followPointer" : "true", + "headerFormat" : "<span style=\"font-size:11px\"></span>" + }, + "chart" : { + "type" : "column" }, "plotOptions" : { "series" : { - "borderWidth" : 0, "dataLabels" : { "enabled" : 1, "format" : "{point.y}" - } + }, + "borderWidth" : 0 } }, "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2019-05-02 18:26:21 GMT" + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2019-05-02 18:53:26 GMT" }, - "series" : [ - { - "data" : [ - { - "drilldown" : "001", - "name" : "#001 [P5=76 P6=37]", - "y" : 113 - }, - { - "name" : "#002 [P5=63 P6=32]", - "y" : 95, - "drilldown" : "002" - }, - { - "drilldown" : "003", - "y" : 58, - "name" : "#003 [P5=32 P6=26]" - }, - { - "name" : "#004 [P5=46 P6=29]", - "y" : 75, - "drilldown" : "004" - }, - { - "drilldown" : "005", - "name" : "#005 [P5=31 P6=22]", - "y" : 53 - }, - { - "drilldown" : "006", - "y" : 18, - "name" : "#006 [P5=12 P6=6]" - } - ], - "colorByPoint" : "true", - "name" : "Perl Weekly Challenge Languages" - } - ], - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } + "title" : { + "text" : "Perl Weekly Challenge Language" }, "drilldown" : { "series" : [ { - "name" : "001", "id" : "001", + "name" : "001", "data" : [ [ "Perl 5", @@ -74,6 +39,7 @@ ] }, { + "id" : "002", "data" : [ [ "Perl 5", @@ -84,10 +50,10 @@ 32 ] ], - "id" : "002", "name" : "002" }, { + "id" : "003", "data" : [ [ "Perl 5", @@ -98,11 +64,9 @@ 26 ] ], - "id" : "003", "name" : "003" }, { - "id" : "004", "data" : [ [ "Perl 5", @@ -113,10 +77,10 @@ 29 ] ], - "name" : "004" + "name" : "004", + "id" : "004" }, { - "name" : "005", "id" : "005", "data" : [ [ @@ -127,36 +91,72 @@ "Perl 6", 22 ] - ] + ], + "name" : "005" }, { - "name" : "006", + "id" : "006", "data" : [ [ "Perl 5", - 12 + 14 ], [ "Perl 6", 6 ] ], - "id" : "006" + "name" : "006" } ] }, - "chart" : { - "type" : "column" - }, - "tooltip" : { - "followPointer" : "true", - "pointFormat" : "<span style=\"color:{point.color}\">{point.name}</span>: <b>{point.y:f}</b><br/>", - "headerFormat" : "<span style=\"font-size:11px\"></span>" + "series" : [ + { + "colorByPoint" : "true", + "data" : [ + { + "y" : 113, + "name" : "#001 [P5=76 P6=37]", + "drilldown" : "001" + }, + { + "y" : 95, + "drilldown" : "002", + "name" : "#002 [P5=63 P6=32]" + }, + { + "drilldown" : "003", + "name" : "#003 [P5=32 P6=26]", + "y" : 58 + }, + { + "y" : 75, + "name" : "#004 [P5=46 P6=29]", + "drilldown" : "004" + }, + { + "y" : 53, + "drilldown" : "005", + "name" : "#005 [P5=31 P6=22]" + }, + { + "y" : 20, + "drilldown" : "006", + "name" : "#006 [P5=14 P6=6]" + } + ], + "name" : "Perl Weekly Challenge Languages" + } + ], + "xAxis" : { + "type" : "category" }, "legend" : { "enabled" : "false" }, - "xAxis" : { - "type" : "category" + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } } } diff --git a/stats/pwc-leaders.json b/stats/pwc-leaders.json index cb2a0678ed..55933387d8 100644 --- a/stats/pwc-leaders.json +++ b/stats/pwc-leaders.json @@ -1,52 +1,327 @@ { - "yAxis" : { - "title" : { - "text" : "Total Score" + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + } } }, + "tooltip" : { + "pointFormat" : "<span style=\"color:{point.color}\">{point.name}</span>: <b>{point.y:f}</b><br/>", + "followPointer" : "true", + "headerFormat" : "<span style=\"font-size:11px\"></span>" + }, "chart" : { "type" : "column" }, + "xAxis" : { + "type" : "category" + }, + "series" : [ + { + "data" : [ + { + "drilldown" : "Laurent Rosenfeld", + "name" : "#1: Laurent Rosenfeld", + "y" : 54 + }, + { + "drilldown" : "Joelle Maslak", + "name" : "#2: Joelle Maslak", + "y" : 50 + }, + { + "drilldown" : "Jaldhar H. Vyas", + "name" : "#3: Jaldhar H. Vyas", + "y" : 40 + }, + { + "drilldown" : "Simon Proctor", + "y" : 38, + "name" : "#4: Simon Proctor" + }, + { + "y" : 36, + "name" : "#5: Dr James A. Smith", + "drilldown" : "Dr James A. Smith" + }, + { + "name" : "#6: Jo Christian Oterhals", + "y" : 36, + "drilldown" : "Jo Christian Oterhals" + }, + { + "drilldown" : "Nick Logan", + "name" : "#7: Nick Logan", + "y" : 32 + }, + { + "name" : "#8: Ruben Westerberg", + "y" : 32, + "drilldown" : "Ruben Westerberg" + }, + { + "y" : 30, + "name" : "#9: Adam Russell", + "drilldown" : "Adam Russell" + }, + { + "drilldown" : "Lars Balker", + "name" : "#10: Lars Balker", + "y" : 28 + }, + { + "y" : 26, + "name" : "#11: Gustavo Chaves", + "drilldown" : "Gustavo Chaves" + }, + { + "y" : 26, + "name" : "#12: Mark Senn", + "drilldown" : "Mark Senn" + }, + { + "name" : "#13: Andrezgz", + "y" : 24, + "drilldown" : "Andrezgz" + }, + { + "drilldown" : "Arne Sommer", + "name" : "#14: Arne Sommer", + "y" : 24 + }, + { + "drilldown" : "Athanasius", + "name" : "#15: Athanasius", + "y" : 24 + }, + { + "drilldown" : "Kian-Meng Ang", + "y" : 24, + "name" : "#16: Kian-Meng Ang" + }, + { + "drilldown" : "Doug Schrag", + "y" : 20, + "name" : "#17: Doug Schrag" + }, + { + "name" : "#18: Francis Whittle", + "y" : 18, + "drilldown" : "Francis Whittle" + }, + { + "drilldown" : "Duncan C. White", + "name" : "#19: Duncan C. White", + "y" : 16 + }, + { + "drilldown" : "Robert Gratza", + "name" : "#20: Robert Gratza", + "y" : 16 + }, + { + "name" : "#21: John Barrett", + "y" : 14, + "drilldown" : "John Barrett" + }, + { + "name" : "#22: Daniel Mantovani", + "y" : 12, + "drilldown" : "Daniel Mantovani" + }, + { + "drilldown" : "E. Choroba", + "name" : "#23: E. Choroba", + "y" : 12 + }, + { + "drilldown" : "Maxim Kolodyazhny", + "y" : 12, + "name" : "#24: Maxim Kolodyazhny" + }, + { + "drilldown" : "Philippe Bruhat", + "y" : 12, + "name" : "#25: Philippe Bruhat" + }, + { + "drilldown" : "Sergio Iglesias", + "name" : "#26: Sergio Iglesias", + "y" : 12 + }, + { + "name" : "#27: Khalid", + "y" : 10, + "drilldown" : "Khalid" + }, + { + "y" : 10, + "name" : "#28: Steve Rogerson", + "drilldown" : "Steve Rogerson" + }, + { + "drilldown" : "Veesh Goldman", + "name" : "#29: Veesh Goldman", + "y" : 10 + }, + { + "name" : "#30: Alex Daniel", + "y" : 8, + "drilldown" : "Alex Daniel" + }, + { + "y" : 8, + "name" : "#31: Arpad Toth", + "drilldown" : "Arpad Toth" + }, + { + "y" : 8, + "name" : "#32: Bob Kleemann", + "drilldown" : "Bob Kleemann" + }, + { + "y" : 8, + "name" : "#33: Chenyf", + "drilldown" : "Chenyf" + }, + { + "drilldown" : "David Kayal", + "name" : "#34: David Kayal", + "y" : 8 + }, + { + "drilldown" : "Jaime Corchado", + "name" : "#35: Jaime Corchado", + "y" : 8 + }, + { + "name" : "#36: Matt Latusek", + "y" : 8, + "drilldown" : "Matt Latusek" + }, + { + "drilldown" : "Ozzy", + "y" : 8, + "name" : "#37: Ozzy" + }, + { + "drilldown" : "Simon Reinhardt", + "y" : 8, + "name" : "#38: Simon Reinhardt" + }, + { + "y" : 8, + "name" : "#39: Steven Wilson", + "drilldown" : "Steven Wilson" + }, + { + "drilldown" : "Tim Smith", + "y" : 8, + "name" : "#40: Tim Smith" + }, + { + "name" : "#41: Ailbhe Tweedie", + "y" : 6, + "drilldown" : "Ailbhe Tweedie" + }, + { + "drilldown" : "Alicia Bielsa", + "name" : "#42: Alicia Bielsa", + "y" : 6 + }, + { + "drilldown" : "Dave Cross", + "name" : "#43: Dave Cross", + "y" : 6 + }, + { + "drilldown" : "Dave Jacoby", + "name" : "#44: Dave Jacoby", + "y" : 6 + }, + { + "drilldown" : "Freddie B", + "y" : 6, + "name" : "#45: Freddie B" + }, + { + "drilldown" : "Jeremy Carman", + "name" : "#46: Jeremy Carman", + "y" : 6 + }, + { + "name" : "#47: Kivanc Yazan", + "y" : 6, + "drilldown" : "Kivanc Yazan" + }, + { + "name" : "#48: Neil Bowers", + "y" : 6, + "drilldown" : "Neil Bowers" + }, + { + "name" : "#49: Pete Houston", + "y" : 6, + "drilldown" : "Pete Houston" + }, + { + "name" : "#50: Sean Meininger", + "y" : 6, + "drilldown" : "Sean Meininger" + } + ], + "name" : "Perl Weekly Challenge Leaders", + "colorByPoint" : "true" + } + ], + "legend" : { + "enabled" : "false" + }, + "subtitle" : { + "text" : "Click the columns to drilldown the score breakdown. Last updated at 2019-05-02 18:53:20 GMT" + }, "drilldown" : { "series" : [ { + "name" : "Laurent Rosenfeld", "data" : [ [ - "Perl 5", - 11 - ], - [ "Perl 6", 10 ], [ + "Perl 5", + 11 + ], + [ "Blog", 6 ] ], - "name" : "Laurent Rosenfeld", "id" : "Laurent Rosenfeld" }, { - "id" : "Joelle Maslak", - "name" : "Joelle Maslak", "data" : [ [ + "Perl 5", + 12 + ], + [ "Perl 6", 12 ], [ "Blog", 1 - ], - [ - "Perl 5", - 12 ] - ] + ], + "name" : "Joelle Maslak", + "id" : "Joelle Maslak" }, { - "name" : "Jaldhar H. Vyas", "data" : [ [ "Perl 6", @@ -57,28 +332,28 @@ 10 ] ], + "name" : "Jaldhar H. Vyas", "id" : "Jaldhar H. Vyas" }, { - "id" : "Simon Proctor", + "name" : "Simon Proctor", "data" : [ [ - "Perl 5", - 4 - ], - [ "Perl 6", 11 ], [ + "Perl 5", + 4 + ], + [ "Blog", 4 ] ], - "name" : "Simon Proctor" + "id" : "Simon Proctor" }, { - "name" : "Dr James A. Smith", "data" : [ [ "Perl 5", @@ -89,11 +364,10 @@ 8 ] ], + "name" : "Dr James A. Smith", "id" : "Dr James A. Smith" }, { - "id" : "Jo Christian Oterhals", - "name" : "Jo Christian Oterhals", "data" : [ [ "Blog", @@ -107,7 +381,9 @@ "Perl 5", 6 ] - ] + ], + "name" : "Jo Christian Oterhals", + "id" : "Jo Christian Oterhals" }, { "id" : "Nick Logan", @@ -124,18 +400,18 @@ "name" : "Nick Logan" }, { - "name" : "Ruben Westerberg", + "id" : "Ruben Westerberg", "data" : [ [ - "Perl 6", + "Perl 5", 8 ], [ - "Perl 5", + "Perl 6", 8 ] ], - "id" : "Ruben Westerberg" + "name" : "Ruben Westerberg" }, { "name" : "Adam Russell", @@ -153,19 +429,20 @@ }, { "id" : "Lars Balker", + "name" : "Lars Balker", "data" : [ [ - "Perl 6", - 4 - ], - [ "Perl 5", 10 + ], + [ + "Perl 6", + 4 ] - ], - "name" : "Lars Balker" + ] }, { + "name" : "Gustavo Chaves", "data" : [ [ "Perl 5", @@ -176,7 +453,6 @@ 4 ] ], - "name" : "Gustavo Chaves", "id" : "Gustavo Chaves" }, { @@ -194,17 +470,17 @@ "id" : "Mark Senn" }, { - "id" : "Andrezgz", "name" : "Andrezgz", "data" : [ [ "Perl 5", 12 ] - ] + ], + "id" : "Andrezgz" }, { - "name" : "Arne Sommer", + "id" : "Arne Sommer", "data" : [ [ "Blog", @@ -215,55 +491,55 @@ 8 ] ], - "id" : "Arne Sommer" + "name" : "Arne Sommer" }, { "id" : "Athanasius", - "name" : "Athanasius", "data" : [ [ "Perl 5", 12 ] - ] + ], + "name" : "Athanasius" }, { "data" : [ [ - "Blog", - 4 - ], - [ "Perl 5", 8 + ], + [ + "Blog", + 4 ] ], "name" : "Kian-Meng Ang", "id" : "Kian-Meng Ang" }, { + "id" : "Doug Schrag", "name" : "Doug Schrag", "data" : [ [ "Perl 6", 10 ] - ], - "id" : "Doug Schrag" + ] }, { + "id" : "Francis Whittle", + "name" : "Francis Whittle", "data" : [ [ - "Blog", - 3 - ], - [ "Perl 6", 6 + ], + [ + "Blog", + 3 ] - ], - "name" : "Francis Whittle", - "id" : "Francis Whittle" + ] }, { "name" : "Duncan C. White", @@ -276,18 +552,18 @@ "id" : "Duncan C. White" }, { - "id" : "Robert Gratza", + "name" : "Robert Gratza", "data" : [ [ - "Perl 6", - 6 - ], - [ "Perl 5", 2 + ], + [ + "Perl 6", + 6 ] ], - "name" : "Robert Gratza" + "id" : "Robert Gratza" }, { "name" : "John Barrett", @@ -300,14 +576,28 @@ "id" : "John Barrett" }, { + "id" : "Daniel Mantovani", "name" : "Daniel Mantovani", "data" : [ [ "Perl 5", 6 ] + ] + }, + { + "name" : "E. Choroba", + "data" : [ + [ + "Perl 5", + 4 + ], + [ + "Blog", + 2 + |
