From b44b4b7025056aed3f7023a66dd8eda44a6d65bc Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Wed, 29 Jan 2020 05:35:13 +0000 Subject: - Added solutions by Colin Crain. --- challenge-044/colin-crain/perl/ch-1.pl | 63 +++++ challenge-044/colin-crain/perl/ch-2.pl | 85 +++++++ challenge-044/colin-crain/raku/ch-1.p6 | 121 ++++++++++ challenge-044/colin-crain/raku/ch-2.p6 | 60 +++++ stats/pwc-current.json | 255 +++++++++++--------- stats/pwc-language-breakdown-summary.json | 50 ++-- stats/pwc-language-breakdown.json | 360 +++++++++++++-------------- stats/pwc-leaders.json | 388 +++++++++++++++--------------- stats/pwc-summary-1-30.json | 52 ++-- stats/pwc-summary-121-150.json | 46 ++-- stats/pwc-summary-31-60.json | 44 ++-- stats/pwc-summary-61-90.json | 40 +-- stats/pwc-summary-91-120.json | 122 +++++----- stats/pwc-summary.json | 32 +-- 14 files changed, 1033 insertions(+), 685 deletions(-) create mode 100644 challenge-044/colin-crain/perl/ch-1.pl create mode 100644 challenge-044/colin-crain/perl/ch-2.pl create mode 100644 challenge-044/colin-crain/raku/ch-1.p6 create mode 100644 challenge-044/colin-crain/raku/ch-2.p6 diff --git a/challenge-044/colin-crain/perl/ch-1.pl b/challenge-044/colin-crain/perl/ch-1.pl new file mode 100644 index 0000000000..ca21559051 --- /dev/null +++ b/challenge-044/colin-crain/perl/ch-1.pl @@ -0,0 +1,63 @@ +#! /opt/local/bin/perl +# +# one_hundred.pl +# +# PWC 44 - TASK #1 +# Only 100, please. +# You are given a string “123456789”. Write a script that would insert +# ”+” or ”-” in between digits so that when you evaluate, the result +# should be 100. +# +# method: For the list (1, 2, 3, 4, 5 , 6, 7, 8, 9) there are 9 +# elements, or 8 interelemental spacings for operators. +# +# Each operator can be one of '+' '-' or '~', signifying merging the +# two numbers into one number 10a+b +# +# 3 choices 8 times yields 3^8 permutations with repetition, or 6561 +# equations to be considered. + +# The 'merge' operator a~b is associative to itself, +# (1~2)~3 = 1~(2~3) = 123 +# however +# (1+2)~3 != 1+(2~3) +# thus it has higher precedence than the others and must be evaluated +# first. By concatenating a~b into the equation string during +# construction as 'ab' this is practically accomplished positionally +# rather than overtly mathematically, yet with the same result as applying +# f(a,b) = 10a+b +# +# the resultant string, containing only left-associative operators can +# now be eval'd left to right and compared to 100 + +# +# +# 2020 colin crain +## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + + + +use warnings; +use strict; +use feature ":5.26"; + +## ## ## ## ## MAIN + +my @list = ( 1..9 ); +my @equations = shift @list; +my $idx = 0; + +for my $new ( @list ){ + while (my $target = splice @equations, $idx, 1){ + for (' + ', ' - ', ''){ + splice @equations, $idx, 0, $target . $_ . $new; + $idx++; + } + } + $idx = 0; +} + +## output# +for (@equations){ + printf "%-30s = 100\n", $_ if eval $_ == 100; +} diff --git a/challenge-044/colin-crain/perl/ch-2.pl b/challenge-044/colin-crain/perl/ch-2.pl new file mode 100644 index 0000000000..272b2b7e96 --- /dev/null +++ b/challenge-044/colin-crain/perl/ch-2.pl @@ -0,0 +1,85 @@ +#! /opt/local/bin/perl +# +# two_hundred.pl +# +# PWC 44 - TASK #2 +# Make it $200 +# You have only $1 left at the start of the week. You have been given an +# opportunity to make it $200. The rule is simple with every move you can either +# double what you have or add another $1. Write a script to help you get $200 with +# the smallest number of moves. + + +# +# 2020 colin crain +## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + + + +use warnings; +use strict; +use feature ":5.26"; + +## ## ## ## ## MAIN + + +# method: Of the two given options available to proceed towards our goal, +# +# f(x) = 2x +# g(x) = x + 1 +# +# given that +# +# 2x >= x+1 ∀ x > 0 +# --> goal - (2 * value) <= goal - (value + 1) ∀ x > 0 , +# +# doubling will invariably be a more efficiant progress towards the +# goal, so f(x) should always be the preferred move. What is not obvious +# is when to increment by 1. This becomes clear when we work backwards. +# The way to find the optimum path is to invert the problem, working +# backwards from the goal, either halving if even or subtracting one +# until 1 is reached. The two available functions then become: +# +# f'(x) = x / 2 +# g'(x) = x - 1 +# +# When we look at the inverted functions, we notice that any odd number +# minus 1 becomes even, and hence able to be halved, which should always +# be the preferred move. So any application of g'(x) is followed by +# f'(x) for all x > 0. It is now clear the only application of g'(x) +# will be to make x even again, allowing further application of f'(x). +# +# Thus progressing from the end of the sequence, then reversing the +# order of steps taken, both maximizes the use of the doubling function +# and minimizes the addition, so any other variation will be +# sub-optimal. +# +# The resultant algorithm is: +# +# reverse steps: +# x :- endpoint +# loop: until x = 1 { +# if x even -> halve x +# else x := x - 1 +# } +# + + + + + +my $value = shift @ARGV // 200; +my @steps = $value; + +while ( $value != 1) { + if ($value % 2 == 0){ + $value /= 2; + } + else { + $value -= 1; + } + unshift @steps, $value; ## we build the array of steps from back to front + ## so there is no need to reverse it later +} + +print join ', ', @steps; diff --git a/challenge-044/colin-crain/raku/ch-1.p6 b/challenge-044/colin-crain/raku/ch-1.p6 new file mode 100644 index 0000000000..9bfb9137fd --- /dev/null +++ b/challenge-044/colin-crain/raku/ch-1.p6 @@ -0,0 +1,121 @@ +use v6.d; + +# +# +# one_hundred.p6 +# +# PWC 44 - TASK #1 +# "Only 100, please." +# You are given a string “123456789”. Write a script that would +# insert ”+” or ”-” in between digits so that when you evaluate, the +# result should be 100. +# +# +# +# method: + +# EVAL vs. eval "" + +# 1. The logic for the perl 5 version of this solution is +# strightforward, and we'll repeat it here. We build a list of +# strings containing combinations of '+', '-' or nothing between +# the digits in the source string, then treat that string as code +# and see whether it adds to 100. It's a fair number of +# iterations to got through, but nothing crazy. Profiling the +# code states it runs for me in 230ms to produce the 11 +# solutions: + +# For the list (1, 2, 3, 4, 5 , 6, 7, 8, 9) there are 9 elements, or +# 8 interelemental spacings for operators. +# +# Each operator can be one of '+' '-' or '~', signifying merging the +# two numbers into one number 10a+b (being the same as not splitting +# the original string at all at that point, or doing nothing) +# +# 3 choices 8 times yields 3^8 permutations with repetition, or 6561 +# equations to be considered. +# +# The 'merge' operator a~b is associative to itself, +# (1~2)~3 = 1~(2~3) = 123 +# however +# (1+2)~3 != 1+(2~3) +# thus it has higher precedence than the others and must be +# evaluated first. By concatenating a~b into the equation string +# during construction as 'ab' this is accomplished positionally +# rather than mathematically and precedence order is maintained. +# +# the resultant string, containing only left-associative operators +# can now be eval'd left to right and compared to 100 +# +# 2. Directly translating the logic to raku, including the lines: + +# use MONKEY-SEE-NO-EVAL; +# printf "%-30s = 100\n", $_ if EVAL($_) == 100; +# +# is painfully, ridiculously slow. The same 6561 evaluations took a +# full 55 seconds, and it is not clear what is happening here, but +# it's using an inordinant amount of memory doing so. Adding the +# profiler eats everything available until segfault so we can't use +# that. But assuming it's the EVAL (spoiler: it's the EVAL), we +# rewrite that as a specific calculator subroutine that dices the +# string and computed the total, bringing the elapsed time down to +# about 3000ms. Inlining that subroutine got us to 2171, and +# replacing shift with an explicit index, keeping the array of +# equations intact as shown below brings us to 1623ms, which is +# still about 7x slower than Perl5 for the same logic. I think this +# qualifies as a solution, if not a great one. Further efforts +# didn't prove fruitful, and getting this time down further will +# presumably require a complete reworking of the methodology. +# + +# 2020 colin crain +## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + + +sub MAIN () { +# my $start = BEGIN { DateTime.now }; ## our timer init + + my $string = "123456789"; + my @list = $string.comb; + my @equations = @list.shift; + my $idx = 0; + + ## for each element of the existing list, remove and replace it in place + ## with 3 new elements suffixed with the next operator and operand + ## -- 9840 iterations to produce 6561 elements + for @list -> $new { + while my $target = @equations.splice($idx, 1) { + for (' + ', ' - ', '') { + @equations.splice( $idx, 0, "$target$_$new" ); + $idx++; + } + } + ## restart from beginning of list as each number is added to the strings + $idx = 0; + } + +# say DateTime.now - $start ; ## isolate the top from the bottom + + ## inline the filter sub + my @valid; + for @equations { + my @eq = $_.split( /<[-+]>/, :v); + my $total; + + my $idx = 0; + while ($idx < @eq.elems) { + given @eq[$idx] { + when "+" { $idx++; $total += @eq[$idx] } + when "-" { $idx++; $total -= @eq[$idx] } + default { $total = $_ } + } + $idx++; + } + @valid.push: $_ if $total == 100; + } + + ## output + printf "%-30s = 100\n", $_ for @valid; ## roll your own + +# END { say DateTime.now - $start }; ## report +} diff --git a/challenge-044/colin-crain/raku/ch-2.p6 b/challenge-044/colin-crain/raku/ch-2.p6 new file mode 100644 index 0000000000..05cc6a14e8 --- /dev/null +++ b/challenge-044/colin-crain/raku/ch-2.p6 @@ -0,0 +1,60 @@ +use v6; + +# +# two_hundred.p6 +# +# method: Of the two given options available to proceed towards our goal, +# +# f(x) = 2x +# g(x) = x + 1 +# +# given that +# +# 2x >= x+1 ∀ x > 0 +# --> goal - (2 * value) <= goal - (value + 1) ∀ x > 0 , +# +# doubling will invariably be a more efficiant progress towards the +# goal, so f(x) should always be the preferred move. What is not obvious +# is when to increment by 1. This becomes clear when we work backwards. +# The way to find the optimum path is to invert the problem, working +# backwards from the goal, either halving if even or subtracting one +# until 1 is reached. The two available functions then become: +# +# f'(x) = x / 2 +# g'(x) = x - 1 +# +# When we look at the inverted functions, we notice that any odd number +# minus 1 becomes even, and hence able to be halved, which should always +# be the preferred move. So any application of g'(x) is followed by +# f'(x) for all x > 0. It is now clear the only application of g'(x) +# will be to make x even again, allowing further application of f'(x). +# +# Thus progressing from the end of the sequence, then reversing the +# order of steps taken, both maximizes the use of the doubling function +# and minimizes the addition, so any other variation will be +# sub-optimal. +# +# The resultant algorithm is: +# +# reverse steps: +# x :- endpoint +# loop: until x = 1 { +# if x even -> halve x +# else x := x - 1 +# } +# +# +# 2020 colin crain +## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + +sub MAIN (Int:D $target where { $target > 1 } = 200) { + my $value = $target; + my @steps = $value; + + while $value > 1 { + $value -= $value %% 2 ?? $value / 2 !! 1; + unshift @steps, $value; + } + + say @steps.join: ", "; +} diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 5923af7724..149018b06b 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,11 +1,18 @@ { - "title" : { - "text" : "Perl Weekly Challenge - 044" + "tooltip" : { + "pointFormat" : "{point.name}: {point.y:f}
", + "followPointer" : 1, + "headerFormat" : "{series.name}
" + }, + "chart" : { + "type" : "column" + }, + "subtitle" : { + "text" : "[Champions: 27] Last updated at 2020-01-29 05:34:42 GMT" }, "drilldown" : { "series" : [ { - "name" : "Adam Russell", "data" : [ [ "Perl", @@ -16,29 +23,31 @@ 2 ] ], + "name" : "Adam Russell", "id" : "Adam Russell" }, { "name" : "Alicia Bielsa", - "id" : "Alicia Bielsa", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Alicia Bielsa" }, { - "id" : "Andrezgz", + "name" : "Andrezgz", "data" : [ [ "Perl", 2 ] ], - "name" : "Andrezgz" + "id" : "Andrezgz" }, { + "id" : "Arne Sommer", "name" : "Arne Sommer", "data" : [ [ @@ -49,18 +58,31 @@ "Blog", 1 ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ] ], - "id" : "Arne Sommer" + "name" : "Cheok-Yin Fung", + "id" : "Cheok-Yin Fung" }, { "data" : [ [ "Perl", 2 + ], + [ + "Raku", + 2 ] ], - "id" : "Cheok-Yin Fung", - "name" : "Cheok-Yin Fung" + "name" : "Colin Crain", + "id" : "Colin Crain" }, { "name" : "Cristina Heredia", @@ -73,44 +95,44 @@ "id" : "Cristina Heredia" }, { - "id" : "Daniel Mantovani", "data" : [ [ "Perl", 2 ] ], - "name" : "Daniel Mantovani" + "name" : "Daniel Mantovani", + "id" : "Daniel Mantovani" }, { - "name" : "Darren Bottin", "data" : [ [ "Perl", 1 ] ], + "name" : "Darren Bottin", "id" : "Darren Bottin" }, { + "name" : "Dave Jacoby", "data" : [ [ "Perl", 2 ] ], - "id" : "Dave Jacoby", - "name" : "Dave Jacoby" + "id" : "Dave Jacoby" }, { - "id" : "Duane Powell", + "name" : "Duane Powell", "data" : [ [ "Perl", 2 ] ], - "name" : "Duane Powell" + "id" : "Duane Powell" }, { "data" : [ @@ -119,10 +141,11 @@ 2 ] ], - "id" : "Duncan C. White", - "name" : "Duncan C. White" + "name" : "Duncan C. White", + "id" : "Duncan C. White" }, { + "id" : "E. Choroba", "name" : "E. Choroba", "data" : [ [ @@ -133,31 +156,31 @@ "Blog", 1 ] - ], - "id" : "E. Choroba" + ] }, { "name" : "Fabrizio Poggi", - "id" : "Fabrizio Poggi", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Fabrizio Poggi" }, { + "name" : "Jan Ole Kraft", "data" : [ [ "Raku", 2 ] ], - "id" : "Jan Ole Kraft", - "name" : "Jan Ole Kraft" + "id" : "Jan Ole Kraft" }, { "id" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -171,28 +194,27 @@ "Blog", 1 ] - ], - "name" : "Laurent Rosenfeld" + ] }, { - "name" : "Luca Ferrari", - "id" : "Luca Ferrari", "data" : [ [ "Raku", 2 ] - ] + ], + "name" : "Luca Ferrari", + "id" : "Luca Ferrari" }, { - "id" : "Markus Holzer", + "name" : "Markus Holzer", "data" : [ [ "Raku", 2 ] ], - "name" : "Markus Holzer" + "id" : "Markus Holzer" }, { "data" : [ @@ -201,20 +223,21 @@ 2 ] ], - "id" : "Noud Aldenhoven", - "name" : "Noud Aldenhoven" + "name" : "Noud Aldenhoven", + "id" : "Noud Aldenhoven" }, { - "name" : "Peter Scott", - "id" : "Peter Scott", "data" : [ [ "Perl", 1 ] - ] + ], + "name" : "Peter Scott", + "id" : "Peter Scott" }, { + "id" : "Roger Bell West", "data" : [ [ "Perl", @@ -225,12 +248,9 @@ 2 ] ], - "id" : "Roger Bell West", "name" : "Roger Bell West" }, { - "name" : "Ruben Westerberg", - "id" : "Ruben Westerberg", "data" : [ [ "Perl", @@ -240,10 +260,12 @@ "Raku", 2 ] - ] + ], + "name" : "Ruben Westerberg", + "id" : "Ruben Westerberg" }, { - "id" : "Ryan Thompson", + "name" : "Ryan Thompson", "data" : [ [ "Perl", @@ -258,69 +280,89 @@ 2 ] ], - "name" : "Ryan Thompson" + "id" : "Ryan Thompson" }, { - "name" : "Saif Ahmed", "data" : [ [ "Perl", 2 ] ], + "name" : "Saif Ahmed", "id" : "Saif Ahmed" }, { + "id" : "Simon Proctor", + "name" : "Simon Proctor", "data" : [ [ "Raku", 2 ] - ], - "id" : "Simon Proctor", - "name" : "Simon Proctor" + ] }, { - "name" : "Ulrich Rieke", - "id" : "Ulrich Rieke", "data" : [ [ "Raku", 2 ] - ] + ], + "name" : "Ulrich Rieke", + "id" : "Ulrich Rieke" }, { - "id" : "Wanderdoc", + "name" : "Wanderdoc", "data" : [ [ "Perl", 2 ] ], - "name" : "Wanderdoc" + "id" : "Wanderdoc" } ] }, + "legend" : { + "enabled" : 0 + }, + "plotOptions" : { + "series" : { + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + }, + "borderWidth" : 0 + } + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "title" : { + "text" : "Perl Weekly Challenge - 044" + }, "series" : [ { - "name" : "Perl Weekly Challenge - 044", "colorByPoint" : 1, + "name" : "Perl Weekly Challenge - 044", "data" : [ { - "y" : 4, + "name" : "Adam Russell", "drilldown" : "Adam Russell", - "name" : "Adam Russell" + "y" : 4 }, { + "drilldown" : "Alicia Bielsa", "name" : "Alicia Bielsa", - "y" : 2, - "drilldown" : "Alicia Bielsa" + "y" : 2 }, { - "drilldown" : "Andrezgz", "y" : 2, - "name" : "Andrezgz" + "name" : "Andrezgz", + "drilldown" : "Andrezgz" }, { "name" : "Arne Sommer", @@ -329,78 +371,83 @@ }, { "drilldown" : "Cheok-Yin Fung", - "y" : 2, - "name" : "Cheok-Yin Fung" + "name" : "Cheok-Yin Fung", + "y" : 2 + }, + { + "drilldown" : "Colin Crain", + "name" : "Colin Crain", + "y" : 4 }, { - "name" : "Cristina Heredia", "y" : 1, + "name" : "Cristina Heredia", "drilldown" : "Cristina Heredia" }, { "y" : 2, - "drilldown" : "Daniel Mantovani", - "name" : "Daniel Mantovani" + "name" : "Daniel Mantovani", + "drilldown" : "Daniel Mantovani" }, { "name" : "Darren Bottin", - "y" : 1, - "drilldown" : "Darren Bottin" + "drilldown" : "Darren Bottin", + "y" : 1 }, { + "drilldown" : "Dave Jacoby", "name" : "Dave Jacoby", - "y" : 2, - "drilldown" : "Dave Jacoby" + "y" : 2 }, { - "name" : "Duane Powell", "y" : 2, + "name" : "Duane Powell", "drilldown" : "Duane Powell" }, { - "drilldown" : "Duncan C. White", "y" : 2, + "drilldown" : "Duncan C. White", "name" : "Duncan C. White" }, { - "drilldown" : "E. Choroba", "y" : 3, - "name" : "E. Choroba" + "name" : "E. Choroba", + "drilldown" : "E. Choroba" }, { "name" : "Fabrizio Poggi", - "y" : 2, - "drilldown" : "Fabrizio Poggi" + "drilldown" : "Fabrizio Poggi", + "y" : 2 }, { - "name" : "Jan Ole Kraft", + "y" : 2, "drilldown" : "Jan Ole Kraft", - "y" : 2 + "name" : "Jan Ole Kraft" }, { - "drilldown" : "Laurent Rosenfeld", "y" : 5, + "drilldown" : "Laurent Rosenfeld", "name" : "Laurent Rosenfeld" }, { - "drilldown" : "Luca Ferrari", "y" : 2, + "drilldown" : "Luca Ferrari", "name" : "Luca Ferrari" }, { - "drilldown" : "Markus Holzer", "y" : 2, + "drilldown" : "Markus Holzer", "name" : "Markus Holzer" }, { - "name" : "Noud Aldenhoven", "drilldown" : "Noud Aldenhoven", + "name" : "Noud Aldenhoven", "y" : 2 }, { "name" : "Peter Scott", - "y" : 1, - "drilldown" : "Peter Scott" + "drilldown" : "Peter Scott", + "y" : 1 }, { "y" : 4, @@ -408,24 +455,24 @@ "name" : "Roger Bell West" }, { + "y" : 4, "name" : "Ruben Westerberg", - "drilldown" : "Ruben Westerberg", - "y" : 4 + "drilldown" : "Ruben Westerberg" }, { - "drilldown" : "Ryan Thompson", "y" : 6, - "name" : "Ryan Thompson" + "name" : "Ryan Thompson", + "drilldown" : "Ryan Thompson" }, { - "y" : 2, + "name" : "Saif Ahmed", "drilldown" : "Saif Ahmed", - "name" : "Saif Ahmed" + "y" : 2 }, { + "drilldown" : "Simon Proctor", "name" : "Simon Proctor", - "y" : 2, - "drilldown" : "Simon Proctor" + "y" : 2 }, { "y" : 2, @@ -440,35 +487,7 @@ ] } ], - "chart" : { - "type" : "column" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - } - } - }, "xAxis" : { "type" : "category" - }, - "subtitle" : { - "text" : "[Champions: 26] Last updated at 2020-01-29 05:22:01 GMT" - }, - "legend" : { - "enabled" : 0 - }, - "tooltip" : { - "followPointer" : 1, - "pointFormat" : "{point.name}: {point.y:f}
", - "headerFormat" : "{series.name}
" } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 98ebbb7756..5228669340 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,21 +1,15 @@ { + "subtitle" : { + "text" : "Last updated at 2020-01-29 05:34:42 GMT" + }, "chart" : { "type" : "column" }, + "tooltip" : { + "pointFormat" : "{point.y:.0f}" + }, "series" : [ { - "dataLabels" : { - "color" : "#FFFFFF", - "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" - }, - "align" : "right", - "enabled" : "true", - "y" : 10, - "rotation" : -90, - "format" : "{point.y:.0f}" - }, "data" : [ [ "Blog", @@ -23,19 +17,28 @@ ], [ "Perl", - 1803 + 1805 ], [ "Raku", - 1092 + 1094 ] ], - "name" : "Contributions" + "name" : "Contributions", + "dataLabels" : { + "style" : { + "fontSize" : "13px", + "fontFamily" : "Verdana, sans-serif" + }, + "align" : "right", + "y" : 10, + "rotation" : -90, + "format" : "{point.y:.0f}", + "enabled" : "true", + "color" : "#FFFFFF" + } } ], - "subtitle" : { - "text" : "Last updated at 2020-01-29 05:22:01 GMT" - }, "xAxis" : { "type" : "category", "labels" : { @@ -46,18 +49,15 @@ } }, "yAxis" : { + "min" : 0, "title" : { "text" : null - }, - "min" : 0 + } }, - "tooltip" : { - "pointFormat" : "{point.y:.0f}" + "title" : { + "text" : "Perl Weekly Challenge Contributions [2019 - 2020]" }, "legend" : { "enabled" : "false" - }, - "title" : { - "text" : "Perl Weekly Challenge Contributions [2019 - 2020]" } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index 9742177ca9..d26c13361e 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,68 +1,89 @@ { + "legend" : { + "enabled" : "false" + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + } + } + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "title" : { + "text" : "Perl Weekly Challenge Language" + }, + "xAxis" : { + "type" : "category" + }, "series" : [ { - "name" : "Perl Weekly Challenge Languages", - "colorByPoint" : "true", "data" : [ { "name" : "#001", - "y" : 140, - "drilldown" : "001" + "drilldown" : "001", + "y" : 140 }, { + "drilldown" : "002", "name" : "#002", - "y" : 109, - "drilldown" : "002" + "y" : 109 }, { - "drilldown" : "003", "y" : 71, + "drilldown" : "003", "name" : "#003" }, { - "name" : "#004", "y" : 91, - "drilldown" : "004" + "drilldown" : "004", + "name" : "#004" }, { "drilldown" : "005", - "y" : 71, - "name" : "#005" + "name" : "#005", + "y" : 71 }, { "name" : "#006", - "y" : 48, - "drilldown" : "006" + "drilldown" : "006", + "y" : 48 }, { + "y" : 56, "name" : "#007", - "drilldown" : "007", - "y" : 56 + "drilldown" : "007" }, { - "y" : 70, + "name" : "#008", "drilldown" : "008", - "name" : "#008" + "y" : 70 }, { - "y" : 68, + "name" : "#009", "drilldown" : "009", - "name" : "#009" + "y" : 68 }, { - "y" : 60, "drilldown" : "010", - "name" : "#010" + "name" : "#010", + "y" : 60 }, { - "name" : "#011", "y" : 79, - "drilldown" : "011" + "drilldown" : "011", + "name" : "#011" }, { - "drilldown" : "012", "y" : 83, - "name" : "#012" + "name" : "#012", + "drilldown" : "012" }, { "y" : 76, @@ -71,18 +92,18 @@ }, { "y" : 96, - "drilldown" : "014", - "name" : "#014" + "name" : "#014", + "drilldown" : "014" }, { - "drilldown" : "015", "y" : 93, + "drilldown" : "015", "name" : "#015" }, { - "y" : 66, + "name" : "#016", "drilldown" : "016", - "name" : "#016" + "y" : 66 }, { "name" : "#017", @@ -90,103 +111,103 @@ "y" : 79 }, { + "name" : "#018", "drilldown" : "018", - "y" : 76, - "name" : "#018" + "y" : 76 }, { - "name" : "#019", "drilldown" : "019", + "name" : "#019", "y" : 95 }, { + "name" : "#020", "drilldown" : "020", - "y" : 95, - "name" : "#020" + "y" : 95 }, { - "name" : "#021", + "y" : 67, "drilldown" : "021", - "y" : 67 + "name" : "#021" }, { + "y" : 63, "name" : "#022", - "drilldown" : "022", - "y" : 63 + "drilldown" : "022" }, { - "name" : "#023", "drilldown" : "023", + "name" : "#023", "y" : 91 }, { - "y" : 70, "drilldown" : "024", - "name" : "#024" + "name" : "#024", + "y" : 70 }, { "y" : 55, - "drilldown" : "025", - "name" : "#025" + "name" : "#025", + "drilldown" : "025" }, { - "name" : "#026", + "y" : 70, "drilldown" : "026", - "y" : 70 + "name" : "#026" }, { - "y" : 58, + "name" : "#027", "drilldown" : "027", - "name" : "#027" + "y" : 58 }, { + "name" : "#028", "drilldown" : "028", - "y" : 78, - "name" : "#028" + "y" : 78 }, { + "y" : 77, "name" : "#029", - "drilldown" : "029", - "y" : 77 + "drilldown" : "029" }, { - "name" : "#030", "drilldown" : "030", + "name" : "#030", "y" : 115 }, { - "name" : "#031", "drilldown" : "031", + "name" : "#031", "y" : 87 }, { - "name" : "#032", + "y" : 92, "drilldown" : "032", - "y" : 92 + "name" : "#032" }, { "name" : "#033", - "y" : 108, - "drilldown" : "033" + "drilldown" : "033", + "y" : 108 }, { - "name" : "#034", + "y" : 60, "drilldown" : "034", - "y" : 60 + "name" : "#034" }, { - "name" : "#035", + "y" : 60, "drilldown" : "035", - "y" : 60 + "name" : "#035" }, { + "drilldown" : "036", "name" : "#036", - "y" : 61, - "drilldown" : "036" + "y" : 61 }, { - "drilldown" : "037", "y" : 63, + "drilldown" : "037", "name" : "#037" }, { @@ -196,23 +217,23 @@ }, { "name" : "#039", - "y" : 60, - "drilldown" : "039" + "drilldown" : "039", + "y" : 60 }, { - "drilldown" : "040", "y" : 66, - "name" : "#040" + "name" : "#040", + "drilldown" : "040" }, { "y" : 68, - "drilldown" : "041", - "name" : "#041" + "name" : "#041", + "drilldown" : "041" }, { + "drilldown" : "042", "name" : "#042", - "y" : 87, - "drilldown" : "042" + "y" : 87 }, { "y" : 64, @@ -220,19 +241,31 @@ "name" : "#043" }, { - "y" : 64, + "name" : "#044", "drilldown" : "044", - "name" : "#044" + "y" : 68 } - ] + ], + "name" : "Perl Weekly Challenge Languages", + "colorByPoint" : "true" } ], + "tooltip" : { + "pointFormat" : "Challenge {point.name}: {point.y:f}
", + "headerFormat" : "", + "followPointer" : "true" + }, "chart" : { "type" : "column" }, + "subtitle" : { + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2020-01-29 05:34:42 GMT" + }, "drilldown" : { "series" : [ { + "id" : "001", + "name" : "001", "data" : [ [ "Perl", @@ -246,11 +279,10 @@ "Blog", 11 ] - ], - "id" : "001", - "name" : "001" + ] }, { + "name" : "002", "data" : [ [ "Perl", @@ -265,10 +297,10 @@ 10 ] ], - "id" : "002", - "name" : "002" + "id" : "002" }, { + "id" : "003", "data" : [ [ "Perl", @@ -283,11 +315,10 @@ 9 ] ], - "id" : "003", "name" : "003" }, { - "id" : "004", + "name" : "004", "data" : [ [ "Perl", @@ -302,9 +333,10 @@ 10 ] ], - "name" : "004" + "id" : "004" }, { + "id" : "005", "data" : [ [ "Perl", @@ -319,7 +351,6 @@ 12 ] ], - "id" : "005", "name" : "005" }, { @@ -341,6 +372,7 @@ "name" : "006" }, { + "id" : "007", "data" : [ [ "Perl", @@ -355,12 +387,11 @@ 10 ] ], - "id" : "007", "name" : "007" }, { - "name" : "008", "id" : "008", + "name" : "008", "data" : [ [ "Perl", @@ -377,6 +408,8 @@ ] }, { + "id" : "009", + "name" : "009", "data" : [ [ "Perl", @@ -390,13 +423,10 @@ "Blog", 13 ] - ], - "id" : "009", - "name" : "009" + ] }, { "name" : "010", - "id" : "010", "data" : [ [ "Perl", @@ -410,9 +440,12 @@ "Blog", 11 ] - ] + ], + "id" : "010" }, { + "id" : "011", + "name" : "011", "data" : [ [ "Perl", @@ -426,12 +459,11 @@ "Blog", 10 ] - ], - "id" : "011", - "name" : "011" + ] }, { "id" : "012", + "name" : "012", "data" : [ [ "Perl", @@ -445,10 +477,10 @@ "Blog", 11 ] - ], - "name" : "012" + ] }, { + "id" : "013", "name" : "013", "data" : [ [ @@ -463,8 +495,7 @@ "Blog", 13 ] - ], - "id" : "013" + ] }, { "id" : "014", @@ -486,6 +517,7 @@ }, { "id" : "015", + "name" : "015", "data" : [ [ "Perl", @@ -499,10 +531,10 @@ "Blog", 15 ] - ], - "name" : "015" + ] }, { + "name" : "016", "data" : [ [ "Perl", @@ -517,8 +549,7 @@ 12 ] ], - "id" : "016", - "name" : "016" + "id" : "016" }, { "data" : [ @@ -535,11 +566,10 @@ 12 ] ], - "id" : "017", - "name" : "017" + "name" : "017", + "id" : "017" }, { - "id" : "018", "data" : [ [ "Perl", @@ -554,9 +584,11 @@ 14 ] ], - "name" : "018" + "name" : "018", + "id" : "018" }, { + "id" : "019", "data" : [ [ "Perl", @@ -571,11 +603,9 @@ 13 ] ], - "id" : "019", "name" : "019" }, { - "id" : "020", "data" : [ [ "Perl", @@ -590,9 +620,11 @@ 13 ] ], - "name" : "020" + "name" : "020", + "id" : "020" }, { + "id" : "021", "data" : [ [ "Perl", @@ -607,11 +639,11 @@ 10 ] ], - "id" : "021", "name" : "021" }, { "id" : "022", + "name" : "022", "data" : [ [ "Perl", @@ -625,11 +657,11 @@ "Blog", 10 ] - ], - "name" : "022" + ] }, { "id" : "023", + "name" : "023", "data" : [ [ "Perl", @@ -643,10 +675,10 @@ "Blog", 12 ] - ], - "name" : "023" + ] }, { + "id" : "024", "name" : "024", "data" : [ [ @@ -661,11 +693,11 @@ "Blog", 11 ] - ], - "id" : "024" + ] }, { "id" : "025", + "name" : "025", "data" : [ [ "Perl", @@ -679,8 +711,7 @@ "Blog", 12 ] - ], - "name" : "025" + ] }, { "id" : "026", @@ -701,8 +732,6 @@ "name" : "026" }, { - "name" : "027", - "id" : "027", "data" : [ [ "Perl", @@ -716,7 +745,9 @@ "Blog", 9 ] - ] + ], + "name" : "027", + "id" : "027" }, { "name" : "028", @@ -737,7 +768,7 @@ "id" : "028" }, { - "id" : "029", + "name" : "029", "data" : [ [ "Perl", @@ -752,10 +783,11 @@ 12 ] ], - "name" : "029" + "id" : "029" }, { "id" : "030", + "name" : "030", "data" : [ [ "Perl", @@ -769,11 +801,9 @@ "Blog", 10 ] - ], - "name" : "030" + ] }, { - "name" : "031", "id" : "031", "data" : [ [ @@ -788,7 +818,8 @@ "Blog", 9 ] - ] + ], + "name" : "031" }, { "name" : "032", @@ -809,7 +840,7 @@ "id" : "032" }, { - "id" : "033", + "name" : "033", "data" : [ [ "Perl", @@ -824,9 +855,10 @@ 10 ] ], - "name" : "033" + "id" : "033" }, { + "id" : "034", "name" : "034", "data" : [ [ @@ -841,11 +873,9 @@ "Blog", 11 ] - ], - "id" : "034" + ] }, { - "id" : "035", "data" : [ [ "Perl", @@ -860,10 +890,12 @@ 9 ] ], - "name" : "035" + "name" : "035", + "id" : "035" }, { "id" : "036", + "name" : "036", "data" : [ [ "Perl", @@ -877,8 +909,7 @@ "Blog", 10 ] - ], - "name" : "036" + ] }, { "id" : "037", @@ -899,7 +930,7 @@ "name" : "037" }, { - "name" : "038", + "id" : "038", "data" : [ [ "Perl", @@ -914,7 +945,7 @@ 11 ] ], - "id" : "038" + "name" : "038" }, { "id" : "039", @@ -936,6 +967,7 @@ }, { "id" : "040", + "name" : "040", "data" : [ [ "Perl", @@ -949,12 +981,11 @@ "Blog", 9 ] - ], - "name" : "040" + ] }, { - "name" : "041", "id" : "041", + "name" : "041", "data" : [ [ "Perl", @@ -971,6 +1002,8 @@ ] }, { + "id" : "042", + "name" : "042", "data" : [ [ "Perl", @@ -984,9 +1017,7 @@ "Blog", 10 ] - ], - "id" : "042", - "name" : "042" + ] }, { "name" : "043", @@ -1007,54 +1038,23 @@ "id" : "043" }, { + "id" : "044", + "name" : "044", "data" : [ [ "Perl", - 35 + 37 ], [ "Raku", - 22 + 24 ], [ "Blog", 7 ] - ], - "id" : "044", - "name" : "044" + ] } ] - }, - "xAxis" : { - "type" : "category" - }, - "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2020-01-29 05:22:01 GMT" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "plotOptions" : { - "series" : { - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - }, - "borderWidth" : 0 - } - }, - "tooltip" : { - "followPointer" : "true", - "pointFormat" : "Challenge {point.name}: {point.y:f}
", - "headerFormat" : "" - }, - "legend" : { - "enabled" : "false" - }, - "title" : { - "text" : "Perl Weekly Challenge Language" } } diff --git a/stats/pwc-leaders.json b/stats/pwc-leaders.json index 90fd692e76..aae248a376 100644 --- a/stats/pwc-leaders.json +++ b/stats/pwc-leaders.json @@ -1,9 +1,6 @@ { - "title" : { - "text" : "Perl Weekly Challenge Leaders (TOP 50)" - }, - "chart" : { - "type" : "column" + "xAxis" : { + "type" : "category" }, "series" : [ { @@ -11,33 +8,33 @@ "data" : [ { "y" : 546, - "drilldown" : "Laurent Rosenfeld", - "name" : "#1: Laurent Rosenfeld" + "name" : "#1: Laurent Rosenfeld", + "drilldown" : "Laurent Rosenfeld" }, { - "name" : "#2: Ruben Westerberg", "y" : 348, + "name" : "#2: Ruben Westerberg", "drilldown" : "Ruben Westerberg" }, { "name" : "#3: Jaldhar H. Vyas", - "y" : 346, - "drilldown" : "Jaldhar H. Vyas" + "drilldown" : "Jaldhar H. Vyas", + "y" : 346 }, { "name" : "#4: Joelle Maslak", - "y" : 334, - "drilldown" : "Joelle Maslak" + "drilldown" : "Joelle Maslak", + "y" : 334 }, { + "name" : "#5: Adam Russell", "drilldown" : "Adam Russell", - "y" : 294, - "name" : "#5: Adam Russell" + "y" : 294 }, { "y" : 270, - "drilldown" : "Arne Sommer", - "name" : "#6: Arne Sommer" + "name" : "#6: Arne Sommer", + "drilldown" : "Arne Sommer" }, { "name" : "#7: Roger Bell West", @@ -45,28 +42,28 @@ "y" : 244 }, { - "name" : "#8: E. Choroba", "y" : 236, + "name" : "#8: E. Choroba", "drilldown" : "E. Choroba" }, { - "name" : "#9: Athanasius", "y" : 208, + "name" : "#9: Athanasius", "drilldown" : "Athanasius" }, { - "name" : "#10: Andrezgz", "y" : 178, + "name" : "#10: Andrezgz", "drilldown" : "Andrezgz" }, { "name" : "#11: Simon Proctor", - "y" : 170, - "drilldown" : "Simon Proctor" + "drilldown" : "Simon Proctor", + "y" : 170 }, { - "name" : "#12: Kian-Meng Ang", "y" : 162, + "name" : "#12: Kian-Meng Ang", "drilldown" : "Kian-Meng Ang" }, { @@ -76,23 +73,23 @@ }, { "y" : 146, - "drilldown" : "Dave Jacoby", - "name" : "#14: Dave Jacoby" + "name" : "#14: Dave Jacoby", + "drilldown" : "Dave Jacoby" }, { + "y" : 138, "name" : "#15: Ryan Thompson", - "drilldown" : "Ryan Thompson", - "y" : 138 + "drilldown" : "Ryan Thompson" }, { - "name" : "#16: Javier Luque", "drilldown" : "Javier Luque", + "name" : "#16: Javier Luque", "y" : 130 }, { + "name" : "#17: Steven Wilson", "drilldown" : "Steven Wilson", - "y" : 128, - "name" : "#17: Steven Wilson" + "y" : 128 }, { "name" : "#18: Duane Powell", @@ -100,34 +97,34 @@ "y" : 116 }, { + "y" : 116, "name" : "#19: Kevin Colyer", - "drilldown" : "Kevin Colyer", - "y" : 116 + "drilldown" : "Kevin Colyer" }, { "name" : "#20: Yet Ebreo", "drilldown" : "Yet Ebreo", "y" : 114 }, + { + "y" : 104, + "name" : "#21: Colin Crain", + "drilldown" : "Colin Crain" + }, { "y" : 100, "drilldown" : "Burkhard Nickels", - "name" : "#21: Burkhard Nickels" + "name" : "#22: Burkhard Nickels" }, { - "drilldown" : "Noud Aldenhoven", "y" : 98, - "name" : "#22: Noud Aldenhoven" - }, - { - "name" : "#23: Colin Crain", - "y" : 96, - "drilldown" : "Colin Crain" + "drilldown" : "Noud Aldenhoven", + "name" : "#23: Noud Aldenhoven" }, { - "drilldown" : "Francis Whittle", "y" : 96, - "name" : "#24: Francis Whittle" + "name" : "#24: Francis Whittle", + "drilldown" : "Francis Whittle" }, { "y" : 88, @@ -136,18 +133,18 @@ }, { "name" : "#26: Daniel Mantovani", - "y" : 86, - "drilldown" : "Daniel Mantovani" + "drilldown" : "Daniel Mantovani", + "y" : 86 }, { - "drilldown" : "Lubos Kolouch", "y" : 84, + "drilldown" : "Lubos Kolouch", "name" : "#27: Lubos Kolouch" }, { "y" : 80, - "drilldown" : "Mark Senn", - "name" : "#28: Mark Senn" + "name" : "#28: Mark Senn", + "drilldown" : "Mark Senn" }, { "y" : 72, @@ -155,24 +152,24 @@ "name" : "#29: Gustavo Chaves" }, { - "name" : "#30: Yozen Hernandez", "y" : 70, - "drilldown" : "Yozen Hernandez" + "drilldown" : "Yozen Hernandez", + "name" : "#30: Yozen Hernandez" }, { - "name" : "#31: Ulrich Rieke", "y" : 68, - "drilldown" : "Ulrich Rieke" + "drilldown" : "Ulrich Rieke", + "name" : "#31: Ulrich Rieke" }, { - "drilldown" : "Guillermo Ramos", "y" : 64, + "drilldown" : "Guillermo Ramos", "name" : "#32: Guillermo Ramos" }, { - "y" : 60, "drilldown" : "Jo Christian Oterhals", - "name" : "#33: Jo Christian Oterhals" + "name" : "#33: Jo Christian Oterhals", + "y" : 60 }, { "y" : 56, @@ -180,23 +177,23 @@ "name" : "#34: Ozzy" }, { - "drilldown" : "Dr James A. Smith", "y" : 52, + "drilldown" : "Dr James A. Smith", "name" : "#35: Dr James A. Smith" }, { + "y" : 52, "name" : "#36: Markus Holzer", - "drilldown" : "Markus Holzer", - "y" : 52 + "drilldown" : "Markus Holzer" }, { + "y" : 52, "name" : "#37: Randy Lauen", - "drilldown" : "Randy Lauen", - "y" : 52 + "drilldown" : "Randy Lauen" }, { - "name" : "#38: Daniel Mita", "y" : 48, + "name" : "#38: Daniel Mita", "drilldown" : "Daniel Mita" }, { @@ -206,63 +203,83 @@ }, { "drilldown" : "Veesh Goldman", - "y" : 44, - "name" : "#40: Veesh Goldman" + "name" : "#40: Veesh Goldman", + "y" : 44 }, { - "y" : 38, "drilldown" : "Lars Balker", - "name" : "#41: Lars Balker" + "name" : "#41: Lars Balker", + "y" : 38 }, { "name" : "#42: Saif Ahmed", - "y" : 38, - "drilldown" : "Saif Ahmed" + "drilldown" : "Saif Ahmed", + "y" : 38 }, { - "name" : "#43: Alicia Bielsa", + "y" : 32, "drilldown" : "Alicia Bielsa", - "y" : 32 + "name" : "#43: Alicia Bielsa" }, { + "y" : 32, "name" : "#44: Kivanc Yazan", - "drilldown" : "Kivanc Yazan", - "y" : 32 + "drilldown" : "Kivanc Yazan" }, { "name" : "#45: Mark Anderson", - "y" : 32, - "drilldown" : "Mark Anderson" + "drilldown" : "Mark Anderson", + "y" : 32 }, { + "drilldown" : "Nick Logan", "name" : "#46: Nick Logan", - "y" : 32, - "drilldown" : "Nick Logan" + "y" : 32 }, { - "name" : "#47: Pete Houston", "y" : 28, - "drilldown" : "Pete Houston" + "drilldown" : "Pete Houston", + "name" : "#47: Pete Houston" }, { - "name" : "#48: Walt Mankowski", "y" : 26, + "name" : "#48: Walt Mankowski", "drilldown" : "Walt Mankowski" }, { - "name" : "#49: Jaime Corchado", "drilldown" : "Jaime Corchado", + "name" : "#49: Jaime Corchado", "y" : 24 }, { - "drilldown" : "Lars Thegler", "y" : 24, + "drilldown" : "Lars Thegler", "name" : "#50: Lars Thegler" } ], "colorByPoint" : "true" } ], + "title" : { + "text" : "Perl Weekly Challenge Leaders (TOP 50)" + }, + "yAxis" : { + "title" : { + "text" : "Total Score" + } + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + } + } + }, + "legend" : { + "enabled" : "false" + }, "drilldown" : { "series" : [ { @@ -284,8 +301,8 @@ "id" : "Laurent Rosenfeld" }, { - "name" : "Ruben Westerberg", "id" : "Ruben Westerberg", + "name" : "Ruben Westerberg", "data" : [ [ "Perl", @@ -298,7 +315,7 @@ ] }, { - "name" : "Jaldhar H. Vyas", + "id" : "Jaldhar H. Vyas", "data" : [ [ "Blog", @@ -313,10 +330,9 @@ 74 ] ], - "id" : "Jaldhar H. Vyas" + "name" : "Jaldhar H. Vyas" }, { - "id" : "Joelle Maslak", "data" : [ [ "Blog", @@ -331,9 +347,11 @@ 81 ] ], - "name" : "Joelle Maslak" + "name" : "Joelle Maslak", + "id" : "Joelle Maslak" }, { + "id" : "Adam Russell", "name" : "Adam Russell", "data" : [ [ @@ -348,10 +366,11 @@ "Raku", 9 ] - ], - "id" : "Adam Russell" + ] }, { + "id" : "Arne Sommer", + "name" : "Arne Sommer", "data" : [ [ "Blog", @@ -365,11 +384,10 @@ "Raku", 88 ] - ], - "id" : "Arne Sommer", - "name" : "Arne Sommer" + ] }, { + "name" : "Roger Bell West", "data" : [ [ "Blog", @@ -384,8 +402,7 @@ 39 ] ], - "id" : "Roger Bell West", - "name" : "Roger Bell West" + "id" : "Roger Bell West" }, { "data" : [ @@ -398,11 +415,11 @@ 81 ] ], - "id" : "E. Choroba", - "name" : "E. Choroba" + "name" : "E. Choroba", + "id" : "E. Choroba" }, { - "name" :