From a12ee9734de0d24a0a52c2d00e804028bbe197aa Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Mon, 16 Dec 2019 00:21:19 +0000 Subject: - Added solutions by Colin Crain. --- challenge-038/colin-crain/perl5/ch-1.pl | 100 ++++ challenge-038/colin-crain/perl5/ch-2.pl | 325 +++++++++++ stats/pwc-current.json | 303 +++++----- stats/pwc-language-breakdown-summary.json | 76 +-- stats/pwc-language-breakdown.json | 554 +++++++++--------- stats/pwc-leaders.json | 932 +++++++++++++++--------------- stats/pwc-summary-1-30.json | 38 +- stats/pwc-summary-121-150.json | 94 +-- stats/pwc-summary-31-60.json | 122 ++-- stats/pwc-summary-61-90.json | 114 ++-- stats/pwc-summary-91-120.json | 122 ++-- stats/pwc-summary.json | 324 +++++------ 12 files changed, 1772 insertions(+), 1332 deletions(-) create mode 100644 challenge-038/colin-crain/perl5/ch-1.pl create mode 100644 challenge-038/colin-crain/perl5/ch-2.pl diff --git a/challenge-038/colin-crain/perl5/ch-1.pl b/challenge-038/colin-crain/perl5/ch-1.pl new file mode 100644 index 0000000000..ee2e0ccd9d --- /dev/null +++ b/challenge-038/colin-crain/perl5/ch-1.pl @@ -0,0 +1,100 @@ +#! /opt/local/bin/perl +# +# datefinder.pl +# +# TASK #1 +# Date Finder +# Create a script to accept a 7 digits number, where the first number +# can only be 1 or 2. The second and third digits can be anything 0-9. +# The fourth and fifth digits corresponds to the month i.e. +# 01,02,03…,11,12. And the last 2 digits respresents the days in the +# month i.e. 01,02,03….29,30,31. Your script should validate if the +# given number is valid as per the rule and then convert into human +# readable format date. +# +# RULES +# 1) If 1st digit is 1, then append 20 otherwise 19 to the 2nd and +# 3rd digits to make it 4-digits year. +# +# 2) The 4th and 5th digits together should be a valid month. +# +# 3) The 6th and 7th digits together should be a valid day for the +# above month. +# +# For example, the given number is 2230120, it should print 1923-01-20. +# +# method: the basic format can be validated with a single regex, +# matching only valid combinations of numbers: 1 or 2, then 00-99, +# then 01-12, then 01-31, seven digits total. At the same time +# capture groups can gather the first digit, 2 digit year, month +# and day fields. The first digit can be normallized by +# subtracting from 21 and multiplying by 100 before summing with +# the second two. +# +# After this all that remains is to validate the date. An array of +# days in the month can make sure the day is in range for that +# month. A quick and dirty check routine can verify whether any +# given Feb 29, presumed valid until this point, falls within a +# leap year. A little sugar provides a month abbreviation instead +# of number, avoiding any confusion about international date ordering. +# +# 2019 colin crain +## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + + +use warnings; +use strict; +use feature ":5.26"; + +## ## ## ## ## MAIN + +my $input = shift @ARGV; + +if ( ! defined $input ) { + say "please input a number to validate"; + exit; +} + +unless ( $input =~ /^ ([12]) ## (start string) 1 or 2 + (\d\d) ## 00-99 + (0[1-9]|1[0-2]) ## 01-09 or 10-12 + (0[1-9]|[12]\d|3[01]) ## 01-09 or 10-29 or 30-31 (end string) + $/x ) { ## x for whitespace + say "failed: numeric validation : $input"; + exit; +} + +my $y = (21 - $1) * 100 + $2; +my $m = $3; +my $d = $4; + +my @mlen = ( 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); +my @mname = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); + +if ( $d > $mlen[$m-1] ) { + say "failed: the month of $mname[$m-1] doesn't have $d days! : $input"; + exit; +} + +if ( $m == 2 && $d == 29 ) { + is_leap( $y ) ? say "passed: $mname[$m-1] $d, $y" + : say "failed: $y is not a leap year : $input"; +} +else { + say "passed: $mname[$m-1] $d, $y"; +} + + +## ## ## ## ## SUBS + +sub is_leap { +## returns true if leap year +# 1: if the year is evenly divisible by 4, go to step 2. else, return 0. +# 2: if the year is evenly divisible by 100, go to step 3. else, return 1. +# 3: if the year is evenly divisible by 400, return 1. else, return 0. + my $y = shift; + unless ($y % 4 == 0) { return 0 } + unless ($y % 100 == 0) { return 1 } + unless ($y % 400 == 0) { return 0 } + return 1; +} diff --git a/challenge-038/colin-crain/perl5/ch-2.pl b/challenge-038/colin-crain/perl5/ch-2.pl new file mode 100644 index 0000000000..6acf8e9c1d --- /dev/null +++ b/challenge-038/colin-crain/perl5/ch-2.pl @@ -0,0 +1,325 @@ +#! /opt/local/bin/perl +# +# wordgame.pl +# +# TASK #2 +# Word Game +# Lets assume we have tiles as listed below, with an alphabet (A..Z) +# printed on them. Each tile has a value, e.g. A (1 point), B (4 +# points) etc. You are allowed to draw 7 tiles from the lot +# randomly. Then try to form a word using the 7 tiles with maximum +# points altogether. You don’t have to use all the 7 tiles to make a +# word. You should try to use as many tiles as possible to get the +# maximum points. +# +# For example, A (x8) means there are 8 tiles with letter A. +# +# 1 point +# A (x8), G (x3), I (x5), S (x7), U (x5), X (x2), Z (x5) +# +# 2 points +# E (x9), J (x3), L (x3), R (x3), V (x3), Y (x5) +# +# 3 points +# F (x3), D (x3), P (x5), W (x5) +# +# 4 points +# B (x5), N (x4) +# +# 5 points +# T (x5), O (x3), H (x3), M (x4), C (x4) +# +# 10 points +# K (x2), Q (x2) +# +# method: so many parts to this puzzle. The three basic structures +# are to: + +# 1. select a hand, +# 2. determine every possible combination of letters from that hand, +# +# then for each of these combinations, + +# 3. determine whether it is a valid word, and its point score, +# while keeping track of the highest point score. It's a new +# high score, zero out the previous talley and begin anew. +# +# To select a hand, I found it easier to explicitly parse the +# configuration stated above and use that to construct a data +# structure to hold it, loading the constructed perl code using eval. +# Beats typing it out and and errors will be structural rather than +# lexical. Once we have the configuration we can use that to construct +# a bag of numbered tiles 0-108 with letters for values. We draw from +# this to build a hand of 7 tiles, with duplicate draws "thrown back" +# and redrawn until we have 7 unique numbered tiles. To finish we +# construct an array by mapping the tile numbers to their respective +# letter values. +# +# To determine letter combinations we will look to a the +# Algorithm::Permute module, which, given a list and a length, +# impliments nPr permutations, outputting a rearranged list for each +# one. To gauge the scope of this task I wrote a function to calculate +# the sum of the number of permutations of 7 tiles into 7 letter +# words, plus the permutations of 6 letter words, 5 letter, etc. That +# number grows large quickly as the number of chits grows, but for 7 +# is only 13699 permutations, quite managable. That routine is +# included here, with an auxillary factorial function, but not used +# for this script. 13699 permutations is managable, and I considered +# writing my own, but the Algorithm::Permute module is written in XS, +# so is very fast. +# +# By joining a permutation list into a string we can then compare it +# to a list of words and see if we find a match. NLP and verifying +# words as valid English would be very, very cool but a little more +# than a week's work I'd imagine. Perhaps there's a module for that, +# but I don't know it. So word lists it is. +# +# For possible words, most *NIX systems have a /usr/share/dict/words +# dictionary file somewhere. I found this a bit lacking in plurals, so +# found a Scrabble Dictionary txtfile, pulled it down and used that. +# Seeing as our game is quite similar to yet legally distinct from +# Scrabble(tm), this is better as it will list, as I understand, all +# legal words, with separate entries for conjugations and declensions. +# Perusing this list makes it clear why I will probably never be a +# top-field Scrabble player. Then again, I would consider it a +# personal victory to ever find a way to use the word cwtch in a +# sentence. If it's good enough for those maniacs, it's good enough +# for me. +# +# To get a point value for the word, should the lookup match, we can +# use the config hash again to translate to the point values from the +# list returned by the permute iterator and sum that. The iterator +# doesn't care about duplicate words if the initial set has duplicate +# letters, for example CATSAXZ will make the word CATS twice, once +# from each A. So the current list of best words is kept in a hash, +# with a single key per word. Every time the highest value is +# exceeded, the hash is restarted with the new best word. +# +# results: For amusement, I broke off the 7 tile hand size into a +# configuration variable. As we can see from running our perviously +# mentioned permute_sum routine, +# tiles: 3 15 permutations +# tiles: 4 64 permutations +# tiles: 5 325 permutations +# tiles: 6 1956 permutations +# tiles: 7 13699 permutations +# tiles: 8 109600 permutations +# tiles: 9 986409 permutations +# tiles: 10 9864100 permutations +# tiles: 11 108505111 permutations +# tiles: 12 1302061344 permutations +# the number of possible words grows exponentially, at an expanding +# rate that works to about 10x with each tile added within this range. +# There is also an added dictionary size penalty, as we no longer +# disallow longer words, but that increase will diminish as we grow. A +# 10-chit hand takes about 30 seconds on my machine. Good thing we +# used an XS permutor. Of note adding letters doesn't really scale the +# point values found, although I was able to find the word PAMPHREY +# for 23 points on an 11-tile hand. +# +# One notable thing that came to light during the output procedure is +# that Algorithm::Permute under certain conditions changes its input +# array in place, keeping the reference but removing the contents of +# the array. It only does this when the output length is equal to the +# input length; apparently it uses a different algorithm in this +# specific case than that for generating nPr where n > r. Consequently +# the loop for 7 tiles from lengths 2..7 succeeds but looping +# (reverse(2..7)) fails, because in the first case the $hand array +# referance is still populated until after the last iteration, but in +# the second is depopulated on first pass and subsequent calls to the +# iterator->new method fail. In order to display the initial hand +# after the premutation logic we need to previously have made a deep +# copy of this initial array, by dereferencing, copying the array to a +# new variable and then re-referencing that. This side effect does not +# appear to be documented, but has been reported to the author. +# +# example: +# tiles: [S] [U] [N] [E] [R] [P] [T] +# +# best words found: +# PUNSTER +# PUNTERS +# +# point score: 18 +# +# +# + +# 2019 colin crain +## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + + + +# use warnings; +use strict; +use feature ":5.26"; + +use Algorithm::Permute; + +use Data::Dumper; +$Data::Dumper::Sortkeys = sub { [sort {$a <=> $b} keys $_[0]->%*] }; + +# normally dictionaries don't have separate entries for plural forms etc, so a +# scrabble dictionary is a better choice here. I found this one without too much +# difficulty. YMMV. +my $dictionary_file_path = './collins_scrabble_words_2019.txt'; + +## alternately, this file exists on most UNIX based systems: +#my $dictionary_file_path = '/usr/share/dict/words'; + +my $number_of_tiles = 7; + +## ## ## ## ## MAIN + +## massage the descriptive table above into perl code and eval it into a hash structure and return it +## $pool_config = { A => { quan => 8, value => 1 }, etc... }; +## we will want this hash later for its 'value' values +my $pool_config = parse_data(); + +## from the config make a pool of chits, keyed on a number 0 to 108, with the value of the letter. +my $pool; +my ($start, $end) = (0,0); +for my $key ( sort keys $pool_config->%* ) { + $end = $start + $pool_config->{$key}->{quan}; + @$pool{ $start..($end - 1) } = ($key) x ($end - $start + 1); ## hash slices on the lvalue + $start = $end; +} + +## draw a hand of chits +my $hand = draw_hand( $pool, $number_of_tiles ); + +## deep copy of $hand for later, as the permutation engine will mysteriously gut it when r == n +my $safe_hand = [@{$hand}]; + +## permute words and calculate point values, preserving against a high score +my $highest_point_score = 0; +my %highest_point_words; +my $dict = load_dictionary(); + +for my $word_length ( 2..$number_of_tiles ) { + my $permutor = Algorithm::Permute->new($hand, $word_length); + while (my @perm = $permutor->next) { + my $word = join '', @perm; + if (exists $dict->{$word_length}->{$word}){ + my @points = map { $pool_config->{$_}->{value} } @perm; + my $points; + $points += shift @points while @points; ## quick sum function + if ( $points > $highest_point_score ){ + %highest_point_words = ($word => 1); + $highest_point_score = $points; + } + elsif ( $points == $highest_point_score ){ + $highest_point_words{$word}++; + } + } + } +} + +## output the results +say "tiles: ", join ' ', map { "[$_]" } $safe_hand->@*; +say ''; +say "best words found:"; +printf " %s\n", $_ for (sort keys %highest_point_words); +say ''; +say "point score: ", $highest_point_score; + + + + + +## ## ## ## ## SUBS + +sub parse_data { + my $pool_config; + my $code = '$pool_config = {' . "\n"; + my $points; + while (my $line = ) { + next if $line =~ /^\s*$/; + if ($line =~ /^(\d+) point/) { + $points = $1; + next; + } + $line =~ s/(\w) \(x(\d)\),?\s?/\t$1 => { quan => $2 \t,\n\t value => $points }\t,\n/g; + $code .= $line; + } + $code .= '};'; + + eval $code; + return $pool_config; + +} + +sub draw_hand { +## given a pool to draw from and a number of chits to draw, returns an array of letters + my ($pool, $size) = @_; + + ## gather a hash of unique chit numbers: + ## while the hand is not filled, select new chits from the pool + my %hand; + while ( scalar keys %hand < $size ) { + my $chit = int(rand( scalar(keys $pool->%*) )) ; + next if exists $hand{$chit}; + $hand{$chit} = 1; + } + + ## convert the hash into an array of letters + return [ map { $pool->{$_} } keys %hand ]; +} + +sub load_dictionary { +## loads a dictionary file into a hash structure, keyed on word length and then the word itself + open( my $fh, "<", "$dictionary_file_path" ) or die "can't open dict! $!\n"; + my $dict = {}; + while ( my $word = uc( <$fh> ) ){ + $word =~ s/^\s*([A-Z]+)\s*\n?\r?/$1/; + my $length = length( $word ); + next if $length > $number_of_tiles; + $dict->{$length}->{$word} = 1; + } + return $dict; +} + +sub permute_sum { +## sum of number of permutations of a given length and all smaller lengths r -> 0 for a given set +## permutation: nPr = n!/(n-r)! +## +## n +## sum: ∑(nPr) = ∑ n!/(n-r)! +## r=1 +## + my ($letters, $length) = @_; + $length = $letters if (! defined $length); + return 0 if $length == 0; + return factorial($letters)/factorial($letters - $length) + permute_sum( $letters, $length - 1); +} + +sub factorial { + my $num = shift; + return undef if $num < 0; + return 1 if $num <= 1; + my $out = $num; + while ( --$num > 1) { + $out *= $num; + } + return $out; +} + + +__DATA__ +1 point +A (x8), G (x3), I (x5), S (x7), U (x5), X (x2), Z (x5) + +2 points +E (x9), J (x3), L (x3), R (x3), V (x3), Y (x5) + +3 points +F (x3), D (x3), P (x5), W (x5) + +4 points +B (x5), N (x4) + +5 points +T (x5), O (x3), H (x3), M (x4), C (x4) + +10 points +K (x2), Q (x2) diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 0b90eb5c59..e0623d0144 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,42 +1,130 @@ { - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - } - } - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } + "title" : { + "text" : "Perl Weekly Challenge - 038" }, "chart" : { "type" : "column" }, + "series" : [ + { + "colorByPoint" : 1, + "data" : [ + { + "y" : 3, + "name" : "Adam Russell", + "drilldown" : "Adam Russell" + }, + { + "y" : 2, + "drilldown" : "Andrezgz", + "name" : "Andrezgz" + }, + { + "y" : 3, + "name" : "Arne Sommer", + "drilldown" : "Arne Sommer" + }, + { + "y" : 4, + "drilldown" : "Burkhard Nickels", + "name" : "Burkhard Nickels" + }, + { + "drilldown" : "Colin Crain", + "name" : "Colin Crain", + "y" : 2 + }, + { + "name" : "Daniel Mita", + "drilldown" : "Daniel Mita", + "y" : 2 + }, + { + "y" : 3, + "name" : "Dave Jacoby", + "drilldown" : "Dave Jacoby" + }, + { + "y" : 2, + "name" : "Duane Powell", + "drilldown" : "Duane Powell" + }, + { + "drilldown" : "E. Choroba", + "name" : "E. Choroba", + "y" : 3 + }, + { + "y" : 5, + "name" : "Javier Luque", + "drilldown" : "Javier Luque" + }, + { + "name" : "Kevin Colyer", + "drilldown" : "Kevin Colyer", + "y" : 2 + }, + { + "y" : 2, + "name" : "Noud", + "drilldown" : "Noud" + }, + { + "drilldown" : "Pete Houston", + "name" : "Pete Houston", + "y" : 1 + }, + { + "y" : 4, + "drilldown" : "Roger Bell West", + "name" : "Roger Bell West" + }, + { + "name" : "Ruben Westerberg", + "drilldown" : "Ruben Westerberg", + "y" : 4 + }, + { + "name" : "Ryan Thompson", + "drilldown" : "Ryan Thompson", + "y" : 4 + }, + { + "drilldown" : "Saif Ahmed", + "name" : "Saif Ahmed", + "y" : 2 + }, + { + "name" : "Simon Proctor", + "drilldown" : "Simon Proctor", + "y" : 2 + }, + { + "y" : 1, + "drilldown" : "Steven Wilson", + "name" : "Steven Wilson" + } + ], + "name" : "Perl Weekly Challenge - 038" + } + ], + "xAxis" : { + "type" : "category" + }, "legend" : { "enabled" : 0 }, + "subtitle" : { + "text" : "[Champions: 19] Last updated at 2019-12-16 00:21:06 GMT" + }, "tooltip" : { "headerFormat" : "{series.name}
", - "pointFormat" : "{point.name}: {point.y:f}
", - "followPointer" : 1 - }, - "title" : { - "text" : "Perl Weekly Challenge - 038" - }, - "xAxis" : { - "type" : "category" - }, - "subtitle" : { - "text" : "[Champions: 18] Last updated at 2019-12-15 18:54:01 GMT" + "followPointer" : 1, + "pointFormat" : "{point.name}: {point.y:f}
" }, "drilldown" : { "series" : [ { - "id" : "Adam Russell", "data" : [ [ "Perl 5", @@ -47,16 +135,17 @@ 1 ] ], - "name" : "Adam Russell" + "name" : "Adam Russell", + "id" : "Adam Russell" }, { + "name" : "Andrezgz", "data" : [ [ "Perl 5", 2 ] ], - "name" : "Andrezgz", "id" : "Andrezgz" }, { @@ -74,7 +163,7 @@ "id" : "Arne Sommer" }, { - "id" : "Burkhard Nickels", + "name" : "Burkhard Nickels", "data" : [ [ "Perl 5", @@ -85,16 +174,26 @@ 2 ] ], - "name" : "Burkhard Nickels" + "id" : "Burkhard Nickels" }, { + "id" : "Colin Crain", "data" : [ [ - "Perl 6", + "Perl 5", 2 ] ], + "name" : "Colin Crain" + }, + { "name" : "Daniel Mita", + "data" : [ + [ + "Perl 6", + 2 + ] + ], "id" : "Daniel Mita" }, { @@ -112,17 +211,17 @@ "id" : "Dave Jacoby" }, { - "id" : "Duane Powell", "data" : [ [ "Perl 5", 2 ] ], - "name" : "Duane Powell" + "name" : "Duane Powell", + "id" : "Duane Powell" }, { - "id" : "E. Choroba", + "name" : "E. Choroba", "data" : [ [ "Perl 5", @@ -133,11 +232,10 @@ 1 ] ], - "name" : "E. Choroba" + "id" : "E. Choroba" }, { "id" : "Javier Luque", - "name" : "Javier Luque", "data" : [ [ "Perl 5", @@ -151,17 +249,18 @@ "Blog", 1 ] - ] + ], + "name" : "Javier Luque" }, { "id" : "Kevin Colyer", - "name" : "Kevin Colyer", "data" : [ [ "Perl 6", 2 ] - ] + ], + "name" : "Kevin Colyer" }, { "name" : "Noud", @@ -174,17 +273,16 @@ "id" : "Noud" }, { - "id" : "Pete Houston", "name" : "Pete Houston", "data" : [ [ "Perl 5", 1 ] - ] + ], + "id" : "Pete Houston" }, { - "id" : "Roger Bell West", "data" : [ [ "Perl 5", @@ -195,9 +293,11 @@ 2 ] ], - "name" : "Roger Bell West" + "name" : "Roger Bell West", + "id" : "Roger Bell West" }, { + "name" : "Ruben Westerberg", "data" : [ [ "Perl 5", @@ -208,12 +308,10 @@ 2 ] ], - "name" : "Ruben Westerberg", "id" : "Ruben Westerberg" }, { "id" : "Ryan Thompson", - "name" : "Ryan Thompson", "data" : [ [ "Perl 5", @@ -223,7 +321,8 @@ "Perl 6", 2 ] - ] + ], + "name" : "Ryan Thompson" }, { "id" : "Saif Ahmed", @@ -247,112 +346,28 @@ }, { "id" : "Steven Wilson", - "name" : "Steven Wilson", "data" : [ [ "Perl 5", 1 ] - ] + ], + "name" : "Steven Wilson" } ] }, - "series" : [ - { - "data" : [ - { - "name" : "Adam Russell", - "drilldown" : "Adam Russell", - "y" : 3 - }, - { - "name" : "Andrezgz", - "drilldown" : "Andrezgz", - "y" : 2 - }, - { - "y" : 3, - "drilldown" : "Arne Sommer", - "name" : "Arne Sommer" - }, - { - "drilldown" : "Burkhard Nickels", - "y" : 4, - "name" : "Burkhard Nickels" - }, - { - "drilldown" : "Daniel Mita", - "y" : 2, - "name" : "Daniel Mita" - }, - { - "y" : 3, - "drilldown" : "Dave Jacoby", - "name" : "Dave Jacoby" - }, - { - "name" : "Duane Powell", - "drilldown" : "Duane Powell", - "y" : 2 - }, - { - "drilldown" : "E. Choroba", - "y" : 3, - "name" : "E. Choroba" - }, - { - "y" : 5, - "drilldown" : "Javier Luque", - "name" : "Javier Luque" - }, - { - "drilldown" : "Kevin Colyer", - "name" : "Kevin Colyer", - "y" : 2 - }, - { - "name" : "Noud", - "drilldown" : "Noud", - "y" : 2 - }, - { - "y" : 1, - "drilldown" : "Pete Houston", - "name" : "Pete Houston" - }, - { - "y" : 4, - "drilldown" : "Roger Bell West", - "name" : "Roger Bell West" - }, - { - "name" : "Ruben Westerberg", - "drilldown" : "Ruben Westerberg", - "y" : 4 - }, - { - "name" : "Ryan Thompson", - "drilldown" : "Ryan Thompson", - "y" : 4 - }, - { - "drilldown" : "Saif Ahmed", - "name" : "Saif Ahmed", - "y" : 2 - }, - { - "drilldown" : "Simon Proctor", - "y" : 2, - "name" : "Simon Proctor" - }, - { - "name" : "Steven Wilson", - "drilldown" : "Steven Wilson", - "y" : 1 - } - ], - "name" : "Perl Weekly Challenge - 038", - "colorByPoint" : 1 + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + } + } + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" } - ] + } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 78c56592dd..6790e49386 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,16 +1,49 @@ { + "title" : { + "text" : "Perl Weekly Challenge Contributions - 2019" + }, + "chart" : { + "type" : "column" + }, + "subtitle" : { + "text" : "Last updated at 2019-12-16 00:21:14 GMT" + }, + "legend" : { + "enabled" : "false" + }, "yAxis" : { "title" : { "text" : null }, "min" : 0 }, - "legend" : { - "enabled" : "false" + "xAxis" : { + "labels" : { + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + } + }, + "type" : "category" + }, + "tooltip" : { + "pointFormat" : "{point.y:.0f}" }, "series" : [ { "name" : "Contributions", + "dataLabels" : { + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + }, + "format" : "{point.y:.0f}", + "y" : 10, + "align" : "right", + "color" : "#FFFFFF", + "enabled" : "true", + "rotation" : -90 + }, "data" : [ [ "Blog", @@ -18,46 +51,13 @@ ], [ "Perl 5", - 1573 + 1575 ], [ "Perl 6", 941 ] - ], - "dataLabels" : { - "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" - }, - "color" : "#FFFFFF", - "align" : "right", - "rotation" : -90, - "format" : "{point.y:.0f}", - "y" : 10, - "enabled" : "true" - } + ] } - ], - "title" : { - "text" : "Perl Weekly Challenge Contributions - 2019" - }, - "xAxis" : { - "labels" : { - "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" - } - }, - "type" : "category" - }, - "chart" : { - "type" : "column" - }, - "subtitle" : { - "text" : "Last updated at 2019-12-15 18:54:13 GMT" - }, - "tooltip" : { - "pointFormat" : "{point.y:.0f}" - } + ] } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index b63570f547..25ecfd8397 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,4 +1,231 @@ { + "subtitle" : { + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2019-12-16 00:21:14 GMT" + }, + "chart" : { + "type" : "column" + }, + "title" : { + "text" : "Perl Weekly Challenge Language" + }, + "tooltip" : { + "headerFormat" : "", + "pointFormat" : "Challenge {point.name}: {point.y:f}
", + "followPointer" : "true" + }, + "series" : [ + { + "colorByPoint" : "true", + "data" : [ + { + "y" : 136, + "name" : "#001", + "drilldown" : "001" + }, + { + "y" : 104, + "drilldown" : "002", + "name" : "#002" + }, + { + "drilldown" : "003", + "name" : "#003", + "y" : 67 + }, + { + "name" : "#004", + "drilldown" : "004", + "y" : 87 + }, + { + "name" : "#005", + "drilldown" : "005", + "y" : 67 + }, + { + "y" : 48, + "name" : "#006", + "drilldown" : "006" + }, + { + "y" : 56, + "drilldown" : "007", + "name" : "#007" + }, + { + "name" : "#008", + "drilldown" : "008", + "y" : 70 + }, + { + "y" : 68, + "name" : "#009", + "drilldown" : "009" + }, + { + "y" : 60, + "name" : "#010", + "drilldown" : "010" + }, + { + "y" : 79, + "drilldown" : "011", + "name" : "#011" + }, + { + "name" : "#012", + "drilldown" : "012", + "y" : 83 + }, + { + "name" : "#013", + "drilldown" : "013", + "y" : 76 + }, + { + "name" : "#014", + "drilldown" : "014", + "y" : 96 + }, + { + "name" : "#015", + "drilldown" : "015", + "y" : 93 + }, + { + "y" : 66, + "drilldown" : "016", + "name" : "#016" + }, + { + "y" : 79, + "drilldown" : "017", + "name" : "#017" + }, + { + "name" : "#018", + "drilldown" : "018", + "y" : 76 + }, + { + "y" : 95, + "drilldown" : "019", + "name" : "#019" + }, + { + "drilldown" : "020", + "name" : "#020", + "y" : 95 + }, + { + "drilldown" : "021", + "name" : "#021", + "y" : 67 + }, + { + "y" : 63, + "drilldown" : "022", + "name" : "#022" + }, + { + "name" : "#023", + "drilldown" : "023", + "y" : 91 + }, + { + "y" : 70, + "name" : "#024", + "drilldown" : "024" + }, + { + "drilldown" : "025", + "name" : "#025", + "y" : 55 + }, + { + "y" : 70, + "drilldown" : "026", + "name" : "#026" + }, + { + "y" : 58, + "drilldown" : "027", + "name" : "#027" + }, + { + "y" : 78, + "name" : "#028", + "drilldown" : "028" + }, + { + "y" : 77, + "drilldown" : "029", + "name" : "#029" + }, + { + "name" : "#030", + "drilldown" : "030", + "y" : 115 + }, + { + "drilldown" : "031", + "name" : "#031", + "y" : 87 + }, + { + "y" : 92, + "name" : "#032", + "drilldown" : "032" + }, + { + "drilldown" : "033", + "name" : "#033", + "y" : 108 + }, + { + "y" : 60, + "drilldown" : "034", + "name" : "#034" + }, + { + "y" : 60, + "name" : "#035", + "drilldown" : "035" + }, + { + "drilldown" : "036", + "name" : "#036", + "y" : 61 + }, + { + "y" : 61, + "drilldown" : "037", + "name" : "#037" + }, + { + "drilldown" : "038", + "name" : "#038", + "y" : 52 + } + ], + "name" : "Perl Weekly Challenge Languages" + } + ], + "xAxis" : { + "type" : "category" + }, + "plotOptions" : { + "series" : { + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + }, + "borderWidth" : 0 + } + }, + "legend" : { + "enabled" : "false" + }, "drilldown" : { "series" : [ { @@ -38,7 +265,7 @@ "name" : "002" }, { - "id" : "003", + "name" : "003", "data" : [ [ "Perl 5", @@ -53,7 +280,7 @@ 9 ] ], - "name" : "003" + "id" : "003" }, { "id" : "004", @@ -74,6 +301,7 @@ "name" : "004" }, { + "id" : "005", "data" : [ [ "Perl 5", @@ -88,10 +316,10 @@ 12 ] ], - "id" : "005", "name" : "005" }, { + "name" : "006", "data" : [ [ "Perl 5", @@ -106,11 +334,11 @@ 7 ] ], - "id" : "006", - "name" : "006" + "id" : "006" }, { "name" : "007", + "id" : "007", "data" : [ [ "Perl 5", @@ -124,8 +352,7 @@ "Blog", 10 ] - ], - "id" : "007" + ] }, { "name" : "008", @@ -146,6 +373,7 @@ ] }, { + "name" : "009", "data" : [ [ "Perl 5", @@ -160,11 +388,9 @@ 13 ] ], - "id" : "009", - "name" : "009" + "id" : "009" }, { - "name" : "010", "data" : [ [ "Perl 5", @@ -179,10 +405,10 @@ 11 ] ], - "id" : "010" + "id" : "010", + "name" : "010" }, { - "name" : "011", "id" : "011", "data" : [ [ @@ -197,9 +423,12 @@ "Blog", 10 ] - ] + ], + "name" : "011" }, { + "name" : "012", + "id" : "012", "data" : [ [ "Perl 5", @@ -213,13 +442,10 @@ "Blog", 11 ] - ], - "id" : "012", - "name" : "012" + ] }, { "name" : "013", - "id" : "013", "data" : [ [ "Perl 5", @@ -233,7 +459,8 @@ "Blog", 13 ] - ] + ], + "id" : "013" }, { "name" : "014", @@ -255,6 +482,7 @@ }, { "name" : "015", + "id" : "015", "data" : [ [ "Perl 5", @@ -268,11 +496,10 @@ "Blog", 15 ] - ], - "id" : "015" + ] }, { - "id" : "016", + "name" : "016", "data" : [ [ "Perl 5", @@ -287,10 +514,9 @@ 12 ] ], - "name" : "016" + "id" : "016" }, { - "name" : "017", "data" : [ [ "Perl 5", @@ -305,7 +531,8 @@ 12 ] ], - "id" : "017" + "id" : "017", + "name" : "017" }, { "id" : "018", @@ -326,6 +553,7 @@ "name" : "018" }, { + "id" : "019", "data" : [ [ "Perl 5", @@ -340,12 +568,9 @@ 13 ] ], - "id" : "019", "name" : "019" }, { - "name" : "020", - "id" : "020", "data" : [ [ "Perl 5", @@ -359,10 +584,11 @@ "Blog", 13 ] - ] + ], + "id" : "020", + "name" : "020" }, { - "name" : "021", "data" : [ [ "Perl 5", @@ -377,9 +603,11 @@ 10 ] ], - "id" : "021" + "id" : "021", + "name" : "021" }, { + "name" : "022", "id" : "022", "data" : [ [ @@ -394,11 +622,9 @@ "Blog", 10 ] - ], - "name" : "022" + ] }, { - "name" : "023", "id" : "023", "data" : [ [ @@ -413,7 +639,8 @@ "Blog", 12 ] - ] + ], + "name" : "023" }, { "data" : [ @@ -434,7 +661,7 @@ "name" : "024" }, { - "id" : "025", + "name" : "025", "data" : [ [ "Perl 5", @@ -449,10 +676,9 @@ 12 ] ], - "name" : "025" + "id" : "025" }, { - "id" : "026", "data" : [ [ "Perl 5", @@ -467,9 +693,11 @@ 10 ] ], + "id" : "026", "name" : "026" }, { + "name" : "027", "id" : "027", "data" : [ [ @@ -484,8 +712,7 @@ "Blog", 9 ] - ], - "name" : "027" + ] }, { "id" : "028", @@ -543,7 +770,6 @@ }, { "name" : "031", - "id" : "031", "data" : [ [ "Perl 5", @@ -557,11 +783,11 @@ "Blog", 9 ] - ] + ], + "id" : "031" }, { "name" : "032", - "id" : "032", "data" : [ [ "Perl 5", @@ -575,9 +801,11 @@ "Blog", 10 ] - ] + ], + "id" : "032" }, { + "name" : "033", "id" : "033", "data" : [ [ @@ -592,10 +820,10 @@ "Blog", 10 ] - ], - "name" : "033" + ] }, { + "id" : "034", "data" : [ [ "Perl 5", @@ -610,10 +838,10 @@ 11 ] ], - "id" : "034", "name" : "034" }, { + "name" : "035", "id" : "035", "data" : [ [ @@ -628,8 +856,7 @@ "Blog", 9 ] - ], - "name" : "035" + ] }, { "name" : "036", @@ -650,6 +877,7 @@ ] }, { + "id" : "037", "data" : [ [ "Perl 5", @@ -664,7 +892,6 @@ 7 ] ], - "id" : "037", "name" : "037" }, { @@ -672,7 +899,7 @@ "data" : [ [ "Perl 5", - 25 + 27 ], [ "Perl 6", @@ -687,233 +914,6 @@ } ] }, - "tooltip" : { - "headerFormat" : "", - "followPointer" : "true", - "pointFormat" : "Challenge {point.name}: {point.y:f}
" - }, - "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2019-12-15 18:54:13 GMT" - }, - "chart" : { - "type" : "column" - }, - "legend" : { - "enabled" : "false" - }, - "series" : [ - { - "data" : [ - { - "y" : 136, - "drilldown" : "001", - "name" : "#001" - }, - { - "y" : 104, - "name" : "#002", - "drilldown" : "002" - }, - { - "drilldown" : "003", - "name" : "#003", - "y" : 67 - }, - { - "y" : 87, - "drilldown" : "004", - "name" : "#004" - }, - { - "drilldown" : "005", - "name" : "#005", - "y" : 67 - }, - { - "name" : "#006", - "drilldown" : "006", - "y" : 48 - }, - { - "y" : 56, - "name" : "#007", - "drilldown" : "007" - }, - { - "y" : 70, - "drilldown" : "008", - "name" : "#008" - }, - { - "drilldown" : "009", - "name" : "#009", - "y" : 68 - }, - { - "y" : 60, - "name" : "#010", - "drilldown" : "010" - }, - { - "y" : 79, - "drilldown" : "011", - "name" : "#011" - }, - { - "name" : "#012", - "drilldown" : "012", - "y" : 83 - }, - { - "y" : 76, - "drilldown" : "013", - "name" : "#013" - }, - { - "y" : 96, - "name" : "#014", - "drilldown" : "014" - }, - { - "y" : 93, - "name" : "#015", - "drilldown" : "015" - }, - { - "drilldown" : "016", - "name" : "#016", - "y" : 66 - }, - { - "drilldown" : "017", - "name" : "#017", - "y" : 79 - }, - { - "y" : 76, - "drilldown" : "018", - "name" : "#018" - }, - { - "y" : 95, - "drilldown" : "019", - "name" : "#019" - }, - { - "y" : 95, - "name" : "#020", - "drilldown" : "020" - }, - { - "y" : 67, - "name" : "#021", - "drilldown" : "021" - }, - { - "drilldown" : "022", - "name" : "#022", - "y" : 63 - }, - { - "drilldown" : "023", - "name" : "#023", - "y" : 91 - }, - { - "name" : "#024", - "drilldown" : "024", - "y" : 70 - }, - { - "name" : "#025", - "drilldown" : "025", - "y" : 55 - }, - { - "y" : 70, - "drilldown" : "026", - "name" : "#026" - }, - { - "name" : "#027", - "drilldown" : "027", - "y" : 58 - }, - { - "drilldown" : "028", - "name" : "#028", - "y" : 78 - }, - { - "y" : 77, - "drilldown" : "029", - "name" : "#029" - }, - { - "name" : "#030", - "drilldown" : "030", - "y" : 115 - }, - { - "y" : 87, - "drilldown" : "031", - "name" : "#031" - }, - { - "name" : "#032", - "drilldown" : "032", - "y" : 92 - }, - { - "drilldown" : "033", - "name" : "#033", - "y" : 108 - }, - { - "name" : "#034", - "drilldown" : "034", - "y" : 60 - }, - { - "drilldown" : "035", - "name" : "#035", - "y" : 60 - }, - { - "drilldown" : "036", - "name" : "#036", - "y" : 61 - }, - { - "drilldown" : "037", - "name" : "#037", - "y" : 61 - }, - { - "y" : 50, - "name" : "#038", - "drilldown" : "038" - } - ], - "name" : "Perl Weekly Challenge Languages", - "colorByPoint" : "true" - } - ], - "plotOptions" : { - "series" : { - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - }, - "borderWidth" : 0 - } - }, - "title" : { - "text" : "Perl Weekly Challenge Language" - }, - "xAxis" : { - "type" : "category" - }, "yAxis" : { "title" : { "text" : "Total Solutions" diff --git a/stats/pwc-leaders.json b/stats/pwc-leaders.json index 9bb42f41bd..3811dec5be 100644 --- a/stats/pwc-leaders.json +++ b/stats/pwc-leaders.json @@ -1,285 +1,17 @@ { - "title" : { - "text" : "Perl Weekly Challenge Leaders (TOP 50)" + "subtitle" : { + "text" : "Click the columns to drilldown the score breakdown. Last updated at 2019-12-16 00:21:12 GMT" + }, + "xAxis" : { + "type" : "category" }, "chart" : { "type" : "column" }, - "series" : [ - { - "data" : [ - { - "y" : 466, - "drilldown" : "Laurent Rosenfeld", - "name" : "#1: Laurent Rosenfeld" - }, - { - "drilldown" : "Joelle Maslak", - "y" : 330, - "name" : "#2: Joelle Maslak" - }, - { - "drilldown" : "Jaldhar H. Vyas", - "y" : 326, - "name" : "#3: Jaldhar H. Vyas" - }, - { - "name" : "#4: Ruben Westerberg", - "drilldown" : "Ruben Westerberg", - "y" : 300 - }, - { - "y" : 254, - "drilldown" : "Adam Russell", - "name" : "#5: Adam Russell" - }, - { - "name" : "#6: Arne Sommer", - "y" : 234, - "drilldown" : "Arne Sommer" - }, - { - "drilldown" : "Athanasius", - "y" : 208, - "name" : "#7: Athanasius" - }, - { - "y" : 202, - "drilldown" : "E. Choroba", - "name" : "#8: E. Choroba" - }, - { - "name" : "#9: Roger Bell West", - "drilldown" : "Roger Bell West", - "y" : 190 - }, - { - "y" : 156, - "drilldown" : "Kian-Meng Ang", - "name" : "#10: Kian-Meng Ang" - }, - { - "y" : 148, - "drilldown" : "Andrezgz", - "name" : "#11: Andrezgz" - }, - { - "drilldown" : "Simon Proctor", - "y" : 148, - "name" : "#12: Simon Proctor" - }, - { - "name" : "#13: Dave Jacoby", - "y" : 132, - "drilldown" : "Dave Jacoby" - }, - { - "y" : 130, - "drilldown" : "Duncan C. White", - "name" : "#14: Duncan C. White" - }, - { - "name" : "#15: Steven Wilson", - "y" : 116, - "drilldown" : "Steven Wilson" - }, - { - "name" : "#16: Yet Ebreo", - "drilldown" : "Yet Ebreo", - "y" : 114 - }, - { - "drilldown" : "Kevin Colyer", - "y" : 104, - "name" : "#17: Kevin Colyer" - }, - { - "name" : "#18: Duane Powell", - "drilldown" : "Duane Powell", - "y" : 96 - }, - { - "name" : "#19: Francis Whittle", - "drilldown" : "Francis Whittle", - "y" : 96 - }, - { - "drilldown" : "Feng Chang", - "y" : 88, - "name" : "#20: Feng Chang" - }, - { - "drilldown" : "Daniel Mantovani", - "y" : 82, - "name" : "#21: Daniel Mantovani" - }, - { - "name" : "#22: Javier Luque", - "drilldown" : "Javier Luque", - "y" : 80 - }, - { - "y" : 80, - "drilldown" : "Mark Senn", - "name" : "#23: Mark Senn" - }, - { - "name" : "#24: Noud", - "drilldown" : "Noud", - "y" : 78 - }, - { - "name" : "#25: Lubos Kolouch", - "drilldown" : "Lubos Kolouch", - "y" : 76 - }, - { - "y" : 72, - "drilldown" : "Gustavo Chaves", - "name" : "#26: Gustavo Chaves" - }, - { - "y" : 70, - "drilldown" : "Yozen Hernandez", - "name" : "#27: Yozen Hernandez" - }, - { - "y" : 64, - "drilldown" : "Guillermo Ramos", - "name" : "#28: Guillermo Ramos" - }, - { - "y" : 60, - "drilldown" : "Colin Crain", - "name" : "#29: Colin Crain" - }, - { - "drilldown" : "Burkhard Nickels", - "y" : 58, - "name" : "#30: Burkhard Nickels" - }, - { - "name" : "#31: Jo Christian Oterhals", - "y" : 56, - "drilldown" : "Jo Christian Oterhals" - }, - { - "name" : "#32: Ozzy", - "y" : 56, - "drilldown" : "Ozzy" - }, - { - "name" : "#33: Dr James A. Smith", - "y" : 52, - "drilldown" : "Dr James A. Smith" - }, - { - "name" : "#34: Randy Lauen", - "drilldown" : "Randy Lauen", - "y" : 52 - }, - { - "drilldown" : "Dave Cross", - "y" : 46, - "name" : "#35: Dave Cross" - }, - { - "drilldown" : "Ulrich Rieke", - "y" : 44, - "name" : "#36: Ulrich Rieke" - }, - { - "name" : "#37: Veesh Goldman", - "drilldown" : "Veesh Goldman", - "y" : 44 - }, - { - "drilldown" : "Daniel Mita", - "y" : 42, - "name" : "#38: Daniel Mita" - }, - { - "name" : "#39: Lars Balker", - "y" : 38, - "drilldown" : "Lars Balker" - }, - { - "drilldown" : "Markus Holzer", - "y" : 36, - "name" : "#40: Markus Holzer" - }, - { - "name" : "#41: Mark Anderson", - "drilldown" : "Mark Anderson", - "y" : 32 - }, - { - "drilldown" : "Nick Logan", - "y" : 32, - "name" : "#42: Nick Logan" - }, - { - "name" : "#43: Ryan Thompson", - "y" : 30, - "drilldown" : "Ryan Thompson" - }, - { - "y" : 28, - "drilldown" : "Pete Houston", - "name" : "#44: Pete Houston" - }, - { - "name" : "#45: Jaime Corchado", - "y" : 24, - "drilldown" : "Jaime Corchado" - }, - { - "drilldown" : "Kivanc Yazan", - "y" : 24, - "name" : "#46: Kivanc Yazan" - }, - { - "name" : "#47: Lars Thegler", - "drilldown" : "Lars Thegler", - "y" : 24 - }, - { - "name" : "#48: Maxim Nechaev", - "drilldown" : "Maxim Nechaev", - "y" : 24 - }, - { - "name" : "#49: Alicia Bielsa", - "y" : 22, - "drilldown" : "Alicia Bielsa" - }, - { - "name" : "#50: Prajith P", - "y" : 22, - "drilldown" : "Prajith P" - } - ], - "colorByPoint" : "true", - "name" : "Perl Weekly Challenge Leaders" - } - ], - "yAxis" : { - "title" : { - "text" : "Total Score" - } - }, - "subtitle" : { - "text" : "Click the columns to drilldown the score breakdown. Last updated at 2019-12-15 18:54:05 GMT" - }, "drilldown" : { "series" : [ { - "name" : "Laurent Rosenfeld", "data" : [ - [ - "Blog", - 87 - ], [ "Perl 6", 73 @@ -287,29 +19,35 @@ [ "Perl 5", 73 + ], + [ + "Blog", + 87 ] ], - "id" : "Laurent Rosenfeld" + "id" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld" }, { "name" : "Joelle Maslak", + "id" : "Joelle Maslak", "data" : [ [ - "Blog", - 5 + "Perl 6", + 80 ], [ "Perl 5", 80 ], [ - "Perl 6", - 80 + "Blog", + 5 ] - ], - "id" : "Joelle Maslak" + ] }, { + "name" : "Jaldhar H. Vyas", "id" : "Jaldhar H. Vyas", "data" : [ [ @@ -324,11 +62,9 @@ "Perl 5", 71 ] - ], - "name" : "Jaldhar H. Vyas" + ] }, { - "id" : "Ruben Westerberg", "data" : [ [ "Perl 6", @@ -339,20 +75,21 @@ 75 ] ], + "id" : "Ruben Westerberg", "name" : "Ruben Westerberg" }, { - "id" : "Adam Russell", "name" : "Adam Russell", + "id" : "Adam Russell", "data" : [ - [ - "Perl 5", - 77 - ], [ "Perl 6", 9 ], + [ + "Perl 5", + 77 + ], [ "Blog", 41 @@ -360,13 +97,7 @@ ] }, { - "id" : "Arne Sommer", - "name" : "Arne Sommer", "data" : [ - [ - "Blog", - 38 - ], [ "Perl 6", 76 @@ -374,12 +105,23 @@ [ "Perl 5", 3 + ], + [ + "Blog", + 38 ] - ] + ], + "name" : "Arne Sommer", + "id" : "Arne Sommer" }, { "id" : "Athanasius", + "name" : "Athanasius", "data" : [ + [ + "Blog", + 3 + ], [ "Perl 5", 63 @@ -387,13 +129,8 @@ [ "Perl 6", 38 - ], - [ - "Blog", - 3 ] - ], - "name" : "Athanasius" + ] }, { "data" : [ @@ -413,10 +150,6 @@ "id" : "Roger Bell West", "name" : "Roger Bell West", "data" : [ - [ - "Blog", - 20 - ], [ "Perl 6", 27 @@ -424,6 +157,10 @@ [ "Perl 5", 48 + ], + [ + "Blog", + 20 ] ] }, @@ -438,20 +175,22 @@ 38 ] ], - "name" : "Kian-Meng Ang", -