From 2cb2ee4c9620cfd800092e29423ab09779793ced Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Sun, 30 May 2021 22:54:54 +0100 Subject: - Added solutions by Colin Crain. --- challenge-114/colin-crain/perl/ch-1.pl | 116 + challenge-114/colin-crain/perl/ch-2.pl | 182 ++ challenge-114/colin-crain/raku/ch-1.raku | 38 + challenge-114/colin-crain/raku/ch-2.raku | 67 + stats/pwc-current.json | 270 +- stats/pwc-language-breakdown-summary.json | 62 +- stats/pwc-language-breakdown.json | 4506 ++++++++++++++--------------- stats/pwc-leaders.json | 766 ++--- stats/pwc-summary-1-30.json | 56 +- stats/pwc-summary-121-150.json | 34 +- stats/pwc-summary-151-180.json | 110 +- stats/pwc-summary-181-210.json | 90 +- stats/pwc-summary-211-240.json | 66 +- stats/pwc-summary-31-60.json | 114 +- stats/pwc-summary-61-90.json | 32 +- stats/pwc-summary-91-120.json | 94 +- stats/pwc-summary.json | 36 +- 17 files changed, 3525 insertions(+), 3114 deletions(-) create mode 100644 challenge-114/colin-crain/perl/ch-1.pl create mode 100644 challenge-114/colin-crain/perl/ch-2.pl create mode 100644 challenge-114/colin-crain/raku/ch-1.raku create mode 100644 challenge-114/colin-crain/raku/ch-2.raku diff --git a/challenge-114/colin-crain/perl/ch-1.pl b/challenge-114/colin-crain/perl/ch-1.pl new file mode 100644 index 0000000000..df6ae6f1d0 --- /dev/null +++ b/challenge-114/colin-crain/perl/ch-1.pl @@ -0,0 +1,116 @@ +#!/users/colincrain/perl5/perlbrew/perls/perl-5.32.0/bin/perl +# +# your-next-pal.pl +# +# next palindrome number +# submitted by: mohammad s anwar +# you are given a positive integer $n. +# +# write a script to find out the next palindrome number higher than the +# given integer $n. +# +# example +# +# input: $n = 1234 +# output: 1331 +# +# input: $n = 999 +# output: 1001 +# +# method: +# on first look. i thought this would be more comlicated than it was. +# i even went over to pwc 095 and fetched my palindrome regex. armed +# and ready, another look revealed i might not be needing it after +# all. +# +# a palindromic number is constructed from a rigid set of rules, with +# the least significant digits exactly mirroring the most. a central +# pivot digit, if present, can be said to mirror and map to itself. if +# we follow the rules in construction then there's no need to validate +# it as we will already know it will conform. +# +# to construct the next number in a an ordered sequence of numbers, we +# need to start with the least significant digits, lest we skip over +# one of these values and find ourselves out-of-order. +# +# in a palindrome, however, the idea of which is the least significant +# digit itself gets altered. The tail of the number is fixed by the +# forward half, and any alterations to one requires a matching change +# in the other. + +# The smallest value, therefore, becomes immutably tied to the value +# of the largest, and to find the next number in the sequence we +# need to effect the smallest change possible, the smallest +# increment. +# +# The least significant change to increment, should we +# require this, is the central pivot digit, if present, or failing +# that the two central digits, which must be increased together. +# These are the smallest digits that will change between adjacent +# palindromic numbers. +# +# The first course of action, it seems, is to conform our base number +# to palindrome status. We can do this by constructing a palindrome +# by taking the front half of the number, mirroring a matching +# tail and gluing them +# together. + +# if this number is greater than the base value then that is already the +# next larger palindrome and we are done. Any decrease in the +# central pivot, or any higher valued digit position, will produce a +# value smaller than the base. If the palindrom ewe produce is is +# not, however, larger than the base we need a palindrome that is. +# Now the same logic applies to increasing the pivot value: the base +# must be lower in value than the new palindrome as one of the +# central digits will be smaller and all digits composing the number +# above that will be same. + +# We will produce two routines, one to produce the simple palindrome +# from the base, and one to produce the next palindrome. One will be +# called and if necessary the second will follow. +# +# +# © 2021 colin crain +## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + + + +use warnings; +use strict; +use feature ":5.26"; +use feature qw(signatures); +no warnings 'experimental::signatures'; + +my $number = shift // 34987; +$number += 0; ## numification is important + +say "Input: ", $number; +say "Output: ", get_next_palindrome($number); + +sub get_next_palindrome ($num) { + my $base = make_p($num); + if ($base < $num) { + return make_inc_p($num); + } + return $base; +} + +sub make_p ($num) { + my $len = length $num; + my $head = substr $num, 0, $len - int($len/2); + my $tail = reverse substr $head, 0, $len/2; + return $head . $tail; +} + +sub make_inc_p ($num) { + my $len = length $num; + my $head = substr $num, 0, $len - int($len/2); + $head++; + my $tail = reverse substr $head, 0, $len/2; + return $head . $tail; +} + +sub is_palin ($num) { +## from PWC 095, neat but ultimately not used + return $num =~ m/^(.*).?(??{reverse($1)})$/; +} diff --git a/challenge-114/colin-crain/perl/ch-2.pl b/challenge-114/colin-crain/perl/ch-2.pl new file mode 100644 index 0000000000..185abd5706 --- /dev/null +++ b/challenge-114/colin-crain/perl/ch-2.pl @@ -0,0 +1,182 @@ +#!/Users/colincrain/perl5/perlbrew/perls/perl-5.32.0/bin/perl +# +# the-weight-of-ham.pl +# +# Higher Integer Set Bits +# Submitted by: Mohammad S Anwar +# You are given a positive integer $N. +# +# Write a script to find the next higher integer having the same number +# of 1 bits in binary representation as $N. +# +# Example +# +# Input: $N = 3 +# Output: 5 +# +# Binary representation of $N is 011. There are two 1 bits. So +# the next higher integer is 5 having the same the number of 1 +# bits i.e. 101. +# +# Input: $N = 12 +# Output: 17 +# +# Binary representation of $N is 1100. There are two 1 bits. So +# the next higher integer is 17 having the same number of 1 bits +# i.e. 10001. +# +# method: +# We could brute force this, by creating a popcount() function and +# incrementing until we circle around again. This sounds boring for +# large numbers but I reserve the right to fall back on it. +# +# Mathematically, the number of 1s in a binary representation, or +# population count, is known as the Hamming weight, or perhaps more +# accurately a select case of the Hamming weight for binary numbers. +# The Hamming weight counts the non-zero values, so the weight for +# the number 43210 is 4, as 4 of the 5 digits are not zero. +# +# When we talk about "weight" here, or "Hamming weight" let it be +# understood that we're always talking about binary strings, not a +# more general case. +# +# The first thing we do is compare a bunch of binary numbers grouped +# by their weight. Theres a pattern there, but exactly what that +# pattern is is elusive, shall we say. +# +# Our first observation is that when we add one to a number, the +# weight will increase if the number is even, which we don't want. +# If the number is odd the last bit will carry and the number will +# then become even. The carrying may or may not trigger a cascading +# effect. Generally this reduces the weight, or leaves it the same. +# +# If the weight is reduced, we can always add 1 to it until the +# weight arrives again at the desired value. +# +# So if we add 1 to any number it will either increase the weight or +# trigger a carry which will either lower the weight or keep it the +# same. This is true every time we increment the number. A single +# bit carried forward into a 0 keeps the weight the same. We've +# taken away a single 1 but also have added a 1 for a neutral +# result. The only way to lower a weight is to trigger a cascade of +# carries that flip a series of bits together, such as when we roll +# over into a power of 2: 01111 + 1 = 10000 +# +# Its not much but it's a start. Our plan is to jump ahead over any +# values with larger weights, straight to a cascading event and then +# if necessary build the weight up again. We want to avoid ever +# increasing the weight when we are at weight already. +# +# When we add 1 to a number, we add to the least significant digit. +# If that's a 1, then the number is odd and we're good, but if it's +# a 0 the weight will ncrease, which is bad. So what if we add the 1 +# to the least significant 1 instead? This will trigger a carry and +# the weight will remain the same or lower. If it is the same that +# will be the next number with the same weight and if it is lower we +# can build it up again. +# +# This plan indeed works. We construct a function to yield the +# 0-based least significant set bit, and if we add 2 to this power +# then this triggers a carry. +# +# The result of this function is a number equal to or less than the +# next number with the same Hamming weight, often skipping over a +# range of values. We're homing in on it now. As we've carried the +# least significant set bit, the number will now end in a sequence +# of 0s, one more than before. We now need to add as many 1s to that +# space as required to get the weight correct. Again we could +# increment the number and that would eventually work. But if we +# take the difference between the Hamming weight of the new carried +# value and our target weight we get the quantity of 1s neccessary +# to equalize the two. We can then construct a new value from binary +# 1s and add that to make up the difference. +# +# The smallest value containinga set number of 1s is a string of 1s +# of the required length, and the way to construct this number is to +# raise 2 to the required 1s and then subtract 1: +# +# 2^4 - 1 = 1111 +# +# This corrects the weight difference. Our function to find the next +# number with the same number of 1s in its binary representation is +# to first trigger a carry in the lowest significant set bit and +# then add a number composed of enough 1s to make up any difference. + +# +# © 2021 colin crain +## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + + + +use warnings; +use strict; +use feature ":5.26"; +use feature qw(signatures); +no warnings 'experimental::signatures'; +use List::Util qw(sum); + +for (1..32) { + say sprintf "%-8d %-d", $_, next_hamming_weight($_); +} + + + +sub next_hamming_weight( $num ) { + my $ham = hamming( $num ); + my $trip = trip_carry($num); + my $next = $trip + ones( $ham - hamming($trip) ); + return $next; +} + +sub hamming ($num) { +## given number, returns count of 1s in binary representation + my $bin = sprintf "%b", $num; + my $bits = sum (split //, $bin); + return $bits; +} + +sub trip_carry ($num) { +## given a number, trip the carry on the lowest significant set bit +## 10101000 -> 10110000 + my $ls = lowsig($num); + my $trip = 2**$ls; + return $num + $trip; +} + +sub lowsig ($num) { +# returns lowest significant set bit position, 0-based + return 0 if ! $num; + my $pos = 0; + while ( !( $num & 1) ) { + $num >>= 1; + $pos++; + } + return $pos; +} + +sub ones ($count) { +## returns decimal value of binary string composed from $count x 1s +## ->(3) = 0b111 = 7 + return 2**$count - 1; +} + + + + + + + + + + + + + + + + +# use Test::More; +# +# is +# +# done_testing(); diff --git a/challenge-114/colin-crain/raku/ch-1.raku b/challenge-114/colin-crain/raku/ch-1.raku new file mode 100644 index 0000000000..628a4c7e53 --- /dev/null +++ b/challenge-114/colin-crain/raku/ch-1.raku @@ -0,0 +1,38 @@ +#!/usr/bin/env perl6 +# +# +# your-next-pal.raku +# +# next palindrome number +# submitted by: mohammad s anwar +# you are given a positive integer $n. +# +# write a script to find out the next palindrome number higher than the +# given integer $n. +# +# example +# +# input: $n = 1234 +# output: 1331 +# +# input: $n = 999 +# output: 1001 +# +# +# © 2021 colin crain +## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + + + +unit sub MAIN ($num = 20001) ; + +say next-p( $num ); + +sub next-p ($n) { + my $half = $n.substr( 0, ceiling($n.chars/2) ); + $n.substr( *-floor($n.chars/2) ) > $half.substr(0, floor($n.chars/2)).flip + && $half++; + $half ~ $half.substr(0, floor($n.chars/2)).flip; +} + + diff --git a/challenge-114/colin-crain/raku/ch-2.raku b/challenge-114/colin-crain/raku/ch-2.raku new file mode 100644 index 0000000000..c7612d7c74 --- /dev/null +++ b/challenge-114/colin-crain/raku/ch-2.raku @@ -0,0 +1,67 @@ +#!/usr/bin/env perl6 +# +# +# the-weight-of-ham.raku +# +# Higher Integer Set Bits +# Submitted by: Mohammad S Anwar +# You are given a positive integer $N. +# +# Write a script to find the next higher integer having the same number +# of 1 bits in binary representation as $N. +# +# Example +# +# Input: $N = 3 +# Output: 5 +# +# Binary representation of $N is 011. There are two 1 bits. So +# the next higher integer is 5 having the same the number of 1 +# bits i.e. 101. +# +# Input: $N = 12 +# Output: 17 +# +# Binary representation of $N is 1100. There are two 1 bits. So +# the next higher integer is 17 having the same number of 1 bits +# i.e. 10001. +# +# +# © 2021 colin crain +## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + + + +unit sub MAIN ( Int $num where $num > 1 = 127) ; + +say next_hamming_weight( $num ); + +sub next_hamming_weight( $num ) { + my $trip = trip_carry($num); + return $trip + ones( hamming($num) - hamming($trip) ); + + sub ones ($count) { 2**$count - 1 } + sub hamming ($num) { $num.base(2) + .comb + .sum } +} + +sub trip_carry ($num) { +## given a number, trip the carry on the lowest significant set bit +## 10101000 -> 10110000 + my $ls = lowsig($num); + my $trip = 2**$ls; + return $num + $trip; + + sub lowsig ($num is copy, $pos is copy = 0 ) { + # returns lowest significant set bit position, 0-based + until $num +& 1 { + $num +>= 1; + $pos++; + } + $pos; + } +} + + + diff --git a/stats/pwc-current.json b/stats/pwc-current.json index b21d6bf3bf..e4fdac8d60 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -2,9 +2,15 @@ "xAxis" : { "type" : "category" }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, "drilldown" : { "series" : [ { + "name" : "Aaron Smith", "data" : [ [ "Raku", @@ -15,11 +21,9 @@ 1 ] ], - "id" : "Aaron Smith", - "name" : "Aaron Smith" + "id" : "Aaron Smith" }, { - "name" : "Abigail", "id" : "Abigail", "data" : [ [ @@ -30,10 +34,10 @@ "Blog", 2 ] - ] + ], + "name" : "Abigail" }, { - "id" : "Adam Russell", "name" : "Adam Russell", "data" : [ [ @@ -44,9 +48,11 @@ "Blog", 2 ] - ] + ], + "id" : "Adam Russell" }, { + "id" : "Arne Sommer", "data" : [ [ "Perl", @@ -61,11 +67,9 @@ 1 ] ], - "id" : "Arne Sommer", "name" : "Arne Sommer" }, { - "name" : "Athanasius", "id" : "Athanasius", "data" : [ [ @@ -76,27 +80,28 @@ "Raku", 2 ] - ] + ], + "name" : "Athanasius" }, { - "name" : "Ben Davies", - "id" : "Ben Davies", "data" : [ [ "Raku", 2 ] - ] + ], + "name" : "Ben Davies", + "id" : "Ben Davies" }, { - "id" : "Cheok-Yin Fung", "name" : "Cheok-Yin Fung", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Cheok-Yin Fung" }, { "data" : [ @@ -113,9 +118,17 @@ "id" : "Christian Jaeger" }, { - "name" : "Colin Crain", "id" : "Colin Crain", + "name" : "Colin Crain", "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], [ "Blog", 1 @@ -133,6 +146,7 @@ ] }, { + "id" : "Dave Jacoby", "data" : [ [ "Perl", @@ -143,42 +157,40 @@ 1 ] ], - "id" : "Dave Jacoby", "name" : "Dave Jacoby" }, { - "id" : "Duncan C. White", "name" : "Duncan C. White", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Duncan C. White" }, { + "name" : "E. Choroba", "data" : [ [ "Perl", 2 ] ], - "id" : "E. Choroba", - "name" : "E. Choroba" + "id" : "E. Choroba" }, { - "id" : "Feng Chang", "name" : "Feng Chang", "data" : [ [ "Raku", 2 ] - ] + ], + "id" : "Feng Chang" }, { "id" : "Flavio Poletti", - "name" : "Flavio Poletti", "data" : [ [ "Perl", @@ -192,11 +204,12 @@ "Blog", 2 ] - ] + ], + "name" : "Flavio Poletti" }, { - "name" : "James Smith", "id" : "James Smith", + "name" : "James Smith", "data" : [ [ "Perl", @@ -209,24 +222,24 @@ ] }, { + "name" : "Jan Krnavek", "data" : [ [ "Raku", 2 ] ], - "name" : "Jan Krnavek", "id" : "Jan Krnavek" }, { - "id" : "Joan Mimosinnet", "name" : "Joan Mimosinnet", "data" : [ [ "Raku", 2 ] - ] + ], + "id" : "Joan Mimosinnet" }, { "id" : "Jorg Sommrey", @@ -239,16 +252,17 @@ ] }, { - "id" : "Lance Wicks", "name" : "Lance Wicks", "data" : [ [ "Perl", 1 ] - ] + ], + "id" : "Lance Wicks" }, { + "id" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -263,10 +277,10 @@ 1 ] ], - "name" : "Laurent Rosenfeld", - "id" : "Laurent Rosenfeld" + "name" : "Laurent Rosenfeld" }, { + "id" : "Luca Ferrari", "data" : [ [ "Raku", @@ -277,18 +291,17 @@ 2 ] ], - "id" : "Luca Ferrari", "name" : "Luca Ferrari" }, { - "id" : "Mark Anderson", "name" : "Mark Anderson", "data" : [ [ "Raku", 2 ] - ] + ], + "id" : "Mark Anderson" }, { "data" : [ @@ -311,17 +324,16 @@ "id" : "Niels van Dijke" }, { + "id" : "Pete Houston", "data" : [ [ "Perl", 2 ] ], - "name" : "Pete Houston", - "id" : "Pete Houston" + "name" : "Pete Houston" }, { - "id" : "Roger Bell_West", "name" : "Roger Bell_West", "data" : [ [ @@ -336,9 +348,11 @@ "Blog", 1 ] - ] + ], + "id" : "Roger Bell_West" }, { + "name" : "Simon Green", "data" : [ [ "Perl", @@ -349,7 +363,6 @@ 1 ] ], - "name" : "Simon Green", "id" : "Simon Green" }, { @@ -363,6 +376,7 @@ "id" : "Simon Proctor" }, { + "id" : "Stuart Little", "data" : [ [ "Perl", @@ -373,10 +387,11 @@ 2 ] ], - "id" : "Stuart Little", "name" : "Stuart Little" }, { + "id" : "Ulrich Rieke", + "name" : "Ulrich Rieke", "data" : [ [ "Perl", @@ -386,11 +401,10 @@ "Raku", 2 ] - ], - "id" : "Ulrich Rieke", - "name" : "Ulrich Rieke" + ] }, { + "id" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -401,138 +415,113 @@ 1 ] ], - "id" : "W. Luis Mochan", "name" : "W. Luis Mochan" }, { - "name" : "Wanderdoc", - "id" : "Wanderdoc", "data" : [ [ "Perl", 1 ] - ] + ], + "name" : "Wanderdoc", + "id" : "Wanderdoc" } ] }, - "tooltip" : { - "pointFormat" : "{point.name}: {point.y:f}
", - "followPointer" : 1, - "headerFormat" : "{series.name}
" - }, - "subtitle" : { - "text" : "[Champions: 33] Last updated at 2021-05-30 21:40:09 GMT" - }, - "plotOptions" : { - "series" : { - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - }, - "borderWidth" : 0 - } - }, "legend" : { "enabled" : 0 }, - "chart" : { - "type" : "column" - }, - "title" : { - "text" : "Perl Weekly Challenge - 114" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } + "subtitle" : { + "text" : "[Champions: 33] Last updated at 2021-05-30 21:54:36 GMT" }, "series" : [ { + "name" : "Perl Weekly Challenge - 114", "data" : [ { - "name" : "Aaron Smith", "y" : 3, - "drilldown" : "Aaron Smith" + "drilldown" : "Aaron Smith", + "name" : "Aaron Smith" }, { - "drilldown" : "Abigail", "y" : 4, - "name" : "Abigail" + "name" : "Abigail", + "drilldown" : "Abigail" }, { - "drilldown" : "Adam Russell", "y" : 4, - "name" : "Adam Russell" + "name" : "Adam Russell", + "drilldown" : "Adam Russell" }, { + "drilldown" : "Arne Sommer", "name" : "Arne Sommer", - "y" : 5, - "drilldown" : "Arne Sommer" + "y" : 5 }, { + "name" : "Athanasius", "drilldown" : "Athanasius", - "y" : 4, - "name" : "Athanasius" + "y" : 4 }, { - "name" : "Ben Davies", + "y" : 2, "drilldown" : "Ben Davies", - "y" : 2 + "name" : "Ben Davies" }, { "name" : "Cheok-Yin Fung", - "y" : 2, - "drilldown" : "Cheok-Yin Fung" + "drilldown" : "Cheok-Yin Fung", + "y" : 2 }, { - "drilldown" : "Christian Jaeger", "y" : 2, - "name" : "Christian Jaeger" + "name" : "Christian Jaeger", + "drilldown" : "Christian Jaeger" }, { - "name" : "Colin Crain", - "y" : 1, - "drilldown" : "Colin Crain" + "y" : 5, + "drilldown" : "Colin Crain", + "name" : "Colin Crain" }, { - "name" : "Dave Cross", "drilldown" : "Dave Cross", + "name" : "Dave Cross", "y" : 2 }, { "drilldown" : "Dave Jacoby", - "y" : 3, - "name" : "Dave Jacoby" + "name" : "Dave Jacoby", + "y" : 3 }, { - "y" : 2, "drilldown" : "Duncan C. White", - "name" : "Duncan C. White" + "name" : "Duncan C. White", + "y" : 2 }, { "name" : "E. Choroba", - "y" : 2, - "drilldown" : "E. Choroba" + "drilldown" : "E. Choroba", + "y" : 2 }, { - "name" : "Feng Chang", "drilldown" : "Feng Chang", + "name" : "Feng Chang", "y" : 2 }, { - "name" : "Flavio Poletti", "drilldown" : "Flavio Poletti", + "name" : "Flavio Poletti", "y" : 6 }, { - "y" : 3, "drilldown" : "James Smith", - "name" : "James Smith" + "name" : "James Smith", + "y" : 3 }, { - "name" : "Jan Krnavek", "drilldown" : "Jan Krnavek", + "name" : "Jan Krnavek", "y" : 2 }, { @@ -546,39 +535,39 @@ "name" : "Jorg Sommrey" }, { + "y" : 1, "name" : "Lance Wicks", - "drilldown" : "Lance Wicks", - "y" : 1 + "drilldown" : "Lance Wicks" }, { - "drilldown" : "Laurent Rosenfeld", "y" : 5, - "name" : "Laurent Rosenfeld" + "name" : "Laurent Rosenfeld", + "drilldown" : "Laurent Rosenfeld" }, { - "name" : "Luca Ferrari", "y" : 4, - "drilldown" : "Luca Ferrari" + "drilldown" : "Luca Ferrari", + "name" : "Luca Ferrari" }, { - "drilldown" : "Mark Anderson", "y" : 2, - "name" : "Mark Anderson" + "name" : "Mark Anderson", + "drilldown" : "Mark Anderson" }, { + "y" : 2, "name" : "Mohammad S Anwar", - "drilldown" : "Mohammad S Anwar", - "y" : 2 + "drilldown" : "Mohammad S Anwar" }, { - "name" : "Niels van Dijke", "y" : 2, - "drilldown" : "Niels van Dijke" + "drilldown" : "Niels van Dijke", + "name" : "Niels van Dijke" }, { - "y" : 2, + "name" : "Pete Houston", "drilldown" : "Pete Houston", - "name" : "Pete Houston" + "y" : 2 }, { "y" : 5, @@ -586,28 +575,28 @@ "name" : "Roger Bell_West" }, { - "name" : "Simon Green", + "y" : 3, "drilldown" : "Simon Green", - "y" : 3 + "name" : "Simon Green" }, { - "drilldown" : "Simon Proctor", "y" : 2, + "drilldown" : "Simon Proctor", "name" : "Simon Proctor" }, { + "drilldown" : "Stuart Little", "name" : "Stuart Little", - "y" : 4, - "drilldown" : "Stuart Little" + "y" : 4 }, { + "y" : 4, "name" : "Ulrich Rieke", - "drilldown" : "Ulrich Rieke", - "y" : 4 + "drilldown" : "Ulrich Rieke" }, { - "name" : "W. Luis Mochan", "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan", "y" : 3 }, { @@ -616,8 +605,27 @@ "y" : 1 } ], - "colorByPoint" : 1, - "name" : "Perl Weekly Challenge - 114" + "colorByPoint" : 1 } - ] + ], + "plotOptions" : { + "series" : { + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + }, + "borderWidth" : 0 + } + }, + "chart" : { + "type" : "column" + }, + "tooltip" : { + "pointFormat" : "{point.name}: {point.y:f}
", + "followPointer" : 1, + "headerFormat" : "{series.name}
" + }, + "title" : { + "text" : "Perl Weekly Challenge - 114" + } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index e10821c42f..b96a0a6f7b 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,33 +1,30 @@ { + "legend" : { + "enabled" : "false" + }, + "yAxis" : { + "title" : { + "text" : null + }, + "min" : 0 + }, "xAxis" : { + "type" : "category", "labels" : { "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" } - }, - "type" : "category" - }, - "tooltip" : { - "pointFormat" : "{point.y:.0f}" - }, - "legend" : { - "enabled" : "false" + } }, - "subtitle" : { - "text" : "Last updated at 2021-05-30 21:40:09 GMT" + "title" : { + "text" : "Perl Weekly Challenge Contributions [2019 - 2020]" }, "chart" : { "type" : "column" }, - "title" : { - "text" : "Perl Weekly Challenge Contributions [2019 - 2020]" - }, - "yAxis" : { - "min" : 0, - "title" : { - "text" : null - } + "tooltip" : { + "pointFormat" : "{point.y:.0f}" }, "series" : [ { @@ -38,26 +35,29 @@ ], [ "Perl", - 5401 + 5403 ], [ "Raku", - 3431 + 3433 ] ], + "name" : "Contributions", "dataLabels" : { - "enabled" : "true", - "color" : "#FFFFFF", - "format" : "{point.y:.0f}", "align" : "right", "y" : 10, "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" + "fontSize" : "13px", + "fontFamily" : "Verdana, sans-serif" }, - "rotation" : -90 - }, - "name" : "Contributions" + "rotation" : -90, + "enabled" : "true", + "color" : "#FFFFFF", + "format" : "{point.y:.0f}" + } } - ] + ], + "subtitle" : { + "text" : "Last updated at 2021-05-30 21:54:35 GMT" + } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index a49bb19175..4c3ca13d41 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,4 +1,15 @@ { + "tooltip" : { + "pointFormat" : "Challenge {point.name}: {point.y:f}
", + "followPointer" : "true", + "headerFormat" : "" + }, + "chart" : { + "type" : "column" + }, + "title" : { + "text" : "Perl Weekly Challenge Language" + }, "plotOptions" : { "series" : { "borderWidth" : 0, @@ -8,2075 +19,8 @@ } } }, - "tooltip" : { - "followPointer" : "true", - "headerFormat" : "", - "pointFormat" : "Challenge {point.name}: {point.y:f}
" - }, - "legend" : { - "enabled" : "false" - }, "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2021-05-30 21:40:09 GMT" - }, - "drilldown" : { - "series" : [ - { - "id" : "001", - "name" : "001", - "data" : [ - [ - "Perl", - 103 - ], - [ - "Raku", - 47 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "name" : "002", - "id" : "002", - "data" : [ - [ - "Perl", - 79 - ], - [ - "Raku", - 36 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 42 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 9 - ] - ], - "id" : "003", - "name" : "003" - }, - { - "name" : "004", - "id" : "004", - "data" : [ - [ - "Perl", - 56 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 40 - ], - [ - "Raku", - 26 - ], - [ - "Blog", - 12 - ] - ], - "id" : "005", - "name" : "005" - }, - { - "data" : [ - [ - "Perl", - 33 - ], - [ - "Raku", - 18 - ], - [ - "Blog", - 7 - ] - ], - "name" : "006", - "id" : "006" - }, - { - "data" : [ - [ - "Perl", - 31 - ], - [ - "Raku", - 23 - ], - [ - "Blog", - 10 - ] - ], - "name" : "007", - "id" : "007" - }, - { - "data" : [ - [ - "Perl", - 44 - ], - [ - "Raku", - 22 - ], - [ - "Blog", - 12 - ] - ], - "id" : "008", - "name" : "008" - }, - { - "data" : [ - [ - "Perl", - 42 - ], - [ - "Raku", - 21 - ], - [ - "Blog", - 13 - ] - ], - "id" : "009", - "name" : "009" - }, - { - "id" : "010", - "name" : "010", - "data" : [ - [ - "Perl", - 35 - ], - [ - "Raku", - 19 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 47 - ], - [ - "Raku", - 28 - ], - [ - "Blog", - 10 - ] - ], - "name" : "011", - "id" : "011" - }, - { - "data" : [ - [ - "Perl", - 48 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 11 - ] - ], - "id" : "012", - "name" : "012" - }, - { - "name" : "013", - "id" : "013", - "data" : [ - [ - "Perl", - 47 - ], - [ - "Raku", - 25 - ], - [ - "Blog", - 13 - ] - ] - }, - { - "name" : "014", - "id" : "014", - "data" : [ - [ - "Perl", - 55 - ], - [ - "Raku", - 31 - ], - [ - "Blog", - 15 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 56 - ], - [ - "Raku", - 28 - ], - [ - "Blog", - 15 - ] - ], - "name" : "015", - "id" : "015" - }, - { - "id" : "016", - "name" : "016", - "data" : [ - [ - "Perl", - 36 - ], - [ - "Raku", - 23 - ], - [ - "Blog", - 12 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 45 - ], - [ - "Raku", - 27 - ], - [ - "Blog", - 12 - ] - ], - "id" : "017", - "name" : "017" - }, - { - "data" : [ - [ - "Perl", - 36 - ], - [ - "Raku", - 31 - ], - [ - "Blog", - 14 - ] - ], - "name" : "018", - "id" : "018" - }, - { - "id" : "019", - "name" : "019", - "data" : [ - [ - "Perl", - 56 - ], - [ - "Raku", - 34 - ], - [ - "Blog", - 13 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 51 - ], - [ - "Raku", - 37 - ], - [ - "Blog", - 13 - ] - ], - "name" : "020", - "id" : "020" - }, - { - "id" : "021", - "name" : "021", - "data" : [ - [ - "Perl", - 38 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "id" : "022", - "name" : "022", - "data" : [ - [ - "Perl", - 35 - ], - [ - "Raku", - 23 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 53 - ], - [ - "Raku", - 32 - ], - [ - "Blog", - 12 - ] - ], - "name" : "023", - "id" : "023" - }, - { - "name" : "024", - "id" : "024", - "data" : [ - [ - "Perl", - 37 - ], - [ - "Raku", - 26 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 28 - ], - [ - "Raku", - 19 - ], - [ - "Blog", - 12 - ] - ], - "id" : "025", - "name" : "025" - }, - { - "data" : [ - [ - "Perl", - 35 - ], - [ - "Raku", - 29 - ], - [ - "Blog", - 10 - ] - ], - "name" : "026", - "id" : "026" - }, - { - "data" : [ - [ - "Perl", - 29 - ], - [ - "Raku", - 22 - ], - [ - "Blog", - 9 - ] - ], - "name" : "027", - "id" : "027" - }, - { - "name" : "028", - "id" : "028", - "data" : [ - [ - "Perl", - 45 - ], - [ - "Raku", - 26 - ], - [ - "Blog", - 9 - ] - ] - }, - { - "name" : "029", - "id" : "029", - "data" : [ - [ - "Perl", - 40 - ], - [ - "Raku", - 27 - ], - [ - "Blog", - 12 - ] - ] - }, - { - "id" : "030", - "name" : "030", - "data" : [ - [ - "Perl", - 74 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 50 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 9 - ] - ], - "name" : "031", - "id" : "031" - }, - { - "id" : "032", - "name" : "032", - "data" : [ - [ - "Perl", - 57 - ], - [ - "Raku", - 27 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "id" : "033", - "name" : "033", - "data" : [ - [ - "Perl", - 62 - ], - [ - "Raku", - 38 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "id" : "034", - "name" : "034", - "data" : [ - [ - "Perl", - 30 - ], - [ - "Raku", - 23 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "id" : "035", - "name" : "035", - "data" : [ - [ - "Perl", - 33 - ], - [ - "Raku", - 22 - ], - [ - "Blog", - 9 - ] - ] - }, - { - "name" : "036", - "id" : "036", - "data" : [ - [ - "Perl", - 35 - ], - [ - "Raku", - 22 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "id" : "037", - "name" : "037", - "data" : [ - [ - "Perl", - 34 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 9 - ] - ] - }, - { - "id" : "038", - "name" : "038", - "data" : [ - [ - "Perl", - 32 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 12 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 29 - ], - [ - "Raku", - 21 - ], - [ - "Blog", - 12 - ] - ], - "id" : "039", - "name" : "039" - }, - { - "id" : "040", - "name" : "040", - "data" : [ - [ - "Perl", - 39 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 37 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 9 - ] - ], - "id" : "041", - "name" : "041" - }, - { - "name" : "042", - "id" : "042", - "data" : [ - [ - "Perl", - 47 - ], - [ - "Raku", - 34 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 33 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 11 - ] - ], - "name" : "043", - "id" : "043" - }, - { - "data" : [ - [ - "Perl", - 41 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 11 - ] - ], - "name" : "044", - "id" : "044" - }, - { - "name" : "045", - "id" : "045", - "data" : [ - [ - "Perl", - 50 - ], - [ - "Raku", - 35 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 44 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 10 - ] - ], - "name" : "046", - "id" : "046" - }, - { - "id" : "047", - "name" : "047", - "data" : [ - [ - "Perl", - 43 - ], - [ - "Raku", - 31 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 59 - ], - [ - "Raku", - 37 - ], - [ - "Blog", - 12 - ] - ], - "name" : "048", - "id" : "048" - }, - { - "data" : [ - [ - "Perl", - 50 - ], - [ - "Raku", - 27 - ], - [ - "Blog", - 12 - ] - ], - "name" : "049", - "id" : "049" - }, - { - "data" : [ - [ - "Perl", - 50 - ], - [ - "Raku", - 36 - ], - [ - "Blog", - 12 - ] - ], - "id" : "050", - "name" : "050" - }, - { - "id" : "051", - "name" : "051", - "data" : [ - [ - "Perl", - 46 - ], - [ - "Raku", - 32 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "name" : "052", - "id" : "052", - "data" : [ - [ - "Perl", - 45 - ], - [ - "Raku", - 32 - ], - [ - "Blog", - 14 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 45 - ], - [ - "Raku", - 41 - ], - [ - "Blog", - 15 - ] - ], - "name" : "053", - "id" : "053" - }, - { - "data" : [ - [ - "Perl", - 45 - ], - [ - "Raku", - 40 - ], - [ - "Blog", - 18 - ] - ], - "name" : "054", - "id" : "054" - }, - { - "data" : [ - [ - "Perl", - 41 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 14 - ] - ], - "name" : "055", - "id" : "055" - }, - { - "data" : [ - [ - "Perl", - 47 - ], - [ - "Raku", - 32 - ], - [ - "Blog", - 16 - ] - ], - "id" : "056", - "name" : "056" - }, - { - "name" : "057", - "id" : "057", - "data" : [ - [ - "Perl", - 39 - ], - [ - "Raku", - 26 - ], - [ - "Blog", - 15 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 33 - ], - [ - "Raku", - 23 - ], - [ - "Blog", - 13 - ] - ], - "name" : "058", - "id" : "058" - }, - { - "name" : "059", - "id" : "059", - "data" : [ - [ - "Perl", - 39 - ], - [ - "Raku", - 34 - ], - [ - "Blog", - 16 - ] - ] - }, - { - "id" : "060", - "name" : "060", - "data" : [ - [ - "Perl", - 39 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 16 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 37 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 14 - ] - ], - "name" : "061", - "id" : "061" - }, - { - "name" : "062", - "id" : "062", - "data" : [ - [ - "Perl", - 28 - ], - [ - "Raku", - 19 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 42 - ], - [ - "Raku", - 34 - ], - [ - "Blog", - 13 - ] - ], - "name" : "063", - "id" : "063" - }, - { - "name" : "064", - "id" : "064", - "data" : [ - [ - "Perl", - 35 - ], - [ - "Raku", - 29 - ], - [ - "Blog", - 16 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 32 - ], - [ - "Raku", - 26 - ], - [ - "Blog", - 15 - ] - ], - "name" : "065", - "id" : "065" - }, - { - "data" : [ - [ - "Perl", - 39 - ], - [ - "Raku", - 31 - ], - [ - "Blog", - 14 - ] - ], - "id" : "066", - "name" : "066" - }, - { - "id" : "067", - "name" : "067", - "data" : [ - [ - "Perl", - 38 - ], - [ - "Raku", - 34 - ], - [ - "Blog", - 18 - ] - ] - }, - { - "id" : "068", - "name" : "068", - "data" : [ - [ - "Perl", - 33 - ], - [ - "Raku", - 29 - ], - [ - "Blog", - 13 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 39 - ], - [ - "Raku", - 28 - ], - [ - "Blog", - 16 - ] - ], - "name" : "069", - "id" : "069" - }, - { - "data" : [ - [ - "Perl", - 42 - ], - [ - "Raku", - 34 - ], - [ - "Blog", - 17 - ] - ], - "id" : "070", - "name" : "070" - }, - { - "data" : [ - [ - "Perl", - 31 - ], - [ - "Raku", - 32 - ], - [ - "Blog", - 15 - ] - ], - "name" : "071", - "id" : "071" - }, - { - "data" : [ - [ - "Perl", - 51 - ], - [ - "Raku", - 42 - ], - [ - "Blog", - 19 - ] - ], - "name" : "072", - "id" : "072" - }, - { - "data" : [ - [ - "Perl", - 53 - ], - [ - "Raku", - 40 - ], - [ - "Blog", - 17 - ] - ], - "id" : "073", - "name" : "073" - }, - { - "name" : "074", - "id" : "074", - "data" : [ - [ - "Perl", - 56 - ], - [ - "Raku", - 39 - ], - [ - "Blog", - 20 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 55 - ], -