diff options
| -rwxr-xr-x | challenge-127/pete-houston/perl/ch-1.pl | 30 | ||||
| -rwxr-xr-x | challenge-127/pete-houston/perl/ch-2.pl | 49 | ||||
| -rw-r--r-- | stats/pwc-current.json | 459 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown-summary.json | 74 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown.json | 876 | ||||
| -rw-r--r-- | stats/pwc-leaders.json | 404 | ||||
| -rw-r--r-- | stats/pwc-summary-1-30.json | 82 | ||||
| -rw-r--r-- | stats/pwc-summary-121-150.json | 44 | ||||
| -rw-r--r-- | stats/pwc-summary-151-180.json | 38 | ||||
| -rw-r--r-- | stats/pwc-summary-181-210.json | 34 | ||||
| -rw-r--r-- | stats/pwc-summary-211-240.json | 42 | ||||
| -rw-r--r-- | stats/pwc-summary-31-60.json | 92 | ||||
| -rw-r--r-- | stats/pwc-summary-61-90.json | 96 | ||||
| -rw-r--r-- | stats/pwc-summary-91-120.json | 44 | ||||
| -rw-r--r-- | stats/pwc-summary.json | 508 |
15 files changed, 1483 insertions, 1389 deletions
diff --git a/challenge-127/pete-houston/perl/ch-1.pl b/challenge-127/pete-houston/perl/ch-1.pl new file mode 100755 index 0000000000..7c9e8867c3 --- /dev/null +++ b/challenge-127/pete-houston/perl/ch-1.pl @@ -0,0 +1,30 @@ +#!/usr/bin/env perl +#=============================================================================== +# +# FILE: 12701.pl +# +# USAGE: ./12701.pl +# +# DESCRIPTION: Read 2 sets of integers and output 1 if they are +# disjoint, 0 otherwise +# +# BUGS: Not particularly clever. +# NOTES: The input values can be separated by anything. +# AUTHOR: Pete Houston (pete), cpan@openstrike.co.uk +# ORGANIZATION: Openstrike +# VERSION: 1.0 +# CREATED: 23/08/21 +#=============================================================================== + +use strict; +use warnings; + +print "Input the first set of integers on one line:\n"; +$_ = <STDIN>; +my %first = map { $_ => 1 } /(-?[0-9]+)/g; + +print "Input the second set of integers on one line:\n"; +$_ = <STDIN>; +my @matches = grep { $first{$_} } /(-?[0-9]+)/g; + +printf "%i\n", $#matches > -1 ? 0 : 1; diff --git a/challenge-127/pete-houston/perl/ch-2.pl b/challenge-127/pete-houston/perl/ch-2.pl new file mode 100755 index 0000000000..44f98395bb --- /dev/null +++ b/challenge-127/pete-houston/perl/ch-2.pl @@ -0,0 +1,49 @@ +#!/usr/bin/env perl +#=============================================================================== +# +# FILE: 12702.pl +# +# USAGE: ./12702.pl A,B C,D [ E,F ... ] +# +# DESCRIPTION: Given pairs of integers treat each as an interval and +# report any which conflict with previous pairs. +# The pairs may each be comma-separated but really anything +# other than digits and hyphens will do to separate them +# +# NOTES: We assume that each supplied number is an integer. +# Further, we assume that "conflict" means that if N is +# the upper bound of one interval and the lower bound of +# another then that is a conflict. +# +# AUTHOR: Pete Houston (pete), cpan@openstrike.co.uk +# ORGANIZATION: Openstrike +# VERSION: 1.0 +# CREATED: 28/08/21 +#=============================================================================== + +use strict; +use warnings; + +my (@ints, @conflicts); + +while (my $pair = shift) { + # Extract 2 integers from each argument + # Don't assume the lower limit comes first + my ($lower, $upper) = sort { $a <=> $b } $pair =~ /(-?[0-9]+)/g; + + # Validate + die "$pair is not an interval" + unless defined ($lower) && defined ($upper); + + # Compare to previous intervals + for my $int (@ints) { + next if $lower > $int->[1] || $upper < $int->[0]; + push @conflicts, [$lower, $upper]; + last; + } + + # Add to the list + push @ints, [$lower, $upper]; +} + +print '[ ', join (', ', map { "($_->[0],$_->[1])" } @conflicts), " ]\n"; diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 98b1d51c14..17f00ece5f 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,178 +1,39 @@ { + "subtitle" : { + "text" : "[Champions: 30] Last updated at 2021-08-29 16:06:00 GMT" + }, + "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 - 127" + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } }, "legend" : { "enabled" : 0 }, - "xAxis" : { - "type" : "category" - }, - "series" : [ - { - "data" : [ - { - "y" : 4, - "name" : "Abigail", - "drilldown" : "Abigail" - }, - { - "y" : 4, - "name" : "Adam Russell", - "drilldown" : "Adam Russell" - }, - { - "drilldown" : "Andrew Shitov", - "y" : 1, - "name" : "Andrew Shitov" - }, - { - "drilldown" : "Andrezgz", - "y" : 2, - "name" : "Andrezgz" - }, - { - "name" : "Arne Sommer", - "y" : 5, - "drilldown" : "Arne Sommer" - }, - { - "drilldown" : "Athanasius", - "name" : "Athanasius", - "y" : 4 - }, - { - "drilldown" : "Cheok-Yin Fung", - "y" : 2, - "name" : "Cheok-Yin Fung" - }, - { - "y" : 3, - "name" : "Dave Jacoby", - "drilldown" : "Dave Jacoby" - }, - { - "y" : 2, - "name" : "Duane Powell", - "drilldown" : "Duane Powell" - }, - { - "name" : "Flavio Poletti", - "y" : 6, - "drilldown" : "Flavio Poletti" - }, - { - "y" : 3, - "name" : "James Smith", - "drilldown" : "James Smith" - }, - { - "name" : "Jan Krnavek", - "y" : 2, - "drilldown" : "Jan Krnavek" - }, - { - "y" : 2, - "name" : "Joan Mimosinnet", - "drilldown" : "Joan Mimosinnet" - }, - { - "drilldown" : "Jorg Sommrey", - "name" : "Jorg Sommrey", - "y" : 2 - }, - { - "drilldown" : "Lubos Kolouch", - "y" : 2, - "name" : "Lubos Kolouch" - }, - { - "name" : "Luca Ferrari", - "y" : 4, - "drilldown" : "Luca Ferrari" - }, - { - "drilldown" : "Mark Anderson", - "name" : "Mark Anderson", - "y" : 1 - }, - { - "drilldown" : "Matthew Neleigh", - "y" : 2, - "name" : "Matthew Neleigh" - }, - { - "drilldown" : "Niels van Dijke", - "y" : 2, - "name" : "Niels van Dijke" - }, - { - "drilldown" : "Olivier Delouya", - "y" : 1, - "name" : "Olivier Delouya" - }, - { - "y" : 2, - "name" : "Paul Fajman", - "drilldown" : "Paul Fajman" - }, - { - "drilldown" : "Roger Bell_West", - "name" : "Roger Bell_West", - "y" : 5 - }, - { - "drilldown" : "Simon Green", - "name" : "Simon Green", - "y" : 3 - }, - { - "drilldown" : "Simon Proctor", - "name" : "Simon Proctor", - "y" : 1 - }, - { - "y" : 1, - "name" : "Steven Wilson", - "drilldown" : "Steven Wilson" - }, - { - "y" : 4, - "name" : "Stuart Little", - "drilldown" : "Stuart Little" - }, - { - "drilldown" : "Ulrich Rieke", - "y" : 4, - "name" : "Ulrich Rieke" - }, - { - "drilldown" : "W. Luis Mochan", - "y" : 3, - "name" : "W. Luis Mochan" - }, - { - "drilldown" : "Wanderdoc", - "name" : "Wanderdoc", - "y" : 2 - } - ], - "colorByPoint" : 1, - "name" : "The Weekly Challenge - 127" - } - ], "chart" : { "type" : "column" }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + } + } + }, "drilldown" : { "series" : [ { - "name" : "Abigail", + "id" : "Abigail", "data" : [ [ "Perl", @@ -183,10 +44,9 @@ 2 ] ], - "id" : "Abigail" + "name" : "Abigail" }, { - "name" : "Adam Russell", "id" : "Adam Russell", "data" : [ [ @@ -197,31 +57,30 @@ "Blog", 2 ] - ] + ], + "name" : "Adam Russell" }, { + "id" : "Andrew Shitov", "name" : "Andrew Shitov", "data" : [ [ "Raku", 1 ] - ], - "id" : "Andrew Shitov" + ] }, { "name" : "Andrezgz", - "id" : "Andrezgz", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Andrezgz" }, { - "name" : "Arne Sommer", - "id" : "Arne Sommer", "data" : [ [ "Perl", @@ -235,10 +94,11 @@ "Blog", 1 ] - ] + ], + "name" : "Arne Sommer", + "id" : "Arne Sommer" }, { - "id" : "Athanasius", "data" : [ [ "Perl", @@ -249,21 +109,21 @@ 2 ] ], - "name" : "Athanasius" + "name" : "Athanasius", + "id" : "Athanasius" }, { + "id" : "Cheok-Yin Fung", "name" : "Cheok-Yin Fung", "data" : [ [ "Perl", 2 ] - ], - "id" : "Cheok-Yin Fung" + ] }, { "name" : "Dave Jacoby", - "id" : "Dave Jacoby", "data" : [ [ "Perl", @@ -273,7 +133,8 @@ "Blog", 1 ] - ] + ], + "id" : "Dave Jacoby" }, { "data" : [ @@ -282,11 +143,10 @@ 2 ] ], - "id" : "Duane Powell", - "name" : "Duane Powell" + "name" : "Duane Powell", + "id" : "Duane Powell" }, { - "id" : "Flavio Poletti", "data" : [ [ "Perl", @@ -301,10 +161,10 @@ 2 ] ], - "name" : "Flavio Poletti" + "name" : "Flavio Poletti", + "id" : "Flavio Poletti" }, { - "name" : "James Smith", "id" : "James Smith", "data" : [ [ @@ -315,11 +175,12 @@ "Blog", 1 ] - ] + ], + "name" : "James Smith" }, { - "name" : "Jan Krnavek", "id" : "Jan Krnavek", + "name" : "Jan Krnavek", "data" : [ [ "Raku", @@ -328,13 +189,13 @@ ] }, { - "name" : "Joan Mimosinnet", "data" : [ [ "Raku", 2 ] ], + "name" : "Joan Mimosinnet", "id" : "Joan Mimosinnet" }, { @@ -348,17 +209,18 @@ "name" : "Jorg Sommrey" }, { + "id" : "Lubos Kolouch", + "name" : "Lubos Kolouch", "data" : [ [ "Perl", 2 ] - ], - "id" : "Lubos Kolouch", - "name" : "Lubos Kolouch" + ] }, { "id" : "Luca Ferrari", + "name" : "Luca Ferrari", "data" : [ [ "Raku", @@ -368,38 +230,37 @@ "Blog", 2 ] - ], - "name" : "Luca Ferrari" + ] }, { - "name" : "Mark Anderson", "data" : [ [ "Raku", 1 ] ], + "name" : "Mark Anderson", "id" : "Mark Anderson" }, { - "id" : "Matthew Neleigh", "data" : [ [ "Perl", 2 ] ], - "name" : "Matthew Neleigh" + "name" : "Matthew Neleigh", + "id" : "Matthew Neleigh" }, { + "id" : "Niels van Dijke", + "name" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] - ], - "id" : "Niels van Dijke", - "name" : "Niels van Dijke" + ] }, { "name" : "Olivier Delouya", @@ -412,8 +273,8 @@ "id" : "Olivier Delouya" }, { - "name" : "Paul Fajman", "id" : "Paul Fajman", + "name" : "Paul Fajman", "data" : [ [ "Perl", @@ -422,6 +283,17 @@ ] }, { + "id" : "Pete Houston", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Pete Houston" + }, + { + "name" : "Roger Bell_West", "data" : [ [ "Perl", @@ -436,11 +308,9 @@ 1 ] ], - "id" : "Roger Bell_West", - "name" : "Roger Bell_West" + "id" : "Roger Bell_West" }, { - "name" : "Simon Green", "data" : [ [ "Perl", @@ -451,17 +321,18 @@ 1 ] ], + "name" : "Simon Green", "id" : "Simon Green" }, { - "id" : "Simon Proctor", "data" : [ [ "Raku", 1 ] ], - "name" : "Simon Proctor" + "name" : "Simon Proctor", + "id" : "Simon Proctor" }, { "id" : "Steven Wilson", @@ -474,7 +345,7 @@ "name" : "Steven Wilson" }, { - "name" : "Stuart Little", + "id" : "Stuart Little", "data" : [ [ "Perl", @@ -485,9 +356,10 @@ 2 ] ], - "id" : "Stuart Little" + "name" : "Stuart Little" }, { + "id" : "Ulrich Rieke", "data" : [ [ "Perl", @@ -498,10 +370,10 @@ 2 ] ], - "id" : "Ulrich Rieke", "name" : "Ulrich Rieke" }, { + "name" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -512,36 +384,179 @@ 1 ] ], - "id" : "W. Luis Mochan", - "name" : "W. Luis Mochan" + "id" : "W. Luis Mochan" }, { + "name" : "Wanderdoc", "data" : [ [ "Perl", 2 ] ], - "id" : "Wanderdoc", - "name" : "Wanderdoc" + "id" : "Wanderdoc" } ] }, - "plotOptions" : { - "series" : { - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - }, - "borderWidth" : 0 - } - }, - "subtitle" : { - "text" : "[Champions: 29] Last updated at 2021-08-29 15:31:20 GMT" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" + "series" : [ + { + "name" : "The Weekly Challenge - 127", + "data" : [ + { + "y" : 4, + "drilldown" : "Abigail", + "name" : "Abigail" + }, + { + "drilldown" : "Adam Russell", + "name" : "Adam Russell", + "y" : 4 + }, + { + "drilldown" : "Andrew Shitov", + "name" : "Andrew Shitov", + "y" : 1 + }, + { + "drilldown" : "Andrezgz", + "name" : "Andrezgz", + "y" : 2 + }, + { + "y" : 5, + "drilldown" : "Arne Sommer", + "name" : "Arne Sommer" + }, + { + "name" : "Athanasius", + "drilldown" : "Athanasius", + "y" : 4 + }, + { + "y" : 2, + "drilldown" : "Cheok-Yin Fung", + "name" : "Cheok-Yin Fung" + }, + { + "y" : 3, + "drilldown" : "Dave Jacoby", + "name" : "Dave Jacoby" + }, + { + "drilldown" : "Duane Powell", + "name" : "Duane Powell", + "y" : 2 + }, + { + "y" : 6, + "drilldown" : "Flavio Poletti", + "name" : "Flavio Poletti" + }, + { + "name" : "James Smith", + "drilldown" : "James Smith", + "y" : 3 + }, + { + "y" : 2, + "name" : "Jan Krnavek", + "drilldown" : "Jan Krnavek" + }, + { + "name" : "Joan Mimosinnet", + "drilldown" : "Joan Mimosinnet", + "y" : 2 + }, + { + "y" : 2, + "name" : "Jorg Sommrey", + "drilldown" : "Jorg Sommrey" + }, + { + "drilldown" : "Lubos Kolouch", + "name" : "Lubos Kolouch", + "y" : 2 + }, + { + "drilldown" : "Luca Ferrari", + "name" : "Luca Ferrari", + "y" : 4 + }, + { + "y" : 1, + "name" : "Mark Anderson", + "drilldown" : "Mark Anderson" + }, + { + "name" : "Matthew Neleigh", + "drilldown" : "Matthew Neleigh", + "y" : 2 + }, + { + "y" : 2, + "name" : "Niels van Dijke", + "drilldown" : "Niels van Dijke" + }, + { + "y" : 1, + "name" : "Olivier Delouya", + "drilldown" : "Olivier Delouya" + }, + { + "drilldown" : "Paul Fajman", + "name" : "Paul Fajman", + "y" : 2 + }, + { + "y" : 2, + "name" : "Pete Houston", + "drilldown" : "Pete Houston" + }, + { + "y" : 5, + "drilldown" : "Roger Bell_West", + "name" : "Roger Bell_West" + }, + { + "y" : 3, + "name" : "Simon Green", + "drilldown" : "Simon Green" + }, + { + "y" : 1, + "name" : "Simon Proctor", + "drilldown" : "Simon Proctor" + }, + { + "y" : 1, + "drilldown" : "Steven Wilson", + "name" : "Steven Wilson" + }, + { + "y" : 4, + "name" : "Stuart Little", + "drilldown" : "Stuart Little" + }, + { + "y" : 4, + "name" : "Ulrich Rieke", + "drilldown" : "Ulrich Rieke" + }, + { + "y" : 3, + "name" : "W. Luis Mochan", + "drilldown" : "W. Luis Mochan" + }, + { + "y" : 2, + "drilldown" : "Wanderdoc", + "name" : "Wanderdoc" + } + ], + "colorByPoint" : 1 } + ], + "title" : { + "text" : "The Weekly Challenge - 127" } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 32c55f1aae..a0e3dc7fe2 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,45 +1,19 @@ { - "xAxis" : { - "labels" : { - "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" - } - }, - "type" : "category" - }, - "chart" : { - "type" : "column" - }, - "legend" : { - "enabled" : "false" - }, - "title" : { - "text" : "The Weekly Challenge Contributions [2019 - 2021]" - }, - "tooltip" : { - "pointFormat" : "<b>{point.y:.0f}</b>" - }, - "yAxis" : { - "min" : 0, - "title" : { - "text" : null - } - }, "series" : [ { "dataLabels" : { - "enabled" : "true", "rotation" : -90, + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + }, + "color" : "#FFFFFF", "align" : "right", "format" : "{point.y:.0f}", "y" : 10, - "color" : "#FFFFFF", - "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" - } + "enabled" : "true" }, + "name" : "Contributions", "data" : [ [ "Blog", @@ -47,17 +21,43 @@ ], [ "Perl", - 6090 + 6092 ], [ "Raku", 3773 ] - ], - "name" : "Contributions" + ] } ], + "yAxis" : { + "min" : 0, + "title" : { + "text" : null + } + }, + "chart" : { + "type" : "column" + }, + "legend" : { + "enabled" : "false" + }, + "tooltip" : { + "pointFormat" : "<b>{point.y:.0f}</b>" + }, + "title" : { + "text" : "The Weekly Challenge Contributions [2019 - 2021]" + }, "subtitle" : { - "text" : "Last updated at 2021-08-29 15:31:20 GMT" + "text" : "Last updated at 2021-08-29 16:06:00 GMT" + }, + "xAxis" : { + "labels" : { + "style" : { + "fontSize" : "13px", + "fontFamily" : "Verdana, sans-serif" + } + }, + "type" : "category" } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index 0d2c51fdab..571402c859 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,46 +1,47 @@ { - "legend" : { - "enabled" : "false" + "subtitle" : { + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2021-08-29 16:06:00 GMT" }, "xAxis" : { "type" : "category" }, - "title" : { - "text" : "The Weekly Challenge Language" - }, - "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" + "plotOptions" : { + "series" : { + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + }, + "borderWidth" : 0 + } }, "series" : [ { "colorByPoint" : "true", "data" : [ { + "drilldown" : "001", "name" : "#001", - "y" : 161, - "drilldown" : "001" + "y" : 161 }, { - "drilldown" : "002", "y" : 125, - "name" : "#002" + "name" : "#002", + "drilldown" : "002" }, { - "name" : "#003", "y" : 81, - "drilldown" : "003" + "drilldown" : "003", + "name" : "#003" }, { + "drilldown" : "004", "name" : "#004", - "y" : 99, - "drilldown" : "004" + "y" : 99 }, { - "y" : 78, "name" : "#005", - "drilldown" : "005" + "drilldown" : "005", + "y" : 78 }, { "y" : 58, @@ -49,8 +50,8 @@ }, { "y" : 64, - "name" : "#007", - "drilldown" : "007" + "drilldown" : "007", + "name" : "#007" }, { "drilldown" : "008", @@ -58,99 +59,99 @@ "y" : 78 }, { + "y" : 76, "drilldown" : "009", - "name" : "#009", - "y" : 76 + "name" : "#009" }, { - "y" : 65, "name" : "#010", - "drilldown" : "010" + "drilldown" : "010", + "y" : 65 }, { - "y" : 85, + "drilldown" : "011", "name" : "#011", - "drilldown" : "011" + "y" : 85 }, { - "name" : "#012", "y" : 89, + "name" : "#012", "drilldown" : "012" }, { - "drilldown" : "013", "name" : "#013", + "drilldown" : "013", "y" : 85 }, { "drilldown" : "014", - "y" : 101, - "name" : "#014" + "name" : "#014", + "y" : 101 }, { - "drilldown" : "015", "y" : 99, - "name" : "#015" + "name" : "#015", + "drilldown" : "015" }, { + "name" : "#016", "drilldown" : "016", - "y" : 71, - "name" : "#016" + "y" : 71 }, { - "drilldown" : "017", + "y" : 84, "name" : "#017", - "y" : 84 + "drilldown" : "017" }, { "y" : 81, - "name" : "#018", - "drilldown" : "018" + "drilldown" : "018", + "name" : "#018" }, { - "name" : "#019", "y" : 103, + "name" : "#019", "drilldown" : "019" }, { - "drilldown" : "020", "y" : 101, + "drilldown" : "020", "name" : "#020" }, { "drilldown" : "021", - "y" : 72, - "name" : "#021" + "name" : "#021", + "y" : 72 }, { - "drilldown" : "022", + "y" : 68, "name" : "#022", - "y" : 68 + "drilldown" : "022" }, { - "name" : "#023", "y" : 97, - "drilldown" : "023" + "drilldown" : "023", + "name" : "#023" }, { - "name" : "#024", "y" : 75, - "drilldown" : "024" + |
