diff options
| author | drbaggy <js5@sanger.ac.uk> | 2022-06-08 08:52:14 +0100 |
|---|---|---|
| committer | drbaggy <js5@sanger.ac.uk> | 2022-06-08 08:52:14 +0100 |
| commit | b9b5afa16f9e06cec6f3dae7db65c9d08482d500 (patch) | |
| tree | 86cc2f5a49858ef07a13690e3509fb3e69440fe0 | |
| parent | a396a798a421f65fa639aad2222b92fc156af20c (diff) | |
| parent | 0c7f061325cd07213c4bba4f1c34790d98bbab02 (diff) | |
| download | perlweeklychallenge-club-b9b5afa16f9e06cec6f3dae7db65c9d08482d500.tar.gz perlweeklychallenge-club-b9b5afa16f9e06cec6f3dae7db65c9d08482d500.tar.bz2 perlweeklychallenge-club-b9b5afa16f9e06cec6f3dae7db65c9d08482d500.zip | |
Merge remote-tracking branch 'upstream/master'
| -rwxr-xr-x | challenge-168/e-choroba/perl/ch-1.pl | 24 | ||||
| -rwxr-xr-x | challenge-168/e-choroba/perl/ch-2.pl | 17 | ||||
| -rw-r--r-- | stats/pwc-current.json | 213 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown-summary.json | 58 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown.json | 1108 | ||||
| -rw-r--r-- | stats/pwc-leaders.json | 344 | ||||
| -rw-r--r-- | stats/pwc-summary-1-30.json | 100 | ||||
| -rw-r--r-- | stats/pwc-summary-121-150.json | 44 | ||||
| -rw-r--r-- | stats/pwc-summary-151-180.json | 50 | ||||
| -rw-r--r-- | stats/pwc-summary-181-210.json | 42 | ||||
| -rw-r--r-- | stats/pwc-summary-211-240.json | 52 | ||||
| -rw-r--r-- | stats/pwc-summary-241-270.json | 42 | ||||
| -rw-r--r-- | stats/pwc-summary-31-60.json | 42 | ||||
| -rw-r--r-- | stats/pwc-summary-61-90.json | 100 | ||||
| -rw-r--r-- | stats/pwc-summary-91-120.json | 50 | ||||
| -rw-r--r-- | stats/pwc-summary.json | 40 |
16 files changed, 1191 insertions, 1135 deletions
diff --git a/challenge-168/e-choroba/perl/ch-1.pl b/challenge-168/e-choroba/perl/ch-1.pl new file mode 100755 index 0000000000..4f1355475d --- /dev/null +++ b/challenge-168/e-choroba/perl/ch-1.pl @@ -0,0 +1,24 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Syntax::Construct qw{ // }; + +use Math::Prime::Util qw{ is_prime }; + +sub perrin_prime { + my ($length) = @_; + my @perrin_sliding = (3, 0, 2); + my @perrin_primes; + while (@perrin_primes < $length) { + push @perrin_sliding, shift(@perrin_sliding) + $perrin_sliding[0]; + push @perrin_primes, $perrin_sliding[1] + if $perrin_sliding[1] > ($perrin_primes[-1] // 0) + && is_prime($perrin_sliding[1]); + } + return @perrin_primes +} + +use Test::More tests => 1; + +is_deeply [perrin_prime(13)], [2, 3, 5, 7, 17, 29, 277, 367, 853, 14197, + 43721, 1442968193, 792606555396977]; diff --git a/challenge-168/e-choroba/perl/ch-2.pl b/challenge-168/e-choroba/perl/ch-2.pl new file mode 100755 index 0000000000..f53c124f35 --- /dev/null +++ b/challenge-168/e-choroba/perl/ch-2.pl @@ -0,0 +1,17 @@ +#!/usr/bin/perl +use warnings; +use strict; + +use Math::Prime::Util qw{ factor is_prime }; + +sub home_prime { + my ($i) = @_; + my $concat = join "", sort { $a <=> $b } factor($i); + + return $concat if is_prime($concat); + + return home_prime($concat) +} + +use Test::More tests => 1; +is home_prime(10), 773; diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 36a2059226..59d88c2320 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,78 +1,33 @@ { - "yAxis" : { - "title" : { - "text" : "Total Solutions" + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + } } }, - "series" : [ - { - "data" : [ - { - "y" : 3, - "drilldown" : "James Smith", - "name" : "James Smith" - }, - { - "drilldown" : "Luca Ferrari", - "name" : "Luca Ferrari", - "y" : 8 - }, - { - "drilldown" : "Mark Anderson", - "name" : "Mark Anderson", - "y" : 2 - }, - { - "y" : 2, - "name" : "Marton Polgar", - "drilldown" : "Marton Polgar" - }, - { - "y" : 3, - "name" : "Peter Campbell Smith", - "drilldown" : "Peter Campbell Smith" - }, - { - "y" : 4, - "drilldown" : "Robert DiCicco", - "name" : "Robert DiCicco" - }, - { - "name" : "Roger Bell_West", - "drilldown" : "Roger Bell_West", - "y" : 4 - }, - { - "drilldown" : "Ryan Thompson", - "name" : "Ryan Thompson", - "y" : 6 - }, - { - "drilldown" : "Stephen G Lynn", - "name" : "Stephen G Lynn", - "y" : 2 - }, - { - "drilldown" : "W. Luis Mochan", - "name" : "W. Luis Mochan", - "y" : 3 - } - ], - "colorByPoint" : 1, - "name" : "The Weekly Challenge - 168" - } - ], - "tooltip" : { - "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/>", - "followPointer" : 1 + "legend" : { + "enabled" : 0 }, - "subtitle" : { - "text" : "[Champions: 10] Last updated at 2022-06-07 17:05:44 GMT" + "chart" : { + "type" : "column" }, "drilldown" : { "series" : [ { + "name" : "E. Choroba", + "id" : "E. Choroba", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "name" : "James Smith", "data" : [ [ "Perl", @@ -83,12 +38,10 @@ 1 ] ], - "id" : "James Smith", - "name" : "James Smith" + "id" : "James Smith" }, { "name" : "Luca Ferrari", - "id" : "Luca Ferrari", "data" : [ [ "Raku", @@ -98,7 +51,8 @@ "Blog", 6 ] - ] + ], + "id" : "Luca Ferrari" }, { "name" : "Mark Anderson", @@ -111,16 +65,17 @@ ] }, { + "name" : "Marton Polgar", + "id" : "Marton Polgar", "data" : [ [ "Raku", 2 ] - ], - "name" : "Marton Polgar", - "id" : "Marton Polgar" + ] }, { + "id" : "Peter Campbell Smith", "data" : [ [ "Perl", @@ -131,7 +86,6 @@ 1 ] ], - "id" : "Peter Campbell Smith", "name" : "Peter Campbell Smith" }, { @@ -149,6 +103,8 @@ "name" : "Robert DiCicco" }, { + "name" : "Roger Bell_West", + "id" : "Roger Bell_West", "data" : [ [ "Perl", @@ -158,12 +114,9 @@ "Raku", 2 ] - ], - "name" : "Roger Bell_West", - "id" : "Roger Bell_West" + ] }, { - "name" : "Ryan Thompson", "id" : "Ryan Thompson", "data" : [ [ @@ -178,7 +131,8 @@ "Blog", 2 ] - ] + ], + "name" : "Ryan Thompson" }, { "data" : [ @@ -195,8 +149,6 @@ "name" : "Stephen G Lynn" }, { - "id" : "W. Luis Mochan", - "name" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -206,29 +158,92 @@ "Blog", 1 ] - ] + ], + "id" : "W. Luis Mochan", + "name" : "W. Luis Mochan" } ] }, - "title" : { - "text" : "The Weekly Challenge - 168" - }, - "legend" : { - "enabled" : 0 - }, - "chart" : { - "type" : "column" - }, - "plotOptions" : { - "series" : { - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - }, - "borderWidth" : 0 + "series" : [ + { + "colorByPoint" : 1, + "data" : [ + { + "name" : "E. Choroba", + "drilldown" : "E. Choroba", + "y" : 2 + }, + { + "y" : 3, + "name" : "James Smith", + "drilldown" : "James Smith" + }, + { + "y" : 8, + "drilldown" : "Luca Ferrari", + "name" : "Luca Ferrari" + }, + { + "y" : 2, + "name" : "Mark Anderson", + "drilldown" : "Mark Anderson" + }, + { + "y" : 2, + "name" : "Marton Polgar", + "drilldown" : "Marton Polgar" + }, + { + "drilldown" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith", + "y" : 3 + }, + { + "y" : 4, + "name" : "Robert DiCicco", + "drilldown" : "Robert DiCicco" + }, + { + "name" : "Roger Bell_West", + "drilldown" : "Roger Bell_West", + "y" : 4 + }, + { + "y" : 6, + "drilldown" : "Ryan Thompson", + "name" : "Ryan Thompson" + }, + { + "y" : 2, + "drilldown" : "Stephen G Lynn", + "name" : "Stephen G Lynn" + }, + { + "y" : 3, + "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan" + } + ], + "name" : "The Weekly Challenge - 168" + } + ], + "yAxis" : { + "title" : { + "text" : "Total Solutions" } }, "xAxis" : { "type" : "category" + }, + "tooltip" : { + "pointFormat" : "<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/>" + }, + "title" : { + "text" : "The Weekly Challenge - 168" + }, + "subtitle" : { + "text" : "[Champions: 11] Last updated at 2022-06-07 22:14:13 GMT" } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 41b3d55d08..dbd16d154c 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,25 +1,24 @@ { - "title" : { - "text" : "The Weekly Challenge Contributions [2019 - 2022]" - }, - "legend" : { - "enabled" : "false" + "yAxis" : { + "title" : { + "text" : null + }, + "min" : 0 }, "series" : [ { "dataLabels" : { "format" : "{point.y:.0f}", - "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" - }, - "y" : 10, "rotation" : -90, + "y" : 10, "enabled" : "true", + "color" : "#FFFFFF", "align" : "right", - "color" : "#FFFFFF" + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + } }, - "name" : "Contributions", "data" : [ [ "Blog", @@ -27,30 +26,16 @@ ], [ "Perl", - 8167 + 8169 ], [ "Raku", 4840 ] - ] + ], + "name" : "Contributions" } ], - "yAxis" : { - "title" : { - "text" : null - }, - "min" : 0 - }, - "chart" : { - "type" : "column" - }, - "subtitle" : { - "text" : "Last updated at 2022-06-07 17:05:44 GMT" - }, - "tooltip" : { - "pointFormat" : "<b>{point.y:.0f}</b>" - }, "xAxis" : { "type" : "category", "labels" : { @@ -59,5 +44,20 @@ "fontSize" : "13px" } } + }, + "chart" : { + "type" : "column" + }, + "title" : { + "text" : "The Weekly Challenge Contributions [2019 - 2022]" + }, + "legend" : { + "enabled" : "false" + }, + "tooltip" : { + "pointFormat" : "<b>{point.y:.0f}</b>" + }, + "subtitle" : { + "text" : "Last updated at 2022-06-07 22:14:13 GMT" } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index 031b85ee81..3e059cd741 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,17 +1,33 @@ { - "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2022-06-07 17:05:44 GMT" - }, "tooltip" : { "pointFormat" : "<span style=\"color:{point.color}\">Challenge {point.name}</span>: <b>{point.y:f}</b><br/>", - "headerFormat" : "<span style=\"font-size:11px\"></span>", - "followPointer" : "true" + "followPointer" : "true", + "headerFormat" : "<span style=\"font-size:11px\"></span>" + }, + "title" : { + "text" : "The Weekly Challenge Language" + }, + "subtitle" : { + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2022-06-07 22:14:13 GMT" + }, + "plotOptions" : { + "series" : { + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + }, + "borderWidth" : 0 + } + }, + "legend" : { + "enabled" : "false" + }, + "chart" : { + "type" : "column" }, "drilldown" : { "series" : [ { - "id" : "001", - "name" : "001", "data" : [ [ "Perl", @@ -25,9 +41,12 @@ "Blog", 11 ] - ] + ], + "id" : "001", + "name" : "001" }, { + "id" : "002", "data" : [ [ "Perl", @@ -42,10 +61,10 @@ 10 ] ], - "id" : "002", "name" : "002" }, { + "id" : "003", "data" : [ [ "Perl", @@ -60,11 +79,9 @@ 9 ] ], - "id" : "003", "name" : "003" }, { - "name" : "004", "id" : "004", "data" : [ [ @@ -79,11 +96,11 @@ "Blog", 10 ] - ] + ], + "name" : "004" }, { "id" : "005", - "name" : "005", "data" : [ [ "Perl", @@ -97,9 +114,11 @@ "Blog", 12 ] - ] + ], + "name" : "005" }, { + "name" : "006", "data" : [ [ "Perl", @@ -114,10 +133,11 @@ 7 ] ], - "name" : "006", "id" : "006" }, { + "name" : "007", + "id" : "007", "data" : [ [ "Perl", @@ -131,13 +151,9 @@ "Blog", 10 ] - ], - "name" : "007", - "id" : "007" + ] }, { - "name" : "008", - "id" : "008", "data" : [ [ "Perl", @@ -151,11 +167,12 @@ "Blog", 12 ] - ] + ], + "id" : "008", + "name" : "008" }, { "name" : "009", - "id" : "009", "data" : [ [ "Perl", @@ -169,11 +186,11 @@ "Blog", 13 ] - ] + ], + "id" : "009" }, { "name" : "010", - "id" : "010", "data" : [ [ "Perl", @@ -187,11 +204,12 @@ "Blog", 11 ] - ] + ], + "id" : "010" }, { - "id" : "011", "name" : "011", + "id" : "011", "data" : [ [ "Perl", @@ -208,8 +226,6 @@ ] }, { - "name" : "012", - "id" : "012", "data" : [ [ "Perl", @@ -223,11 +239,13 @@ "Blog", 11 ] - ] + ], + "id" : "012", + "name" : "012" }, { - "id" : "013", "name" : "013", + "id" : "013", "data" : [ [ "Perl", @@ -244,7 +262,6 @@ ] }, { - "name" : "014", "id" : "014", "data" : [ [ @@ -259,11 +276,11 @@ "Blog", 15 ] - ] + ], + "name" : "014" }, { "id" : "015", - "name" : "015", "data" : [ [ "Perl", @@ -277,9 +294,11 @@ "Blog", 15 ] - ] + ], + "name" : "015" }, { + "id" : "016", "data" : [ [ "Perl", @@ -294,10 +313,10 @@ 12 ] ], - "name" : "016", - "id" : "016" + "name" : "016" }, { + "id" : "017", "data" : [ [ "Perl", @@ -312,11 +331,9 @@ 12 ] ], - "id" : "017", "name" : "017" }, { - "name" : "018", "id" : "018", "data" : [ [ @@ -331,11 +348,10 @@ "Blog", 14 ] - ] + ], + "name" : "018" }, { - "id" : "019", - "name" : "019", "data" : [ [ "Perl", @@ -349,9 +365,13 @@ "Blog", 13 ] - ] + ], + "id" : "019", + "name" : "019" }, { + "name" : "020", + "id" : "020", "data" : [ [ "Perl", @@ -365,12 +385,9 @@ "Blog", 13 ] - ], - "id" : "020", - "name" : "020" + ] }, { - "id" : "021", "name" : "021", "data" : [ [ @@ -385,7 +402,8 @@ "Blog", 10 ] - ] + ], + "id" : "021" }, { "data" : [ @@ -406,6 +424,7 @@ "name" : "022" }, { + "name" : "023", "data" : [ [ "Perl", @@ -420,8 +439,7 @@ 12 ] ], - "id" : "023", - "name" : "023" + "id" : "023" }, { "data" : [ @@ -442,8 +460,8 @@ "name" : "024" }, { - "id" : "025", "name" : "025", + "id" : "025", "data" : [ [ "Perl", @@ -461,7 +479,6 @@ }, { "id" : "026", - "name" : "026", "data" : [ [ "Perl", @@ -475,11 +492,11 @@ "Blog", 10 ] - ] + ], + "name" : "026" }, { "name" : "027", - "id" : "027", "data" : [ [ "Perl", @@ -493,11 +510,10 @@ "Blog", 9 ] - ] + ], + "id" : "027" }, { - "id" : "028", - "name" : "028", "data" : [ [ "Perl", @@ -511,9 +527,12 @@ "Blog", 9 ] - ] + ], + "id" : "028", + "name" : "028" }, { + "id" : "029", "data" : [ [ "Perl", @@ -528,8 +547,7 @@ 12 ] ], - "name" : "029", - "id" : "029" + "name" : "029" }, { "name" : "030", @@ -550,6 +568,8 @@ ] }, { + "name" : "031", + "id" : "031", "data" : [ [ "Perl", @@ -563,12 +583,9 @@ "Blog", 9 ] - ], - "id" : "031", - "name" : "031" + ] }, { - "id" : "032", "name" : "032", "data" : [ [ @@ -583,9 +600,11 @@ "Blog", 10 ] - ] + ], + "id" : "032" }, { + "id" : "033", "data" : [ [ "Perl", @@ -600,10 +619,10 @@ 10 ] ], - "name" : "033", - "id" : "033" + "name" : "033" }, { + "id" : "034", "data" : [ [ "Perl", @@ -618,10 +637,10 @@ 11 ] ], - "id" : "034", "name" : "034" }, { + "id" : "035", "data" : [ [ "Perl", @@ -636,11 +655,9 @@ 9 ] ], - "id" : "035", "name" : "035" }, { - "id" : "036", "name" : "036", "data" : [ [ @@ -655,7 +672,8 @@ "Blog", 11 ] - ] + ], + "id" : "036" }, { "name" : "037", @@ -690,12 +708,12 @@ 12 ] ], - "name" : "038", - "id" : "038" + "id" : "038", + "name" : "038" }, { - "id" : "039", "name" : "039", + "id" : "039", "data" : [ [ "Perl", @@ -712,6 +730,7 @@ ] }, { + "name" : "040", "data" : [ [ "Perl", @@ -726,12 +745,11 @@ 10 ] ], - "id" : "040", - "name" : "040" + "id" : "040" }, { - "id" : "041", "name" : "041", + "id" : "041", "data" : [ [ "Perl", @@ -748,6 +766,8 @@ ] }, { + "name" : "042", + "id" : "042", "data" : [ [ "Perl", @@ -761,11 +781,11 @@ "Blog", 11 ] - ], - "name" : "042", - "id" : "042" + ] }, { + "name" : "043", + "id" : "043", "data" : [ [ "Perl", @@ -779,12 +799,9 @@ "Blog", 11 ] - ], - "id" : "043", - "name" : "043" + ] }, { - "name" : "044", "id" : "044", "data" : [ [ @@ -799,9 +816,12 @@ "Blog", 11 ] - ] + ], + "name" : "044" }, { + "name" : "045", + "id" : "045", "data" : [ [ "Perl", @@ -815,13 +835,9 @@ "Blog", 11 ] - ], - "name" : "045", - "id" : "045" + ] }, { - "id" : "046", - "name" : "046", "data" : [ [ "Perl", @@ -835,10 +851,11 @@ "Blog", 10 ] - ] + ], + "id" : "046", + "name" : "046" }, { - "name" : "047", "id" : "047", "data" : [ [ @@ -853,7 +870,8 @@ "Blog", 10 ] - ] + ], + "name" : "047" }, { "data" : [ @@ -870,8 +888,8 @@ 12 ] ], - "name" : "048", - "id" : "048" + "id" : "048", + "name" : "048" }, { "data" : [ @@ -888,8 +906,8 @@ 12 ] ], - "name" : "049", - "id" : "049" + "id" : "049", + "name" : "049" }, { "data" : [ @@ -906,10 +924,12 @@ 12 ] ], - "name" : "050", - "id" : "050" + "id" : "050", + "name" : "050" }, { + "name" : "051", + "id" : "051", "data" : [ [ "Perl", @@ -923,9 +943,7 @@ |
