From 874349ba3edf0b6b1d8065e8868d451212a870ee Mon Sep 17 00:00:00 2001 From: PerlMonk-Athanasius Date: Fri, 29 Jul 2022 22:48:32 +1000 Subject: Perl & Raku solutions to Tasks 1 & 2 for Week 175 --- challenge-175/athanasius/perl/ch-1.pl | 148 +++++++++++++++++++++++++ challenge-175/athanasius/perl/ch-2.pl | 142 ++++++++++++++++++++++++ challenge-175/athanasius/raku/ch-1.raku | 111 +++++++++++++++++++ challenge-175/athanasius/raku/ch-2.raku | 188 ++++++++++++++++++++++++++++++++ 4 files changed, 589 insertions(+) create mode 100644 challenge-175/athanasius/perl/ch-1.pl create mode 100644 challenge-175/athanasius/perl/ch-2.pl create mode 100644 challenge-175/athanasius/raku/ch-1.raku create mode 100644 challenge-175/athanasius/raku/ch-2.raku diff --git a/challenge-175/athanasius/perl/ch-1.pl b/challenge-175/athanasius/perl/ch-1.pl new file mode 100644 index 0000000000..bf4458cf4f --- /dev/null +++ b/challenge-175/athanasius/perl/ch-1.pl @@ -0,0 +1,148 @@ +#!perl + +############################################################################### +=comment + +Perl Weekly Challenge 175 +========================= + +TASK #1 +------- +*Last Sunday* + +Submitted by: Mohammad S Anwar + +Write a script to list Last Sunday of every month in the given year. + +For example, for year 2022, we should get the following: + + 2022-01-30 + 2022-02-27 + 2022-03-27 + 2022-04-24 + 2022-05-29 + 2022-06-26 + 2022-07-31 + 2022-08-28 + 2022-09-25 + 2022-10-30 + 2022-11-27 + 2022-12-25 + +=cut +############################################################################### + +#--------------------------------------# +# Copyright © 2022 PerlMonk Athanasius # +#--------------------------------------# + +#============================================================================== +=comment + +Assumptions +----------- +All dates are interpreted according to the Gregorian calendar [1,3]. Dates +prior to 15th October, 1582, when the Gregorian calendar was first introduced, +are calculated according to the "proleptic Gregorian calendar" [3] which +extends backwards to dates before the calendar was in use. However, dates prior +to the year 1 AD are not supported. + +Solution +-------- +The solution uses the CPAN module DateTime [2]. Its last_day_of_month() +constructor automatically finds the last day of February as 28 or 29, according +to whether or not the year is a leap year. + +Then, DateTime's day_of_the_week() method finds the weekday of the last day in +the month: it "[r]eturns the day of the week as a number, from 1..7, with 1 +being Monday and 7 being Sunday." [2] If the last day is a Monday, then the +last Sunday is one day prior; if a Tuesday, it is two days prior; and so on. +Hence, the date of the last Sunday is calculated by subtracting from the date +of the last day the weekday of the last day modulo 7. + +References +---------- +[1] Claus Tøndering, "The Gregorian calendar", The Calendar FAQ, + https://www.tondering.dk/claus/cal/gregorian.php +[2] Dave Rolsky, "DateTime", MetaCPAN, https://metacpan.org/pod/DateTime +[3] "Gregorian calendar", Wikipedia, + https://en.wikipedia.org/wiki/Gregorian_calendar + +=cut +#============================================================================== + +use strict; +use warnings; +use Const::Fast; +use DateTime; +use Regexp::Common qw( number ); + +const my $USAGE => +"Usage: + perl $0 + + A year in the Gregorian calendar (AD)\n"; + +#------------------------------------------------------------------------------ +BEGIN +#------------------------------------------------------------------------------ +{ + $| = 1; + print "\nChallenge 175, Task #1: Last Sunday (Perl)\n\n"; +} + +#============================================================================== +MAIN: +#============================================================================== +{ + my $year = parse_command_line(); + + print "The last Sunday of each month in the year $year:\n\n"; + + for my $month (1 .. 12) + { + my $last_day_dt = DateTime->last_day_of_month + ( + year => $year, + month => $month, + ); + my $last_day = $last_day_dt->day; + my $day_of_week = $last_day_dt->day_of_week; + my $last_sun_dt = DateTime->new + ( + year => $year, + month => $month, + day => $last_day - ($day_of_week % 7), + ); + + printf " %s\n", $last_sun_dt->ymd; + } +} + +#------------------------------------------------------------------------------ +sub parse_command_line +#------------------------------------------------------------------------------ +{ + my $args = scalar @ARGV; + $args == 1 or error( "Expected 1 command line argument, found $args" ); + + my $year = $ARGV[ 0 ]; + + $year =~ / ^ $RE{num}{int} $ /x + or error( qq[Argument "$year" is not a valid integer] ); + + $year >= 1 or error( qq[Year "$year" is not AD] ); + + return $year; +} + +#------------------------------------------------------------------------------ +sub error +#------------------------------------------------------------------------------ +{ + my ($message) = @_; + + die "ERROR: $message\n$USAGE"; +} + +############################################################################### diff --git a/challenge-175/athanasius/perl/ch-2.pl b/challenge-175/athanasius/perl/ch-2.pl new file mode 100644 index 0000000000..d2f832d4aa --- /dev/null +++ b/challenge-175/athanasius/perl/ch-2.pl @@ -0,0 +1,142 @@ +#!perl + +############################################################################### +=comment + +Perl Weekly Challenge 175 +========================= + +TASK #2 +------- +*Perfect Totient Numbers* + +Submitted by: Mohammad S Anwar + +Write a script to generate first 20 Perfect Totient Numbers. Please checkout +[ https://en.wikipedia.org/wiki/Perfect_totient_number |wikipedia page] for +more informations. + +Output + + 3, 9, 15, 27, 39, 81, 111, 183, 243, 255, 327, 363, 471, 729, + 2187, 2199, 3063, 4359, 4375, 5571 + +=cut +############################################################################### + +#--------------------------------------# +# Copyright © 2022 PerlMonk Athanasius # +#--------------------------------------# + +#============================================================================== +=comment + +Totients and Iterated Totients +------------------------------ +"In number theory, Euler's totient function counts the positive integers up to +a given integer n that are relatively prime to n. ... In other words, it is the +number of integers k in the range 1 ≤ k ≤ n for which the greatest common +divisor gcd(n, k) is equal to 1." [5] For all n > 2, φ(n) is even. + +Since gcd(n, n) = n, it follows that, for all n > 1, φ(n) is at most n - 1 +(when happens when n is prime), so φ(n) < n. So when totients are iterated, the +iterations always eventually decrease to 2, and then to 1. + +Perfect Totient Numbers +----------------------- +AFAICT, the definitions of Perfect Totient Numbers (PTNs) given in [6] and [2] +imply that 1 is a PTN, which it is not. A more rigorous definition is given in +[4], which specifies that a PTN must be > 2. + +"It is trivial that perfect totient numbers must be odd. It is easy to show +that powers of 3 are perfect totient numbers." [2] + +Solution +-------- +The CPAN module Math::Prime::Util [3] provides function euler_phi(), which cal- +culates the totient of a given integer very quickly. (For a home-grown imple- +mentation of euler_phi(), see the Raku solution to Task 2.) + +Subroutine iterated_totient_sum() calls euler_phi() repeatedly until the itera- +tions reduce to 2. The iterations are summed progressively, and finally 1 is +added for φ(2). + +The main routine calls iterated_totient_sum() repeatedly on successive odd +numbers: those for which the iterated totient sum equals the number itself are +PTNs. The search continues until $TARGET PTNs have been found and displayed. + +References +---------- +[1] "A000010 Euler totient function phi(n): count numbers <= n and prime to + n.", OEIS, https://oeis.org/A000010 +[2] "A082897 Perfect totient numbers.", OEIS, https://oeis.org/A082897 +[3] Dana Jacobsen, "Math::Prime::Util", MetaCPAN, + https://metacpan.org/pod/Math::Prime::Util +[4] Douglas E. Iannucci, Deng Moujie, and Graeme L. Cohen, "On Perfect Totient + Numbers", Journal of Integer Sequences, Vol. 6 (2003), + http://www.emis.de/journals/JIS/VOL6/Cohen2/cohen50.pdf +[5] "Euler's totient function", Wikipedia, + https://en.wikipedia.org/wiki/Euler%27s_totient_function +[6] "Perfect totient number", Wikipedia, + https://en.wikipedia.org/wiki/Perfect_totient_number + +=cut +#============================================================================== + +use strict; +use warnings; +use Const::Fast; +use Math::Prime::Util qw( euler_phi ); + +const my $TARGET => 20; +const my $USAGE => "Usage:\n perl $0\n"; + +#------------------------------------------------------------------------------ +BEGIN +#------------------------------------------------------------------------------ +{ + $| = 1; + print "\nChallenge 175, Task #2: Perfect Totient Numbers (Perl)\n\n"; +} + +#============================================================================== +MAIN: +#============================================================================== +{ + my $args = scalar @ARGV; + $args == 0 or die 'ERROR: Expected 0 command line arguments, found ' . + "$args\n$USAGE"; + + print "The first $TARGET Perfect Totient Numbers:\n\n3"; + + my $count = 1; + + for (my $n = 5; $count < $TARGET; $n += 2) + { + if (iterated_totient_sum( $n ) == $n) + { + print ", $n"; + ++$count; + } + } + + print "\n"; +} + +#------------------------------------------------------------------------------ +sub iterated_totient_sum +#------------------------------------------------------------------------------ +{ + my ($n) = @_; + my $sum = 0; + + while ($n > 2) + { + $n = euler_phi( $n ); + $sum += $n; + } + + return ++$sum; # euler_phi(2) = 1 +} + +############################################################################### diff --git a/challenge-175/athanasius/raku/ch-1.raku b/challenge-175/athanasius/raku/ch-1.raku new file mode 100644 index 0000000000..81586e5826 --- /dev/null +++ b/challenge-175/athanasius/raku/ch-1.raku @@ -0,0 +1,111 @@ +use v6d; + +############################################################################### +=begin comment + +Perl Weekly Challenge 175 +========================= + +TASK #1 +------- +*Last Sunday* + +Submitted by: Mohammad S Anwar + +Write a script to list Last Sunday of every month in the given year. + +For example, for year 2022, we should get the following: + + 2022-01-30 + 2022-02-27 + 2022-03-27 + 2022-04-24 + 2022-05-29 + 2022-06-26 + 2022-07-31 + 2022-08-28 + 2022-09-25 + 2022-10-30 + 2022-11-27 + 2022-12-25 + +=end comment +############################################################################### + +#--------------------------------------# +# Copyright © 2022 PerlMonk Athanasius # +#--------------------------------------# + +#============================================================================== +=begin comment + +Assumptions +----------- +All dates are interpreted according to the Gregorian calendar [2,3]. Dates +prior to 15th October, 1582, when the Gregorian calendar was first introduced, +are calculated according to the "proleptic Gregorian calendar" [3] which +extends backwards to dates before the calendar was in use. However, dates prior +to the year 1 AD are not supported. + +Solution +-------- +The solution uses Raku's native Date class [1]. Its constructor accepts a "*" +as the argument to its "day" parameter: this gives the last day in the month, +automatically finding the last day of February as 28 or 29, according to +whether or not the year is a leap year. + +Then, Date's day-of-week() method finds the weekday of the last day in the +month: it "[r]eturns the day of the week, where 1 is Monday, 2 is Tuesday and +Sunday is 7." [1] If the last day is a Monday, then the last Sunday is one day +prior; if a Tuesday, it is two days prior; and so on. Hence, the date of the +last Sunday is calculated by subtracting from the date of the last day the +weekday of the last day modulo 7. + +References +---------- +[1] "class Date", Raku Documentation, https://docs.raku.org/type/Date +[2] Claus Tøndering, "The Gregorian calendar", The Calendar FAQ, + https://www.tondering.dk/claus/cal/gregorian.php +[3] "Gregorian calendar", Wikipedia, + https://en.wikipedia.org/wiki/Gregorian_calendar + +=end comment +#============================================================================== + +#------------------------------------------------------------------------------ +BEGIN +#------------------------------------------------------------------------------ +{ + "\nChallenge 175, Task #1: Last Sunday (Raku)\n".put; +} + +#============================================================================== +sub MAIN +( + UInt:D $year where * > 0 #= A year in the Gregorian calendar (AD) +) +#============================================================================== +{ + "The last Sunday of each month in the year $year:\n".put; + + for 1 .. 12 -> UInt $month + { + my Date $last-day = Date.new: $year, $month, *; + my Date $last-sun = Date.new: $last-day - ($last-day.day-of-week % 7); + + " { $last-sun.Str }".put; + } +} + +#------------------------------------------------------------------------------ +sub USAGE() +#------------------------------------------------------------------------------ +{ + my Str $usage = $*USAGE; + + $usage ~~ s/ ($*PROGRAM-NAME) /raku $0/; + + $usage.put; +} + +############################################################################### diff --git a/challenge-175/athanasius/raku/ch-2.raku b/challenge-175/athanasius/raku/ch-2.raku new file mode 100644 index 0000000000..dea3154069 --- /dev/null +++ b/challenge-175/athanasius/raku/ch-2.raku @@ -0,0 +1,188 @@ +use v6d; + +############################################################################### +=begin comment + +Perl Weekly Challenge 175 +========================= + +TASK #2 +------- +*Perfect Totient Numbers* + +Submitted by: Mohammad S Anwar + +Write a script to generate first 20 Perfect Totient Numbers. Please checkout +[ https://en.wikipedia.org/wiki/Perfect_totient_number |wikipedia page] for +more informations. + +Output + + 3, 9, 15, 27, 39, 81, 111, 183, 243, 255, 327, 363, 471, 729, + 2187, 2199, 3063, 4359, 4375, 5571 + +=end comment +############################################################################### + +#--------------------------------------# +# Copyright © 2022 PerlMonk Athanasius # +#--------------------------------------# + +#============================================================================== +=begin comment + +Totients and Iterated Totients +------------------------------ +"In number theory, Euler's totient function counts the positive integers up to +a given integer n that are relatively prime to n. ... In other words, it is the +number of integers k in the range 1 ≤ k ≤ n for which the greatest common +divisor gcd(n, k) is equal to 1." [5] For all n > 2, φ(n) is even. + +Since gcd(n, n) = n, it follows that, for all n > 1, φ(n) is at most n - 1 +(when happens when n is prime), so φ(n) < n. So when totients are iterated, the +iterations always eventually decrease to 2, and then to 1. + +Perfect Totient Numbers +----------------------- +AFAICT, the definitions of Perfect Totient Numbers (PTNs) given in [6] and [2] +imply that 1 is a PTN, which it is not. A more rigorous definition is given in +[4], which specifies that a PTN must be > 2. + +"It is trivial that perfect totient numbers must be odd. It is easy to show +that powers of 3 are perfect totient numbers." [2] + +Solution +-------- +Function euler-phi() calculates φ(n) using Euler's product formula [5]: + + φ(n) = n ∏ (1 - 1/p) where p ranges over the distinct primes that divide n. + +The prime factors of n are calculated by the recursive function prime-factors() +which in turn uses Raku's native is-prime() method. + +Subroutine iterated-totient-sum() calls euler-phi() repeatedly until the itera- +tions reduce to 2. The iterations are summed progressively, and finally 1 is +added for φ(2). + +The main routine calls iterated-totient-sum() repeatedly on successive odd +numbers: those for which the iterated totient sum equals the number itself are +PTNs. The search continues until $TARGET PTNs have been found and displayed. +For $TARGET = 20, the complete search takes 14 seconds on my machine. + +References +---------- +[1] "A000010 Euler totient function phi(n): count numbers <= n and prime to + n.", OEIS, https://oeis.org/A000010 +[2] "A082897 Perfect totient numbers.", OEIS, https://oeis.org/A082897 +[3] Dana Jacobsen, "Math::Prime::Util", MetaCPAN, + https://metacpan.org/pod/Math::Prime::Util +[4] Douglas E. Iannucci, Deng Moujie, and Graeme L. Cohen, "On Perfect Totient + Numbers", Journal of Integer Sequences, Vol. 6 (2003), + http://www.emis.de/journals/JIS/VOL6/Cohen2/cohen50.pdf +[5] "Euler's totient function", Wikipedia, + https://en.wikipedia.org/wiki/Euler%27s_totient_function +[6] "Perfect totient number", Wikipedia, + https://en.wikipedia.org/wiki/Perfect_totient_number + +=end comment +#============================================================================== + +my UInt constant $TARGET = 20; +my Bool constant $TIME = False; + +#------------------------------------------------------------------------------ +BEGIN +#------------------------------------------------------------------------------ +{ + "\nChallenge 175, Task #2: Perfect Totient Numbers (Raku)\n".put; +} + +#============================================================================== +sub MAIN() +#============================================================================== +{ + my Int $t0 = time if $TIME; + + "The first $TARGET Perfect Totient Numbers:\n\n3".print; + + my UInt $count = 1; + + loop (my UInt $n = 5; $count < $TARGET; $n += 2) + { + if (iterated-totient-sum( $n ) == $n) + { + ", $n".print; + ++$count; + } + } + + put(); + + "\n%d seconds\n".printf: time - $t0 if $TIME; +} + +#------------------------------------------------------------------------------ +sub iterated-totient-sum( UInt:D $n where { $n > 1 } --> UInt:D ) +#------------------------------------------------------------------------------ +{ + my UInt $i = $n; + my UInt $sum = 0; + + while $i > 2 + { + $i = euler-phi( $i ); + $sum += $i; + } + + return ++$sum; # euler-phi(2) = 1 +} + +#------------------------------------------------------------------------------ +sub euler-phi( UInt:D $n where { $n > 1 } --> UInt:D ) +#------------------------------------------------------------------------------ +{ + # phi(n) = n * Product_{distinct primes p dividing n} (1 - 1/p) + + my UInt @prime-factors = prime-factors( $n ).unique; + my Rat $phi = $n * [*] @prime-factors.map: { 1 - (1 / $_) }; + + return $phi.Int; +} + +#------------------------------------------------------------------------------ +sub prime-factors( UInt:D $n where { $n > 1 } --> Array:D[UInt:D] ) +#------------------------------------------------------------------------------ +{ + my UInt @prime-factors; + + if $n.is-prime + { + @prime-factors.push: $n; + } + else + { + for 2, 3, 5, 7 ... * -> UInt $p + { + if $p.is-prime && $n %% $p + { + @prime-factors.push: $p, |prime-factors( ($n / $p).Int ); + last; + } + } + } + + return @prime-factors; +} + +#------------------------------------------------------------------------------ +sub USAGE() +#------------------------------------------------------------------------------ +{ + my Str $usage = $*USAGE; + + $usage ~~ s:g/ ($*PROGRAM-NAME) /raku $0/; + + $usage.put; +} + +############################################################################### -- cgit From 8a1d038bb02dbf29f14d582578fe755633649e4b Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Fri, 29 Jul 2022 16:03:09 +0100 Subject: - Added solutions by Jorg Sommrey. --- stats/pwc-current.json | 181 ++--- stats/pwc-language-breakdown-summary.json | 70 +- stats/pwc-language-breakdown.json | 1114 ++++++++++++++--------------- stats/pwc-leaders.json | 686 +++++++++--------- stats/pwc-summary-1-30.json | 110 +-- stats/pwc-summary-121-150.json | 48 +- stats/pwc-summary-151-180.json | 108 +-- stats/pwc-summary-181-210.json | 130 ++-- stats/pwc-summary-211-240.json | 26 +- stats/pwc-summary-241-270.json | 94 +-- stats/pwc-summary-31-60.json | 42 +- stats/pwc-summary-61-90.json | 54 +- stats/pwc-summary-91-120.json | 114 +-- stats/pwc-summary.json | 34 +- 14 files changed, 1413 insertions(+), 1398 deletions(-) diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 6d43f9b714..d0c0397be3 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,24 +1,23 @@ { - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - } - } + "tooltip" : { + "followPointer" : 1, + "pointFormat" : "{point.name}: {point.y:f}
", + "headerFormat" : "{series.name}
" + }, + "subtitle" : { + "text" : "[Champions: 20] Last updated at 2022-07-29 14:38:41 GMT" }, "drilldown" : { "series" : [ { - "name" : "Dave Cross", - "id" : "Dave Cross", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Dave Cross", + "name" : "Dave Cross" }, { "name" : "Dave Jacoby", @@ -31,16 +30,17 @@ "id" : "Dave Jacoby" }, { - "name" : "E. Choroba", - "id" : "E. Choroba", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "E. Choroba", + "id" : "E. Choroba" }, { + "id" : "Flavio Poletti", "data" : [ [ "Perl", @@ -55,10 +55,10 @@ 2 ] ], - "id" : "Flavio Poletti", "name" : "Flavio Poletti" }, { + "id" : "James Smith", "data" : [ [ "Perl", @@ -69,7 +69,6 @@ 1 ] ], - "id" : "James Smith", "name" : "James Smith" }, { @@ -79,12 +78,20 @@ 2 ] ], - "id" : "Kjetil Skotheim", - "name" : "Kjetil Skotheim" + "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Kjetil Skotheim", + "id" : "Kjetil Skotheim" }, { - "name" : "Laurent Rosenfeld", - "id" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -98,10 +105,11 @@ "Blog", 1 ] - ] + ], + "name" : "Laurent Rosenfeld", + "id" : "Laurent Rosenfeld" }, { - "name" : "Luca Ferrari", "data" : [ [ "Raku", @@ -112,31 +120,30 @@ 6 ] ], + "name" : "Luca Ferrari", "id" : "Luca Ferrari" }, { - "name" : "Mark Anderson", - "id" : "Mark Anderson", "data" : [ [ "Blog", 2 ] - ] + ], + "name" : "Mark Anderson", + "id" : "Mark Anderson" }, { - "name" : "Marton Polgar", - "id" : "Marton Polgar", "data" : [ [ "Raku", 2 ] - ] + ], + "id" : "Marton Polgar", + "name" : "Marton Polgar" }, { - "name" : "Mohammad S Anwar", - "id" : "Mohammad S Anwar", "data" : [ [ "Perl", @@ -146,7 +153,9 @@ "Raku", 1 ] - ] + ], + "id" : "Mohammad S Anwar", + "name" : "Mohammad S Anwar" }, { "data" : [ @@ -177,7 +186,6 @@ "name" : "Robert DiCicco" }, { - "name" : "Roger Bell_West", "data" : [ [ "Perl", @@ -192,21 +200,21 @@ 1 ] ], - "id" : "Roger Bell_West" + "id" : "Roger Bell_West", + "name" : "Roger Bell_West" }, { - "name" : "Simon Proctor", "data" : [ [ "Raku", 1 ] ], - "id" : "Simon Proctor" + "id" : "Simon Proctor", + "name" : "Simon Proctor" }, { "name" : "Stephen G Lynn", - "id" : "Stephen G Lynn", "data" : [ [ "Perl", @@ -220,11 +228,10 @@ "Blog", 1 ] - ] + ], + "id" : "Stephen G Lynn" }, { - "name" : "Ulrich Rieke", - "id" : "Ulrich Rieke", "data" : [ [ "Perl", @@ -234,7 +241,9 @@ "Raku", 2 ] - ] + ], + "id" : "Ulrich Rieke", + "name" : "Ulrich Rieke" }, { "data" : [ @@ -251,40 +260,25 @@ "name" : "W. Luis Mochan" }, { - "name" : "Walt Mankowski", - "id" : "Walt Mankowski", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Walt Mankowski", + "name" : "Walt Mankowski" } ] }, - "legend" : { - "enabled" : 0 - }, - "title" : { - "text" : "The Weekly Challenge - 175" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "xAxis" : { - "type" : "category" - }, "series" : [ { "name" : "The Weekly Challenge - 175", - "colorByPoint" : 1, "data" : [ { - "drilldown" : "Dave Cross", + "y" : 2, "name" : "Dave Cross", - "y" : 2 + "drilldown" : "Dave Cross" }, { "name" : "Dave Jacoby", @@ -307,9 +301,14 @@ "name" : "James Smith" }, { - "y" : 2, + "name" : "Jorg Sommrey", + "drilldown" : "Jorg Sommrey", + "y" : 2 + }, + { + "drilldown" : "Kjetil Skotheim", "name" : "Kjetil Skotheim", - "drilldown" : "Kjetil Skotheim" + "y" : 2 }, { "y" : 5, @@ -318,13 +317,13 @@ }, { "y" : 8, - "drilldown" : "Luca Ferrari", - "name" : "Luca Ferrari" + "name" : "Luca Ferrari", + "drilldown" : "Luca Ferrari" }, { - "name" : "Mark Anderson", + "y" : 2, "drilldown" : "Mark Anderson", - "y" : 2 + "name" : "Mark Anderson" }, { "name" : "Marton Polgar", @@ -332,13 +331,13 @@ "y" : 2 }, { + "y" : 2, "drilldown" : "Mohammad S Anwar", - "name" : "Mohammad S Anwar", - "y" : 2 + "name" : "Mohammad S Anwar" }, { - "name" : "Peter Campbell Smith", "drilldown" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith", "y" : 3 }, { @@ -347,8 +346,8 @@ "y" : 2 }, { - "drilldown" : "Roger Bell_West", "name" : "Roger Bell_West", + "drilldown" : "Roger Bell_West", "y" : 5 }, { @@ -357,14 +356,14 @@ "y" : 1 }, { - "y" : 5, "drilldown" : "Stephen G Lynn", - "name" : "Stephen G Lynn" + "name" : "Stephen G Lynn", + "y" : 5 }, { + "y" : 4, "drilldown" : "Ulrich Rieke", - "name" : "Ulrich Rieke", - "y" : 4 + "name" : "Ulrich Rieke" }, { "y" : 3, @@ -372,22 +371,38 @@ "name" : "W. Luis Mochan" }, { + "y" : 2, "drilldown" : "Walt Mankowski", - "name" : "Walt Mankowski", - "y" : 2 + "name" : "Walt Mankowski" } - ] + ], + "colorByPoint" : 1 } ], - "tooltip" : { - "pointFormat" : "{point.name}: {point.y:f}
", - "headerFormat" : "{series.name}
", - "followPointer" : 1 + "legend" : { + "enabled" : 0 }, "chart" : { "type" : "column" }, - "subtitle" : { - "text" : "[Champions: 19] Last updated at 2022-07-29 08:35:22 GMT" + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "xAxis" : { + "type" : "category" + }, + "title" : { + "text" : "The Weekly Challenge - 175" + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + } + } } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 2f9eeeb826..af0a62cab2 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,39 +1,12 @@ { - "tooltip" : { - "pointFormat" : "{point.y:.0f}" - }, - "chart" : { - "type" : "column" - }, "subtitle" : { - "text" : "Last updated at 2022-07-29 08:35:22 GMT" + "text" : "Last updated at 2022-07-29 14:38:41 GMT" }, - "legend" : { - "enabled" : "false" - }, - "xAxis" : { - "type" : "category", - "labels" : { - "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" - } - } + "tooltip" : { + "pointFormat" : "{point.y:.0f}" }, "series" : [ { - "dataLabels" : { - "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" - }, - "rotation" : -90, - "color" : "#FFFFFF", - "format" : "{point.y:.0f}", - "y" : 10, - "enabled" : "true", - "align" : "right" - }, "name" : "Contributions", "data" : [ [ @@ -42,22 +15,49 @@ ], [ "Perl", - 8526 + 8528 ], [ "Raku", 5075 ] - ] + ], + "dataLabels" : { + "align" : "right", + "enabled" : "true", + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + }, + "color" : "#FFFFFF", + "format" : "{point.y:.0f}", + "y" : 10, + "rotation" : -90 + } } ], - "title" : { - "text" : "The Weekly Challenge Contributions [2019 - 2022]" + "legend" : { + "enabled" : "false" + }, + "chart" : { + "type" : "column" }, "yAxis" : { - "min" : 0, "title" : { "text" : null + }, + "min" : 0 + }, + "title" : { + "text" : "The Weekly Challenge Contributions [2019 - 2022]" + }, + "xAxis" : { + "type" : "category", + "labels" : { + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + } } } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index dbe0a15e80..d5eb5fd246 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,4 +1,10 @@ { + "legend" : { + "enabled" : "false" + }, + "title" : { + "text" : "The Weekly Challenge Language" + }, "plotOptions" : { "series" : { "borderWidth" : 0, @@ -8,9 +14,21 @@ } } }, + "xAxis" : { + "type" : "category" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "chart" : { + "type" : "column" + }, "drilldown" : { "series" : [ { + "id" : "001", "data" : [ [ "Perl", @@ -25,12 +43,10 @@ 11 ] ], - "id" : "001", "name" : "001" }, { "name" : "002", - "id" : "002", "data" : [ [ "Perl", @@ -44,7 +60,8 @@ "Blog", 10 ] - ] + ], + "id" : "002" }, { "id" : "003", @@ -79,11 +96,11 @@ 10 ] ], - "id" : "004", - "name" : "004" + "name" : "004", + "id" : "004" }, { - "id" : "005", + "name" : "005", "data" : [ [ "Perl", @@ -98,9 +115,10 @@ 12 ] ], - "name" : "005" + "id" : "005" }, { + "name" : "006", "data" : [ [ "Perl", @@ -115,8 +133,7 @@ 7 ] ], - "id" : "006", - "name" : "006" + "id" : "006" }, { "name" : "007", @@ -209,6 +226,7 @@ "id" : "011" }, { + "id" : "012", "data" : [ [ "Perl", @@ -223,7 +241,6 @@ 11 ] ], - "id" : "012", "name" : "012" }, { @@ -245,7 +262,7 @@ "id" : "013" }, { - "id" : "014", + "name" : "014", "data" : [ [ "Perl", @@ -260,10 +277,10 @@ 15 ] ], - "name" : "014" + "id" : "014" }, { - "name" : "015", + "id" : "015", "data" : [ [ "Perl", @@ -278,10 +295,10 @@ 15 ] ], - "id" : "015" + "name" : "015" }, { - "name" : "016", + "id" : "016", "data" : [ [ "Perl", @@ -296,10 +313,10 @@ 12 ] ], - "id" : "016" + "name" : "016" }, { - "id" : "017", + "name" : "017", "data" : [ [ "Perl", @@ -314,10 +331,10 @@ 12 ] ], - "name" : "017" + "id" : "017" }, { - "name" : "018", + "id" : "018", "data" : [ [ "Perl", @@ -332,7 +349,7 @@ 14 ] ], - "id" : "018" + "name" : "018" }, { "id" : "019", @@ -353,7 +370,6 @@ "name" : "019" }, { - "name" : "020", "id" : "020", "data" : [ [ @@ -368,11 +384,10 @@ "Blog", 13 ] - ] + ], + "name" : "020" }, { - "name" : "021", - "id" : "021", "data" : [ [ "Perl", @@ -386,11 +401,11 @@ "Blog", 10 ] - ] + ], + "name" : "021", + "id" : "021" }, { - "name" : "022", - "id" : "022", "data" : [ [ "Perl", @@ -404,7 +419,9 @@ "Blog", 10 ] - ] + ], + "id" : "022", + "name" : "022" }, { "name" : "023", @@ -425,7 +442,6 @@ "id" : "023" }, { - "id" : "024", "data" : [ [ "Perl", @@ -440,10 +456,10 @@ 11 ] ], + "id" : "024", "name" : "024" }, { - "name" : "025", "id" : "025", "data" : [ [ @@ -458,11 +474,11 @@ "Blog", 12 ] - ] + ], + "name" : "025" }, { "name" : "026", - "id" : "026", "data" : [ [ "Perl", @@ -476,10 +492,10 @@ "Blog", 10 ] - ] + ], + "id" : "026" }, { - "name" : "027", "id" : "027", "data" : [ [ @@ -494,7 +510,8 @@ "Blog", 9 ] - ] + ], + "name" : "027" }, { "id" : "028", @@ -516,7 +533,6 @@ }, { "name" : "029", - "id" : "029", "data" : [ [ "Perl", @@ -530,11 +546,11 @@ "Blog", 12 ] - ] + ], + "id" : "029" }, { "name" : "030", - "id" : "030", "data" : [ [ "Perl", @@ -548,11 +564,11 @@ "Blog", 10 ] - ] + ], + "id" : "030" }, { "name" : "031", - "id" : "031", "data" : [ [ "Perl", @@ -566,7 +582,8 @@ "Blog", 9 ] - ] + ], + "id" : "031" }, { "id" : "032", @@ -587,7 +604,6 @@ "name" : "032" }, { - "name" : "033", "data" : [ [ "Perl", @@ -602,10 +618,10 @@ 10 ] ], - "id" : "033" + "id" : "033", + "name" : "033" }, { - "name" : "034", "id" : "034", "data" : [ [ @@ -620,10 +636,11 @@ "Blog", 11 ] - ] + ], + "name" : "034" }, { - "id" : "035", + "name" : "035", "data" : [ [ "Perl", @@ -638,10 +655,9 @@ 9 ] ], - "name" : "035" + "id" : "035" }, { - "name" : "036", "data" : [ [ "Perl", @@ -656,11 +672,10 @@ 11 ] ], + "name" : "036", "id" : "036" }, { - "name" : "037", - "id" : "037", "data" : [ [ "Perl", @@ -674,10 +689,12 @@ "Blog", 9 ] - ] + ], + "name" : "037", + "id" : "037" }, { - "name" : "038", + "id" : "038", "data" : [ [ "Perl", @@ -692,7 +709,7 @@ 12 ] ], - "id" : "038" + "name" : "038" }, { "data" : [ @@ -709,8 +726,8 @@ 12 ] ], - "id" : "039", - "name" : "039" + "name" : "039", + "id" : "039" }, { "data" : [ @@ -727,8 +744,8 @@ 10 ] ], - "id" : "040", - "name" : "040" + "name" : "040", + "id" : "040" }, { "data" : [ @@ -745,10 +762,11 @@ 9 ] ], - "id" : "041", - "name" : "041" + "name" : "041", + "id" : "041" }, { + "id" : "042", "data" : [ [ "Perl", @@ -763,7 +781,6 @@ 11 ] ], - "id" : "042", "name" : "042" }, { @@ -781,10 +798,11 @@ 11 ] ], - "id" : "043", - "name" : "043" + "name" : "043", + "id" : "043" }, { + "name" : "044", "data" : [ [ "Perl", @@ -799,8 +817,7 @@ 11 ] ], - "id" : "044", - "name" : "044" + "id" : "044" }, { "data" : [ @@ -817,12 +834,10 @@ 11 ] ], - "id" : "045", - "name" : "045" + "name" : "045", + "id" : "045" }, { - "name" : "046", - "id" : "046", "data" : [ [ "Perl", @@ -836,9 +851,12 @@ "Blog", 10 ] - ] + ], + "name" : "046", + "id" : "046" }, { + "id" : "047", "data" : [ [ "Perl", @@ -853,7 +871,6 @@ 10 ] ], - "id" : "047", "name" : "047" }, { @@ -871,12 +888,10 @@ 12 ] ], - "id" : "048", - "name" : "048" + "name" : "048", + "id" : "048" }, { - "name" : "049", - "id" : "049", "data" : [ [ "Perl", @@ -890,9 +905,12 @@ "Blog", 12 ] - ] + ], + "name" : "049", + "id" : "049" }, { + "name" : "050", "data" : [ [ "Perl", @@ -907,11 +925,10 @@ 12 ] ], - "id" : "050", - "name" : "050" + "id" : "050" }, { - "id" : "051", + "name" : "051", "data" : [ [ "Perl", @@ -926,10 +943,10 @@ 11 ] ], - "name" : "051" + "id" : "051" }, { - "id" : "052", + "name" : "052", "data" : [ [ "Perl", @@ -944,11 +961,9 @@ 14 ] ], - "name" : "052" + "id" : "052" }, { - "name" : "053", - "id" : "053", "data" : [ [ "Perl", @@ -962,10 +977,11 @@ "Blog", 15 ] - ] + ], + "name" : "053", + "id" : "053" }, { - "id" : "054", "data" : [ [ "Perl", @@ -980,10 +996,10 @@ 18 ] ], - "name" : "054" + "name" : "054", + "id" : "054" }, { - "name" : "055", "data" : [ [ "Perl", @@ -998,11 +1014,11 @@ 14 ] ], + "name" : "055", "id" : "055" }, { "name" : "056", - "id" : "056", "data" : [ [ "Perl", @@ -1016,11 +1032,11 @@ "Blog", 16 ] - ] + ], + "id" : "056" }, { "name" : "057", - "id" : "057", "data" : [ [ "Perl", @@ -1034,10 +1050,11 @@ "Blog", 15 ] - ] + ], + "id" : "057" }, { - "id" : "058", + "name" : "058", "data" : [ [ "Perl", @@ -1052,11 +1069,9 @@ 13 ] ], - "name" : "058" + "id" : "058" }, { - "name" : "059", - "id" : "059", "data" : [ [ "Perl", @@ -1070,10 +1085,12 @@ "Blog", 16 ] - ] + ], + "name" : "059", + "id" : "059" }, { - "id" : "060", + "name" : "060", "data" : [ [ "Perl", @@ -1088,11 +1105,10 @@ 16 ] ], - "name" : "060" + "id" : "060" }, { "name" : "061", - "id" : "061", "data" : [ [ "Perl", @@ -1106,10 +1122,11 @@ "Blog", 14 ] - ] + ], + "id" : "061" }, { - "id" : "062", + "name" : "062", "data" : [ [ "Perl", @@ -1124,10 +1141,9 @@ 11 ] ], - "name" : "062" + "id" : "062" }, { - "id" : "063", "data" : [ [ "Perl", @@ -1142,10 +1158,10 @@ 13 ] ], - "name" : "063" + "name" : "063", + "id" : "063" }, { - "name" : "064", "id" : "064", "data" : [ [ @@ -1160,10 +1176,11 @@ "Blog", 16 ] - ] + ], + "name" : "064" }, { - "name" : "065", + "id" : "065", "data" : [ [ "Perl", @@ -1178,10 +1195,10 @@ 15 ] ], - "id" : "065" + "name" : "065" }, { - "id" : "066", + "name" : "066", "data" : [ [ "Perl", @@ -1196,7 +1213,7 @@ 14 ] ], - "name" : "066" + "id" : "066" }, { "id" : "067", @@ -1217,7 +1234,6 @@ "name" : "067" }, { - "name" : "068", "data" : [ [ "Perl", @@ -1232,11 +1248,11 @@ 13 ] ], + "name" : "068", "id" : "068" }, { "name" : "069", - "id" : "069", "data" : [ [ "Perl", @@ -1250,7 +1266,8 @@ "Blog", 16 ] - ] + ], + "id" : "069" }, { "name" : "070", @@ -1307,6 +1324,7 @@ "id" : "072" }, { + "name" : "073", "data" : [ [ "Perl", @@ -1321,10 +1339,10 @@ 17 ] ], - "id" : "073", - "name" : "073" + "id" : "073" }, { + "name" : "074", "data" : [ [ "Perl", @@ -1339,10 +1357,10 @@ 20 ] ], - "id" : "074", - "name" : "074" + "id" : "074" }, { + "name" : "075", "data" : [ [ "Perl", @@ -1357,11 +1375,10 @@ 20 ] ], - "id" : "075", - "name" : "075" + "id" : "075" }, { - "name" : "076", + "id" : "076", "data" : [ [ "Perl", @@ -1376,7 +1393,7 @@ 16 ] ], - "id" : "076" + "name" : "076" }, { "name" : "077", @@ -1398,7 +1415,6 @@ }, { "name" : "078", - "id" : "078", "data" : [ [ "Perl", @@ -1412,10 +1428,11 @@ "Blog", 18 ] - ] + ], + "id" : "078" }, { - "name" : "079", + "id" : "079", "data" : [ [ "Perl", @@ -1430,9 +1447,10 @@ 17 ] ], - "id" : "079" + "name" : "079" }, { + "id" : "080", "data" : [ [ "Perl", @@ -1447,12 +1465,10 @@ 16 ] ], - "id" : "080", "name" : "080" }, { "name" : "081", - "id" : "081", "data" : [ [ "Perl", @@ -1466,10 +1482,11 @@ "Blog", 15 ] - ] + ], + "id" : "081" }, { - "name" : "082", + "id" : "082", "data" : [ [ "Perl", @@ -1484,10 +1501,9 @@ 17 ] ], - "id" : "082" + "name" : "082" }, { - "name" : "083", "id" : "083", "data" : [ [ @@ -1502,10 +1518,10 @@ "Blog", 16 ] - ] + ], + "name" : "083" }, { - "name" : "084", "id" : "084", "data" : [ [ @@ -1520,11 +1536,10 @@ "Blog", 12 ] - ] + ], + "name" : "084" }, { - "name" : "085", - "id" : "085", "data" : [ [ "Perl", @@ -1538,11 +1553,11 @@ "Blog", 18 ] - ] + ], + "name" : "085", + "id" : "085" }, { - "name" : "086", - "id" : "086", "data" : [ [ "Perl", @@ -1556,7 +1571,9 @@ "Blog", 15 ] - ] + ], + "id" : "086", + "name" : "086" }, { "name" : "087", @@ -1577,8 +1594,6 @@ "id" : "087" }, { - "name" : "088", - "id" : "088", "data" : [ [ "Perl", @@ -1592,10 +1607,11 @@ "Blog", 20 ] - ] + ], + "id" : "088", + "name" : "088" }, { - "name" : "089", "id" : "089", "data" : [ [ @@ -1610,10 +1626,11 @@ "Blog", 20 ] - ] + ], + "name" : "089" }, { - "id" : "090", + "name" : "090", "data" : [ [ "Perl", @@ -1628,10 +1645,9 @@ 17 ] ], - "name" : "090" + "id" : "090" }, { - "name" : "091", "id" : "091", "data" : [ [ @@ -1646,10 +1662,10 @@ "Blog", 16 ] - ] + ], + "name" : "091" }, { - "name" : "092", "id" : "092", "data" : [ [ @@ -1664,11 +1680,11 @@ "Blog", 16 ] - ] + ], + "name" : "092" }, { "name" : "093", - "id" : "093", "data" : [ [ "Perl", @@ -1682,10 +1698,11 @@ "Blog", 16 ] - ] + ], + "id" : "093" }, { - "id" : "094", + "name" : "094", "data" : [ [ "Perl", @@ -1700,11 +1717,10 @@ 17 ] ], - "name" : "094" + "id" : "094" }, { "name" : "095", - "id" : "095", "data" : [ [ "Perl", @@ -1718,10 +1734,10 @@ "Blog", 19 ] - ] + ], + "id" : "095" }, { - "name" : "096", "id" : "096", "data" : [ [ @@ -1736,10 +1752,10 @@ "Blog", 19 ] - ] + ], + "name" : "096" }, { - "name" : "097", "data" : [ [ "Perl", @@ -1754,7 +1770,8 @@ 19 ] ], - "id" : "097" + "id" : "097", + "name" : "097" }, { "id" : "098", @@ -1775,7 +1792,7 @@ "name" : "098" }, { - "id" : "099", + "name" : "099", "data" : [ [ "Perl", @@ -1790,10 +1807,9 @@ 14 ] ], - "name" : "099" + "id" : "099" }, { - "name" : "100", "data" : [ [ "Perl", @@ -1808,11 +1824,10 @@ 21 ] ], + "name" : "100", "id" : "100" }, { - "name" : "101", - "id" : "101", "data" : [ [ "Perl", @@ -1826,10 +1841,12 @@ "Blog", 13 ] - ] + ], + "name" : "101", + "id" : "101" }, { - "name" : "102", + "id" : "102", "data" : [ [ "Perl", @@ -1844,7 +1861,7 @@ 15 ] ], - "id" : "102" + "name" : "102" }, { "data" : [ @@ -1861,8 +1878,8 @@ 15 ] ], - "id" : "103", - "name" : "103" + "name" : "103", + "id" : "103" }, { "data" : [ @@ -1879,8 +1896,8 @@ 14 ] ], - "id" : "104", - "name" : "104" + "name" : "104", + "id" : "104" }, { "data" : [ @@ -1897,10 +1914,11 @@ 14 ] ], - "id" : "105", - "name" : "105" + "name" : "105", + "id" : "105" }, { + "id" : "106", "data" : [ [ "Perl", @@ -1915,11 +1933,9 @@ 17 ] ], - "id" : "106", "name" : "106" }, { - "name" : "107", "data" : [ [ "Perl", @@ -1934,6 +1950,7 @@ 19 ] ], + "name" : "107", "id" : "107" }, { @@ -1955,7 +1972,6 @@ "id" : "108" }, { - "name" : "109", "data" : [ [ "Perl", @@ -1970,11 +1986,10 @@ 22 ] ], + "name" : "109", "id" : "109" }, { - "name" : "110", - "id" : "110", "data" : [ [ "Perl", @@ -1988,9 +2003,12 @@ "Blog", 25 ] - ] + ], + "name" : "110", + "id" : "110" }, { + "id" : "111", "data" : [ [ "Perl", @@ -2005,11 +2023,9 @@ 17 ] ], - "id" : "111", "name" : "111" }, { - "name" : "112", "data" : [ [ "Perl", @@ -2024,11 +2040,10 @@ 19 ] ], + "name" : "112", "id" : "112" }, { - "name" : "113", - "id" : "113", "data" : [ [ "Perl", @@ -2042,9 +2057,12 @@ "Blog", 19 ] - ] + ], + "name" : "113", + "id" : "113" }, { + "name" : "114", "data" : [ [ "Perl", @@ -2059,11 +2077,10 @@ 21 ] ], - "id" : "114", - "name" : "114" + "id" : "114" }, { - "id" : "115", + "name" : "115", "data" : [ [ "Perl", @@ -2078,11 +2095,10 @@ 20 ] ], - "name" : "115" + "id" : "115" }, { "name" : "116", - "id" : "116", "data" : [ [ "Perl", @@ -2096,11 +2112,10 @@ "Blog", 17 ] - ] + ], + "id" : "116" }, { - "name" : "117", - "id" : "117", "data" : [ [ "Perl", @@ -2114,11 +2129,11 @@ "Blog", 19 ] - ] + ], + "name" : "117", + "id" : "117" }, { - "name" : "118", - "id" : "118", "data" : [ [ "Perl", @@ -2132,7 +2147,9 @@ "Blog", 17 ] - ] + ], + "name" : "118", + "id" : "118" }, { "data" : [ @@ -2149,11 +2166,11 @@ 21 ] ], - "id" : "119", - "name" : "119" + "name" : "119", + "id" : "119" }, { - "id" : "120", + "name" : "120", "data" : [ [ "Perl", @@ -2168,10 +2185,10 @@ 21 ] ], - "name" : "120" + "id" : "120" }, { - "id" : "121", + "name" : "121", "data" : [ [ "Perl", @@ -2186,11 +2203,10 @@ 17 ] ], - "name" : "121" + "id" : "121" }, { "name" : "122", - "id" : "122", "data" : [ [ "Perl", @@ -2204,11 +2220,10 @@ "Blog", 20 ] - ] + ], + "id" : "122" }, { - "name" : "123"