aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-073/pete-houston/perl/ch-1.pl34
-rw-r--r--challenge-073/pete-houston/perl/ch-2.pl26
-rw-r--r--stats/pwc-current.json187
-rw-r--r--stats/pwc-language-breakdown-summary.json78
-rw-r--r--stats/pwc-language-breakdown.json570
-rw-r--r--stats/pwc-leaders.json772
-rw-r--r--stats/pwc-summary-1-30.json42
-rw-r--r--stats/pwc-summary-121-150.json106
-rw-r--r--stats/pwc-summary-151-180.json120
-rw-r--r--stats/pwc-summary-181-210.json48
-rw-r--r--stats/pwc-summary-31-60.json110
-rw-r--r--stats/pwc-summary-61-90.json100
-rw-r--r--stats/pwc-summary-91-120.json122
-rw-r--r--stats/pwc-summary.json404
14 files changed, 1395 insertions, 1324 deletions
diff --git a/challenge-073/pete-houston/perl/ch-1.pl b/challenge-073/pete-houston/perl/ch-1.pl
new file mode 100644
index 0000000000..2b16647b75
--- /dev/null
+++ b/challenge-073/pete-houston/perl/ch-1.pl
@@ -0,0 +1,34 @@
+#!/usr/bin/env perl
+#===============================================================================
+#
+# FILE: 7301.pl
+#
+# USAGE: ./7301.pl SIZE N ...
+#
+# DESCRIPTION: Given a window size and a list of ints, print the list
+# of minima in each window.
+#
+# REQUIREMENTS: List::Util (core)
+# NOTES: Should work equally well with floats
+# AUTHOR: Pete Houston (pete), cpan@openstrike.co.uk
+# ORGANIZATION: Openstrike
+# VERSION: 1.0
+# CREATED: 13/08/20
+#===============================================================================
+
+use strict;
+use warnings;
+use List::Util 'min';
+
+my ($size, @a) = @ARGV;
+die "Size is bigger than array" if $size > @a;
+
+my (@win, @mins);
+(@win[0..$size-1], @a) = (undef, @a);
+
+while ($#a > -1) {
+ shift @win;
+ push @win, shift @a;
+ push @mins, min (@win);
+}
+print "@mins\n";
diff --git a/challenge-073/pete-houston/perl/ch-2.pl b/challenge-073/pete-houston/perl/ch-2.pl
new file mode 100644
index 0000000000..1f1e29acbc
--- /dev/null
+++ b/challenge-073/pete-houston/perl/ch-2.pl
@@ -0,0 +1,26 @@
+#!/usr/bin/env perl
+#===============================================================================
+#
+# FILE: 7302.pl
+#
+# USAGE: ./7302.pl N ...
+#
+# DESCRIPTION: Given an array of ints print the list of smallest values
+# from the left at each point lower than that element,
+# zero otherwise.
+#
+# AUTHOR: Pete Houston (pete), cpan@openstrike.co.uk
+# ORGANIZATION: Openstrike
+# VERSION: 1.0
+# CREATED: 13/08/20
+#===============================================================================
+
+use strict;
+use warnings;
+
+my @mins = 0; # Specified in the problem at https://perlweeklychallenge.org/blog/perl-weekly-challenge-073/
+my $min = shift;
+
+push @mins, $_ < $min ? ($min = $_ and 0) : $min for @ARGV;
+
+print "@mins\n";
diff --git a/stats/pwc-current.json b/stats/pwc-current.json
index 1e4aa73bbb..de3fa213bb 100644
--- a/stats/pwc-current.json
+++ b/stats/pwc-current.json
@@ -1,35 +1,43 @@
{
- "subtitle" : {
- "text" : "[Champions: 17] Last updated at 2020-08-13 10:46:21 GMT"
+ "plotOptions" : {
+ "series" : {
+ "dataLabels" : {
+ "format" : "{point.y}",
+ "enabled" : 1
+ },
+ "borderWidth" : 0
+ }
+ },
+ "chart" : {
+ "type" : "column"
},
"series" : [
{
- "name" : "Perl Weekly Challenge - 073",
"data" : [
{
- "drilldown" : "Andrew Shitov",
"y" : 3,
+ "drilldown" : "Andrew Shitov",
"name" : "Andrew Shitov"
},
{
"y" : 2,
- "name" : "Ben Davies",
- "drilldown" : "Ben Davies"
+ "drilldown" : "Ben Davies",
+ "name" : "Ben Davies"
},
{
"y" : 2,
- "name" : "Dave Jacoby",
- "drilldown" : "Dave Jacoby"
+ "drilldown" : "Dave Jacoby",
+ "name" : "Dave Jacoby"
},
{
- "drilldown" : "E. Choroba",
"y" : 2,
+ "drilldown" : "E. Choroba",
"name" : "E. Choroba"
},
{
"name" : "Jason Messer",
- "y" : 2,
- "drilldown" : "Jason Messer"
+ "drilldown" : "Jason Messer",
+ "y" : 2
},
{
"y" : 5,
@@ -37,38 +45,43 @@
"drilldown" : "Javier Luque"
},
{
- "drilldown" : "Jorg Sommrey",
+ "y" : 2,
"name" : "Jorg Sommrey",
- "y" : 2
+ "drilldown" : "Jorg Sommrey"
},
{
- "name" : "Laurent Rosenfeld",
"y" : 5,
- "drilldown" : "Laurent Rosenfeld"
+ "drilldown" : "Laurent Rosenfeld",
+ "name" : "Laurent Rosenfeld"
},
{
- "name" : "Mark Anderson",
"y" : 2,
- "drilldown" : "Mark Anderson"
+ "drilldown" : "Mark Anderson",
+ "name" : "Mark Anderson"
},
{
"drilldown" : "Markus Holzer",
- "y" : 2,
- "name" : "Markus Holzer"
+ "name" : "Markus Holzer",
+ "y" : 2
},
{
- "name" : "Mohammad S Anwar",
"y" : 4,
- "drilldown" : "Mohammad S Anwar"
+ "drilldown" : "Mohammad S Anwar",
+ "name" : "Mohammad S Anwar"
},
{
+ "name" : "Niels van Dijke",
"drilldown" : "Niels van Dijke",
- "y" : 2,
- "name" : "Niels van Dijke"
+ "y" : 2
},
{
- "drilldown" : "Pavel Kuptsov",
+ "y" : 2,
"name" : "Pavel Kuptsov",
+ "drilldown" : "Pavel Kuptsov"
+ },
+ {
+ "name" : "Pete Houston",
+ "drilldown" : "Pete Houston",
"y" : 2
},
{
@@ -78,35 +91,51 @@
},
{
"drilldown" : "Shawn Wagner",
- "y" : 2,
- "name" : "Shawn Wagner"
+ "name" : "Shawn Wagner",
+ "y" : 2
},
{
- "drilldown" : "Simon Proctor",
"y" : 2,
+ "drilldown" : "Simon Proctor",
"name" : "Simon Proctor"
},
{
- "y" : 2,
"name" : "Wanderdoc",
- "drilldown" : "Wanderdoc"
+ "drilldown" : "Wanderdoc",
+ "y" : 2
}
],
+ "name" : "Perl Weekly Challenge - 073",
"colorByPoint" : 1
}
],
- "xAxis" : {
- "type" : "category"
- },
- "chart" : {
- "type" : "column"
+ "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/>"
},
"legend" : {
"enabled" : 0
},
+ "title" : {
+ "text" : "Perl Weekly Challenge - 073"
+ },
+ "yAxis" : {
+ "title" : {
+ "text" : "Total Solutions"
+ }
+ },
+ "subtitle" : {
+ "text" : "[Champions: 18] Last updated at 2020-08-13 21:17:50 GMT"
+ },
+ "xAxis" : {
+ "type" : "category"
+ },
"drilldown" : {
"series" : [
{
+ "name" : "Andrew Shitov",
+ "id" : "Andrew Shitov",
"data" : [
[
"Raku",
@@ -116,51 +145,51 @@
"Blog",
1
]
- ],
- "name" : "Andrew Shitov",
- "id" : "Andrew Shitov"
+ ]
},
{
"id" : "Ben Davies",
+ "name" : "Ben Davies",
"data" : [
[
"Raku",
2
]
- ],
- "name" : "Ben Davies"
+ ]
},
{
- "id" : "Dave Jacoby",
"data" : [
[
"Perl",
2
]
],
+ "id" : "Dave Jacoby",
"name" : "Dave Jacoby"
},
{
- "name" : "E. Choroba",
"data" : [
[
"Perl",
2
]
],
- "id" : "E. Choroba"
+ "id" : "E. Choroba",
+ "name" : "E. Choroba"
},
{
- "name" : "Jason Messer",
"data" : [
[
"Raku",
2
]
],
+ "name" : "Jason Messer",
"id" : "Jason Messer"
},
{
+ "id" : "Javier Luque",
+ "name" : "Javier Luque",
"data" : [
[
"Perl",
@@ -174,22 +203,19 @@
"Blog",
1
]
- ],
- "name" : "Javier Luque",
- "id" : "Javier Luque"
+ ]
},
{
- "id" : "Jorg Sommrey",
- "name" : "Jorg Sommrey",
"data" : [
[
"Perl",
2
]
- ]
+ ],
+ "id" : "Jorg Sommrey",
+ "name" : "Jorg Sommrey"
},
{
- "name" : "Laurent Rosenfeld",
"data" : [
[
"Perl",
@@ -204,17 +230,18 @@
1
]
],
+ "name" : "Laurent Rosenfeld",
"id" : "Laurent Rosenfeld"
},
{
+ "name" : "Mark Anderson",
"id" : "Mark Anderson",
"data" : [
[
"Raku",
2
]
- ],
- "name" : "Mark Anderson"
+ ]
},
{
"data" : [
@@ -227,6 +254,7 @@
"id" : "Markus Holzer"
},
{
+ "id" : "Mohammad S Anwar",
"name" : "Mohammad S Anwar",
"data" : [
[
@@ -237,8 +265,7 @@
"Raku",
2
]
- ],
- "id" : "Mohammad S Anwar"
+ ]
},
{
"data" : [
@@ -247,21 +274,32 @@
2
]
],
- "name" : "Niels van Dijke",
- "id" : "Niels van Dijke"
+ "id" : "Niels van Dijke",
+ "name" : "Niels van Dijke"
},
{
"name" : "Pavel Kuptsov",
+ "id" : "Pavel Kuptsov",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ]
+ },
+ {
"data" : [
[
"Perl",
2
]
],
- "id" : "Pavel Kuptsov"
+ "id" : "Pete Houston",
+ "name" : "Pete Houston"
},
{
"id" : "Roger Bell_West",
+ "name" : "Roger Bell_West",
"data" : [
[
"Perl",
@@ -271,61 +309,38 @@
"Raku",
2
]
- ],
- "name" : "Roger Bell_West"
+ ]
},
{
- "id" : "Shawn Wagner",
"data" : [
[
"Perl",
2
]
],
+ "id" : "Shawn Wagner",
"name" : "Shawn Wagner"
},
{
"name" : "Simon Proctor",
+ "id" : "Simon Proctor",
"data" : [
[
"Raku",
2
]
- ],
- "id" : "Simon Proctor"
+ ]
},
{
+ "name" : "Wanderdoc",
"id" : "Wanderdoc",
"data" : [
[
"Perl",
2
]
- ],
- "name" : "Wanderdoc"
+ ]
}
]
- },
- "plotOptions" : {
- "series" : {
- "borderWidth" : 0,
- "dataLabels" : {
- "format" : "{point.y}",
- "enabled" : 1
- }
- }
- },
- "yAxis" : {
- "title" : {
- "text" : "Total Solutions"
- }
- },
- "title" : {
- "text" : "Perl Weekly Challenge - 073"
- },
- "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
}
}
diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json
index 11bdf59370..124f9f5b2c 100644
--- a/stats/pwc-language-breakdown-summary.json
+++ b/stats/pwc-language-breakdown-summary.json
@@ -1,30 +1,36 @@
{
+ "tooltip" : {
+ "pointFormat" : "<b>{point.y:.0f}</b>"
+ },
+ "title" : {
+ "text" : "Perl Weekly Challenge Contributions [2019 - 2020]"
+ },
+ "legend" : {
+ "enabled" : "false"
+ },
"yAxis" : {
- "min" : 0,
"title" : {
"text" : null
- }
+ },
+ "min" : 0
},
- "title" : {
- "text" : "Perl Weekly Challenge Contributions [2019 - 2020]"
+ "subtitle" : {
+ "text" : "Last updated at 2020-08-13 21:17:50 GMT"
},
- "tooltip" : {
- "pointFormat" : "<b>{point.y:.0f}</b>"
+ "xAxis" : {
+ "labels" : {
+ "style" : {
+ "fontSize" : "13px",
+ "fontFamily" : "Verdana, sans-serif"
+ }
+ },
+ "type" : "category"
+ },
+ "chart" : {
+ "type" : "column"
},
"series" : [
{
- "dataLabels" : {
- "enabled" : "true",
- "align" : "right",
- "rotation" : -90,
- "style" : {
- "fontFamily" : "Verdana, sans-serif",
- "fontSize" : "13px"
- },
- "color" : "#FFFFFF",
- "format" : "{point.y:.0f}",
- "y" : 10
- },
"data" : [
[
"Blog",
@@ -32,32 +38,26 @@
],
[
"Perl",
- 3011
+ 3013
],
[
"Raku",
1961
]
],
- "name" : "Contributions"
- }
- ],
- "xAxis" : {
- "labels" : {
- "style" : {
- "fontFamily" : "Verdana, sans-serif",
- "fontSize" : "13px"
+ "name" : "Contributions",
+ "dataLabels" : {
+ "align" : "right",
+ "y" : 10,
+ "rotation" : -90,
+ "color" : "#FFFFFF",
+ "format" : "{point.y:.0f}",
+ "enabled" : "true",
+ "style" : {
+ "fontSize" : "13px",
+ "fontFamily" : "Verdana, sans-serif"
+ }
}
- },
- "type" : "category"
- },
- "subtitle" : {
- "text" : "Last updated at 2020-08-13 10:46:21 GMT"
- },
- "chart" : {
- "type" : "column"
- },
- "legend" : {
- "enabled" : "false"
- }
+ }
+ ]
}
diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json
index b78f3db247..34c0488096 100644
--- a/stats/pwc-language-breakdown.json
+++ b/stats/pwc-language-breakdown.json
@@ -1,14 +1,24 @@
{
+ "title" : {
+ "text" : "Perl Weekly Challenge Language"
+ },
"legend" : {
"enabled" : "false"
},
- "chart" : {
- "type" : "column"
+ "yAxis" : {
+ "title" : {
+ "text" : "Total Solutions"
+ }
+ },
+ "subtitle" : {
+ "text" : "Click the columns to drilldown the language breakdown. Last updated at 2020-08-13 21:17:50 GMT"
+ },
+ "xAxis" : {
+ "type" : "category"
},
"drilldown" : {
"series" : [
{
- "name" : "001",
"data" : [
[
"Perl",
@@ -23,7 +33,8 @@
11
]
],
- "id" : "001"
+ "id" : "001",
+ "name" : "001"
},
{
"data" : [
@@ -40,10 +51,12 @@
10
]
],
- "name" : "002",
- "id" : "002"
+ "id" : "002",
+ "name" : "002"
},
{
+ "name" : "003",
+ "id" : "003",
"data" : [
[
"Perl",
@@ -57,9 +70,7 @@
"Blog",
9
]
- ],
- "name" : "003",
- "id" : "003"
+ ]
},
{
"id" : "004",
@@ -80,8 +91,6 @@
]
},
{
- "id" : "005",
- "name" : "005",
"data" : [
[
"Perl",
@@ -95,7 +104,9 @@
"Blog",
12
]
- ]
+ ],
+ "id" : "005",
+ "name" : "005"
},
{
"data" : [
@@ -112,11 +123,12 @@
7
]
],
- "name" : "006",
- "id" : "006"
+ "id" : "006",
+ "name" : "006"
},
{
"name" : "007",
+ "id" : "007",
"data" : [
[
"Perl",
@@ -130,11 +142,9 @@
"Blog",
10
]
- ],
- "id" : "007"
+ ]
},
{
- "name" : "008",
"data" : [
[
"Perl",
@@ -149,7 +159,8 @@
12
]
],
- "id" : "008"
+ "id" : "008",
+ "name" : "008"
},
{
"id" : "009",
@@ -170,6 +181,7 @@
]
},
{
+ "id" : "010",
"name" : "010",
"data" : [
[
@@ -184,11 +196,9 @@
"Blog",
11
]
- ],
- "id" : "010"
+ ]
},
{
- "id" : "011",
"data" : [
[
"Perl",
@@ -203,10 +213,12 @@
10
]
],
+ "id" : "011",
"name" : "011"
},
{
"name" : "012",
+ "id" : "012",
"data" : [
[
"Perl",
@@ -220,11 +232,9 @@
"Blog",
11
]
- ],
- "id" : "012"
+ ]
},
{
- "name" : "013",
"data" : [
[
"Perl",
@@ -239,11 +249,10 @@
13
]
],
+ "name" : "013",
"id" : "013"
},
{
- "id" : "014",
- "name" : "014",
"data" : [
[
"Perl",
@@ -257,10 +266,13 @@
"Blog",
15
]
- ]
+ ],
+ "id" : "014",
+ "name" : "014"
},
{
"name" : "015",
+ "id" : "015",
"data" : [
[
"Perl",
@@ -274,11 +286,9 @@
"Blog",
15
]
- ],
- "id" : "015"
+ ]
},
{
- "name" : "016",
"data" : [
[
"Perl",
@@ -293,10 +303,12 @@
12
]
],
- "id" : "016"
+ "id" : "016",
+ "name" : "016"
},
{
"name" : "017",
+ "id" : "017",
"data" : [
[
"Perl",
@@ -310,12 +322,9 @@
"Blog",
12
]
- ],
- "id" : "017"
+ ]
},
{
- "id" : "018",
- "name" : "018",
"data" : [
[
"Perl",
@@ -329,9 +338,12 @@
"Blog",
14
]
- ]
+ ],
+ "id" : "018",
+ "name" : "018"
},
{
+ "name" : "019",
"id" : "019",
"data" : [
[
@@ -346,11 +358,9 @@
"Blog",
13
]
- ],
- "name" : "019"
+ ]
},
{
- "name" : "020",
"data" : [
[
"Perl",
@@ -365,11 +375,10 @@
13
]
],
+ "name" : "020",
"id" : "020"
},
{
- "id" : "021",
- "name" : "021",
"data" : [
[
"Perl",
@@ -383,9 +392,13 @@
"Blog",
10
]
- ]
+ ],
+ "name" : "021",
+ "id" : "021"
},
{
+ "id" : "022",
+ "name" : "022",
"data" : [
[
"Perl",
@@ -399,11 +412,11 @@
"Blog",
10
]
- ],
- "name" : "022",
- "id" : "022"
+ ]
},
{
+ "name" : "023",
+ "id" : "023",
"data" : [
[
"Perl",
@@ -417,11 +430,11 @@
"Blog",
12
]
- ],
- "name" : "023",
- "id" : "023"
+ ]
},
{
+ "id" : "024",
+ "name" : "024",
"data" : [
[
"Perl",
@@ -435,11 +448,10 @@
"Blog",
11
]
- ],
- "name" : "024",
- "id" : "024"
+ ]
},
{
+ "name" : "025",
"id" : "025",
"data" : [
[
@@ -454,8 +466,7 @@
"Blog",
12
]
- ],
- "name" : "025"
+ ]
},
{
"id" : "026",
@@ -476,6 +487,8 @@
]
},
{
+ "id" : "027",
+ "name" : "027",
"data" : [
[
"Perl",
@@ -489,9 +502,7 @@
"Blog",
9
]
- ],
- "name" : "027",
- "id" : "027"
+ ]
},
{
"data" : [
@@ -508,11 +519,10 @@
9
]
],
- "name" : "028",
- "id" : "028"
+ "id" : "028",
+ "name" : "028"
},
{
- "name" : "029",
"data" : [
[
"Perl",
@@ -527,7 +537,8 @@
12
]
],
- "id" : "029"
+ "id" : "029",
+ "name" : "029"
},
{
"data" : [
@@ -548,7 +559,6 @@
"id" : "030"
},
{
- "name" : "031",
"data" : [
[
"Perl",
@@ -563,10 +573,10 @@
9
]
],
- "id" : "031"
+ "id" : "031",
+ "name" : "031"
},
{
- "id" : "032",
"data" : [
[
"Perl",
@@ -581,10 +591,10 @@
10
]
],
+ "id" : "032",
"name" : "032"
},
{
- "name" : "033",
"data" : [
[
"Perl",
@@ -599,7 +609,8 @@
10
]
],
- "id" : "033"
+ "id" : "033",
+ "name" : "033"
},
{
"data" : [
@@ -616,8 +627,8 @@
11
]
],
- "name" : "034",
- "id" : "034"
+ "id" : "034",
+ "name" : "034"
},
{
"id" : "035",
@@ -638,8 +649,6 @@
]
},
{
- "id" : "036",
- "name" : "036",
"data" : [
[
"Perl",
@@ -653,7 +662,9 @@
"Blog",
11
]
- ]
+ ],
+ "id" : "036",
+ "name" : "036"
},
{
"data" : [
@@ -670,8 +681,8 @@
9
]
],
- "name" : "037",
- "id" : "037"
+ "id" : "037",
+ "name" : "037"
},
{
"data" : [
@@ -692,7 +703,6 @@
"id" : "038"
},
{
- "id" : "039",
"data" : [
[
"Perl",
@@ -707,9 +717,12 @@
12
]
],
+ "id" : "039",
"name" : "039"
},
{
+ "id" : "040",
+ "name" : "040",
"data" : [
[
"Perl",
@@ -723,11 +736,11 @@
"Blog",
10
]
- ],
- "name" : "040",
- "id" : "040"
+ ]
},
{
+ "id" : "041",
+ "name" : "041",
"data" : [
[
"Perl",
@@ -741,9 +754,7 @@
"Blog",
9
]
- ],
- "name" : "041",
- "id" : "041"
+ ]
},
{
"data" : [
@@ -760,11 +771,10 @@
11
]
],
- "name" : "042",
- "id" : "042"
+ "id" : "042",
+ "name" : "042"
},
{
- "id" : "043",
"data" : [
[
"Perl",
@@ -779,11 +789,10 @@
11
]
],
+ "id" : "043",
"name" : "043"
},
{
- "id" : "044",
- "name" : "044",
"data" : [
[
"Perl",
@@ -797,7 +806,9 @@
"Blog",
11
]
- ]
+ ],
+ "id" : "044",
+ "name" : "044"
},
{
"data" : [
@@ -814,10 +825,12 @@
11
]
],
- "name" : "045",
- "id" : "045"
+ "id" : "045",
+ "name" : "045"
},
{
+ "name" : "046",
+ "id" : "046",
"data" : [
[
"Perl",
@@ -831,11 +844,10 @@
"Blog",
10
]
- ],
- "name" : "046",
- "id" : "046"
+ ]
},
{
+ "id" : "047",
"name" : "047",
"data" : [