diff options
| -rwxr-xr-x | challenge-135/pete-houston/perl/ch-1.pl | 26 | ||||
| -rwxr-xr-x | challenge-135/pete-houston/perl/ch-2.pl | 43 | ||||
| -rw-r--r-- | stats/pwc-current.json | 529 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown-summary.json | 48 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown.json | 864 | ||||
| -rw-r--r-- | stats/pwc-leaders.json | 746 | ||||
| -rw-r--r-- | stats/pwc-summary-1-30.json | 108 | ||||
| -rw-r--r-- | stats/pwc-summary-121-150.json | 46 | ||||
| -rw-r--r-- | stats/pwc-summary-151-180.json | 36 | ||||
| -rw-r--r-- | stats/pwc-summary-181-210.json | 34 | ||||
| -rw-r--r-- | stats/pwc-summary-211-240.json | 126 | ||||
| -rw-r--r-- | stats/pwc-summary-241-270.json | 42 | ||||
| -rw-r--r-- | stats/pwc-summary-31-60.json | 30 | ||||
| -rw-r--r-- | stats/pwc-summary-61-90.json | 48 | ||||
| -rw-r--r-- | stats/pwc-summary-91-120.json | 52 | ||||
| -rw-r--r-- | stats/pwc-summary.json | 34 |
16 files changed, 1448 insertions, 1364 deletions
diff --git a/challenge-135/pete-houston/perl/ch-1.pl b/challenge-135/pete-houston/perl/ch-1.pl new file mode 100755 index 0000000000..43e088ea77 --- /dev/null +++ b/challenge-135/pete-houston/perl/ch-1.pl @@ -0,0 +1,26 @@ +#!/usr/bin/env perl +#=============================================================================== +# +# FILE: 13501.pl +# +# USAGE: ./13501.pl N [ N ... ] +# +# DESCRIPTION: Print the middle 3 digits of each given integer +# +# AUTHOR: Pete Houston (pete), cpan@openstrike.co.uk +# ORGANIZATION: Openstrike +# VERSION: 1.0 +# CREATED: 18/10/21 +#=============================================================================== + +use strict; +use warnings; + +for (@ARGV) { + s/^-//; + if (/([^0-9])/) { print "Not an integer because of '$1'\n"; next; } + my $len = length; + if ($len < 3) { print "Too few digits to extract 3\n"; next; } + unless ($len % 2) { print "Even number of digits\n"; next; } + print substr ($_, ($len - 3) / 2, 3) . "\n"; +} diff --git a/challenge-135/pete-houston/perl/ch-2.pl b/challenge-135/pete-houston/perl/ch-2.pl new file mode 100755 index 0000000000..7215c44a19 --- /dev/null +++ b/challenge-135/pete-houston/perl/ch-2.pl @@ -0,0 +1,43 @@ +#!/usr/bin/env perl +#=============================================================================== +# +# FILE: 13502.pl +# +# USAGE: ./13502.pl [-s] SEDOL [ SEDOL ... ] +# +# DESCRIPTION: Print 1 for each argument that is a valid SEDOL, 0 +# otherwise. https://en.wikipedia.org/wiki/SEDOL +# +# OPTIONS: -s checks that the first character is a letter as per +# the wikipedia article. +# REQUIREMENTS: Getopt::Long::Modern +# NOTES: This is an already-solved problem: see Business::SEDOL. +# AUTHOR: Pete Houston (pete), cpan@openstrike.co.uk +# ORGANIZATION: Openstrike +# VERSION: 1.0 +# CREATED: 18/10/21 +#=============================================================================== + +use strict; +use warnings; +use Getopt::Long::Modern; + +GetOptions (s => \my $strict); +print '' . valid_sedol (uc $_, $strict) . "\n" for @ARGV; + +sub valid_sedol { + my ($code, $s) = @_; + return 0 unless 7 == length ($code) && $code =~ /^[0-9B-DF-HJ-NP-TV-Z]+$/; + my @chars = split //, $code; + return 0 if $s && $chars[0] =~ /[0-9]/; + $_ = ord ($_) - 55 for grep { /[B-Z]/ } @chars; + my $sum = + $chars[0] + + $chars[1] * 3 + + $chars[2] + + $chars[3] * 7 + + $chars[4] * 3 + + $chars[5] * 9 + + $chars[6]; + return $sum % 10 ? 0 : 1; +} diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 85c88e7a77..6e29b0fdc3 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,210 +1,10 @@ { - "title" : { - "text" : "The Weekly Challenge - 135" - }, - "subtitle" : { - "text" : "[Champions: 32] Last updated at 2021-10-24 21:58:31 GMT" - }, - "series" : [ - { - "data" : [ - { - "name" : "Abigail", - "y" : 4, - "drilldown" : "Abigail" - }, - { - "drilldown" : "Adam Russell", - "y" : 4, - "name" : "Adam Russell" - }, - { - "name" : "Andinus", - "drilldown" : "Andinus", - "y" : 1 - }, - { - "name" : "Andrezgz", - "drilldown" : "Andrezgz", - "y" : 2 - }, - { - "y" : 5, - "drilldown" : "Arne Sommer", - "name" : "Arne Sommer" - }, - { - "name" : "Athanasius", - "drilldown" : "Athanasius", - "y" : 4 - }, - { - "drilldown" : "Ben Davies", - "y" : 2, - "name" : "Ben Davies" - }, - { - "y" : 2, - "drilldown" : "Cheok-Yin Fung", - "name" : "Cheok-Yin Fung" - }, - { - "name" : "Colin Crain", - "drilldown" : "Colin Crain", - "y" : 1 - }, - { - "drilldown" : "Cristina Heredia", - "y" : 1, - "name" : "Cristina Heredia" - }, - { - "y" : 3, - "drilldown" : "Dave Jacoby", - "name" : "Dave Jacoby" - }, - { - "drilldown" : "Duncan C. White", - "y" : 2, - "name" : "Duncan C. White" - }, - { - "name" : "E. Choroba", - "drilldown" : "E. Choroba", - "y" : 2 - }, - { - "drilldown" : "Flavio Poletti", - "y" : 6, - "name" : "Flavio Poletti" - }, - { - "drilldown" : "James Smith", - "y" : 3, - "name" : "James Smith" - }, - { - "y" : 2, - "drilldown" : "Jan Krnavek", - "name" : "Jan Krnavek" - }, - { - "drilldown" : "Jorg Sommrey", - "y" : 2, - "name" : "Jorg Sommrey" - }, - { - "drilldown" : "Lance Wicks", - "y" : 1, - "name" : "Lance Wicks" - }, - { - "drilldown" : "Laurent Rosenfeld", - "y" : 5, - "name" : "Laurent Rosenfeld" - }, - { - "drilldown" : "Lubos Kolouch", - "y" : 2, - "name" : "Lubos Kolouch" - }, - { - "name" : "Luca Ferrari", - "drilldown" : "Luca Ferrari", - "y" : 4 - }, - { - "drilldown" : "Matthew Neleigh", - "y" : 2, - "name" : "Matthew Neleigh" - }, - { - "name" : "Mohammad S Anwar", - "drilldown" : "Mohammad S Anwar", - "y" : 2 - }, - { - "y" : 2, - "drilldown" : "Niels van Dijke", - "name" : "Niels van Dijke" - }, - { - "name" : "Paulo Custodio", - "y" : 2, - "drilldown" : "Paulo Custodio" - }, - { - "drilldown" : "Peter Campbell Smith", - "y" : 2, - "name" : "Peter Campbell Smith" - }, - { - "drilldown" : "Roger Bell_West", - "y" : 5, - "name" : "Roger Bell_West" - }, - { - "drilldown" : "Simon Green", - "y" : 3, - "name" : "Simon Green" - }, - { - "y" : 2, - "drilldown" : "Steven Wilson", - "name" : "Steven Wilson" - }, - { - "y" : 4, - "drilldown" : "Ulrich Rieke", - "name" : "Ulrich Rieke" - }, - { - "drilldown" : "W. Luis Mochan", - "y" : 3, - "name" : "W. Luis Mochan" - }, - { - "drilldown" : "Wanderdoc", - "y" : 2, - "name" : "Wanderdoc" - } - ], - "name" : "The Weekly Challenge - 135", - "colorByPoint" : 1 - } - ], - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "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/>" - }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - } - } - }, - "chart" : { - "type" : "column" - }, - "xAxis" : { - "type" : "category" - }, "legend" : { "enabled" : 0 }, "drilldown" : { "series" : [ { - "name" : "Abigail", "id" : "Abigail", "data" : [ [ @@ -215,7 +15,8 @@ "Blog", 2 ] - ] + ], + "name" : "Abigail" }, { "id" : "Adam Russell", @@ -232,23 +33,23 @@ "name" : "Adam Russell" }, { - "id" : "Andinus", + "name" : "Andinus", "data" : [ [ "Raku", 1 ] ], - "name" : "Andinus" + "id" : "Andinus" }, { - "id" : "Andrezgz", "data" : [ [ "Perl", 2 ] ], + "id" : "Andrezgz", "name" : "Andrezgz" }, { @@ -270,6 +71,8 @@ "id" : "Arne Sommer" }, { + "name" : "Athanasius", + "id" : "Athanasius", "data" : [ [ "Perl", @@ -279,52 +82,50 @@ "Raku", 2 ] - ], - "id" : "Athanasius", - "name" : "Athanasius" + ] }, { + "name" : "Ben Davies", + "id" : "Ben Davies", "data" : [ [ "Raku", 2 ] - ], - "id" : "Ben Davies", - "name" : "Ben Davies" + ] }, { - "name" : "Cheok-Yin Fung", + "id" : "Cheok-Yin Fung", "data" : [ [ "Perl", 2 ] ], - "id" : "Cheok-Yin Fung" + "name" : "Cheok-Yin Fung" }, { "name" : "Colin Crain", + "id" : "Colin Crain", "data" : [ [ "Blog", 1 ] - ], - "id" : "Colin Crain" + ] }, { + "name" : "Cristina Heredia", "data" : [ [ "Perl", 1 ] ], - "id" : "Cristina Heredia", - "name" : "Cristina Heredia" + "id" : "Cristina Heredia" }, { - "id" : "Dave Jacoby", + "name" : "Dave Jacoby", "data" : [ [ "Perl", @@ -335,7 +136,7 @@ 1 ] ], - "name" : "Dave Jacoby" + "id" : "Dave Jacoby" }, { "data" : [ @@ -348,17 +149,16 @@ "name" : "Duncan C. White" }, { - "id" : "E. Choroba", + "name" : "E. Choroba", "data" : [ [ "Perl", 2 ] ], - "name" : "E. Choroba" + "id" : "E. Choroba" }, { - "name" : "Flavio Poletti", "data" : [ [ "Perl", @@ -373,9 +173,11 @@ 2 ] ], - "id" : "Flavio Poletti" + "id" : "Flavio Poletti", + "name" : "Flavio Poletti" }, { + "id" : "James Smith", "data" : [ [ "Perl", @@ -386,40 +188,40 @@ 1 ] ], - "id" : "James Smith", "name" : "James Smith" }, { + "name" : "Jan Krnavek", "id" : "Jan Krnavek", "data" : [ [ "Raku", 2 ] - ], - "name" : "Jan Krnavek" + ] }, { "name" : "Jorg Sommrey", - "id" : "Jorg Sommrey", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Jorg Sommrey" }, { - "id" : "Lance Wicks", + "name" : "Lance Wicks", "data" : [ [ "Perl", 1 ] ], - "name" : "Lance Wicks" + "id" : "Lance Wicks" }, { + "name" : "Laurent Rosenfeld", "id" : "Laurent Rosenfeld", "data" : [ [ @@ -434,22 +236,19 @@ "Blog", 1 ] - ], - "name" : "Laurent Rosenfeld" + ] }, { - "name" : "Lubos Kolouch", - "id" : "Lubos Kolouch", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Lubos Kolouch", + "name" : "Lubos Kolouch" }, { - "name" : "Luca Ferrari", - "id" : "Luca Ferrari", "data" : [ [ "Raku", @@ -459,20 +258,21 @@ "Blog", 2 ] - ] + ], + "id" : "Luca Ferrari", + "name" : "Luca Ferrari" }, { + "id" : "Matthew Neleigh", "data" : [ [ "Perl", 2 ] ], - "id" : "Matthew Neleigh", "name" : "Matthew Neleigh" }, { - "name" : "Mohammad S Anwar", "id" : "Mohammad S Anwar", "data" : [ [ @@ -483,41 +283,50 @@ "Raku", 1 ] - ] + ], + "name" : "Mohammad S Anwar" }, { "name" : "Niels van Dijke", + "id" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] - ], - "id" : "Niels van Dijke" + ] }, { - "id" : "Paulo Custodio", "data" : [ [ "Perl", 2 ] ], + "id" : "Paulo Custodio", "name" : "Paulo Custodio" }, { + "name" : "Pete Houston", + "id" : "Pete Houston", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "name" : "Peter Campbell Smith", "id" : "Peter Campbell Smith", "data" : [ [ "Perl", 2 ] - ], - "name" : "Peter Campbell Smith" + ] }, { - "name" : "Roger Bell_West", - "id" : "Roger Bell_West", "data" : [ [ "Perl", @@ -531,10 +340,11 @@ "Blog", 1 ] - ] + ], + "id" : "Roger Bell_West", + "name" : "Roger Bell_West" }, { - "name" : "Simon Green", "data" : [ [ "Perl", @@ -545,7 +355,8 @@ 1 ] ], - "id" : "Simon Green" + "id" : "Simon Green", + "name" : "Simon Green" }, { "data" : [ @@ -558,6 +369,8 @@ "name" : "Steven Wilson" }, { + "name" : "Ulrich Rieke", + "id" : "Ulrich Rieke", "data" : [ [ "Perl", @@ -567,12 +380,10 @@ "Raku", 2 ] - ], - "id" : "Ulrich Rieke", - "name" : "Ulrich Rieke" + ] }, { - "id" : "W. Luis Mochan", + "name" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -583,18 +394,222 @@ 1 ] ], - "name" : "W. Luis Mochan" + "id" : "W. Luis Mochan" }, { - "name" : "Wanderdoc", + "id" : "Wanderdoc", "data" : [ [ "Perl", 2 ] ], - "id" : "Wanderdoc" + "name" : "Wanderdoc" } ] + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "series" : [ + { + "colorByPoint" : 1, + "data" : [ + { + "name" : "Abigail", + "y" : 4, + "drilldown" : "Abigail" + }, + { + "drilldown" : "Adam Russell", + "y" : 4, + "name" : "Adam Russell" + }, + { + "name" : "Andinus", + "y" : 1, + "drilldown" : "Andinus" + }, + { + "name" : "Andrezgz", + "y" : 2, + "drilldown" : "Andrezgz" + }, + { + "y" : 5, + "drilldown" : "Arne Sommer", + "name" : "Arne Sommer" + }, + { + "y" : 4, + "drilldown" : "Athanasius", + "name" : "Athanasius" + }, + { + "y" : 2, + "drilldown" : "Ben Davies", + "name" : "Ben Davies" + }, + { + "name" : "Cheok-Yin Fung", + "y" : 2, + "drilldown" : "Cheok-Yin Fung" + }, + { + "y" : 1, + "drilldown" : "Colin Crain", + "name" : "Colin Crain" + }, + { + "y" : 1, + "drilldown" : "Cristina Heredia", + "name" : "Cristina Heredia" + }, + { + "name" : "Dave Jacoby", + "drilldown" : "Dave Jacoby", + "y" : 3 + }, + { + "name" : "Duncan C. White", + "y" : 2, + "drilldown" : "Duncan C. White" + }, + { + "name" : "E. Choroba", + "y" : 2, + "drilldown" : "E. Choroba" + }, + { + "name" : "Flavio Poletti", + "drilldown" : "Flavio Poletti", + "y" : 6 + }, + { + "drilldown" : "James Smith", + "y" : 3, + "name" : "James Smith" + }, + { + "name" : "Jan Krnavek", + "y" : 2, + "drilldown" : "Jan Krnavek" + }, + { + "drilldown" : "Jorg Sommrey", + "y" : 2, + "name" : "Jorg Sommrey" + }, + { + "drilldown" : "Lance Wicks", + "y" : 1, + "name" : "Lance Wicks" + }, + { + "y" : 5, + "drilldown" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld" + }, + { + "name" : "Lubos Kolouch", + "drilldown" : "Lubos Kolouch", + "y" : 2 + }, + { + "drilldown" : "Luca Ferrari", + "y" : 4, + "name" : "Luca Ferrari" + }, + { + "name" : "Matthew Neleigh", + "drilldown" : "Matthew Neleigh", + "y" : 2 + }, + { + "name" : "Mohammad S Anwar", + "y" : 2, + "drilldown" : "Mohammad S Anwar" + }, + { + "name" : "Niels van Dijke", + "drilldown" : "Niels van Dijke", + "y" : 2 + }, + { + "drilldown" : "Paulo Custodio", + "y" : 2, + "name" : "Paulo Custodio" + }, + { + "y" : 2, + "drilldown" : "Pete Houston", + "name" : "Pete Houston" + }, + { + "y" : 2, + "drilldown" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith" + }, + { + "name" : "Roger Bell_West", + "drilldown" : "Roger Bell_West", + "y" : 5 + }, + { + "name" : "Simon Green", + "y" : 3, + "drilldown" : "Simon Green" + }, + { + "name" : "Steven Wilson", + "y" : 2, + "drilldown" : "Steven Wilson" + }, + { + "name" : "Ulrich Rieke", + "y" : 4, + "drilldown" : "Ulrich Rieke" + }, + { + "name" : "W. Luis Mochan", + "drilldown" : "W. Luis Mochan", + "y" : 3 + }, + { + "drilldown" : "Wanderdoc", + "y" : 2, + "name" : "Wanderdoc" + } + ], + "name" : "The Weekly Challenge - 135" + } + ], + "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/>" + }, + "subtitle" : { + "text" : "[Champions: 33] Last updated at 2021-10-24 22:13:38 GMT" + }, + "plotOptions" : { + "series" : { + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + }, + "borderWidth" : 0 + } + }, + "chart" : { + "type" : "column" + }, + "xAxis" : { + "type" : "category" + }, + "title" : { + "text" : "The Weekly Challenge - 135" } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index bdc51550a7..bd7519faf0 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -11,6 +11,18 @@ "series" : [ { "name" : "Contributions", + "dataLabels" : { + "format" : "{point.y:.0f}", + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + }, + "color" : "#FFFFFF", + "enabled" : "true", + "y" : 10, + "rotation" : -90, + "align" : "right" + }, "data" : [ [ "Blog", @@ -18,46 +30,34 @@ ], [ "Perl", - 6458 + 6460 ], [ "Raku", 3935 ] - ], - "dataLabels" : { - "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" - }, - "format" : "{point.y:.0f}", - "align" : "right", - "color" : "#FFFFFF", - "rotation" : -90, - "enabled" : "true", - "y" : 10 - } + ] } ], - "subtitle" : { - "text" : "Last updated at 2021-10-24 21:58:31 GMT" + "legend" : { + "enabled" : "false" }, "title" : { "text" : "The Weekly Challenge Contributions [2019 - 2021]" }, - "legend" : { - "enabled" : "false" + "chart" : { + "type" : "column" }, "xAxis" : { + "type" : "category", "labels" : { "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" } - }, - "type" : "category" + } }, - "chart" : { - "type" : "column" + "subtitle" : { + "text" : "Last updated at 2021-10-24 22:13:38 GMT" } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index 6ba5169b51..4349c37c76 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,21 +1,43 @@ { - "yAxis" : { - "title" : { - "text" : "Total Solutions" + "title" : { + "text" : "The Weekly Challenge Language" + }, + "chart" : { + "type" : "column" + }, + "xAxis" : { + "type" : "category" + }, + "subtitle" : { + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2021-10-24 22:13:38 GMT" + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + } } }, "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", + "pointFormat" : "<span style=\"color:{point.color}\">Challenge {point.name}</span>: <b>{point.y:f}</b><br/>" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } }, "series" : [ { + "colorByPoint" : "true", "data" : [ { - "drilldown" : "001", + "name" : "#001", "y" : 161, - "name" : "#001" + "drilldown" : "001" }, { "name" : "#002", @@ -23,18 +45,18 @@ "y" : 125 }, { + "name" : "#003", "y" : 81, - "drilldown" : "003", - "name" : "#003" + "drilldown" : "003" }, { "name" : "#004", - "y" : 99, - "drilldown" : "004" + "drilldown" : "004", + "y" : 99 }, { - "y" : 78, "drilldown" : "005", + "y" : 78, "name" : "#005" }, { @@ -44,8 +66,8 @@ }, { "name" : "#007", - "drilldown" : "007", - "y" : 64 + "y" : 64, + "drilldown" : "007" }, { "name" : "#008", @@ -53,78 +75,78 @@ "drilldown" : "008" }, { - "name" : "#009", "y" : 76, - "drilldown" : "009" + "drilldown" : "009", + "name" : "#009" }, { "name" : "#010", - "drilldown" : "010", - "y" : 65 + "y" : 65, + "drilldown" : "010" }, { - "name" : "#011", "y" : 85, - "drilldown" : "011" + "drilldown" : "011", + "name" : "#011" }, { - "name" : "#012", "drilldown" : "012", - "y" : 89 + "y" : 89, + "name" : "#012" }, { - "drilldown" : "013", + "name" : "#013", "y" : 85, - "name" : "#013" + "drilldown" : "013" }, { + "name" : "#014", "y" : 101, - "drilldown" : "014", - "name" : "#014" + "drilldown" : "014" |
