From f02eb2ece53535a670e20acaf07adad89f7013f8 Mon Sep 17 00:00:00 2001 From: Jaime <42359730+bracteatus@users.noreply.github.com> Date: Wed, 26 Jun 2019 07:15:48 -0600 Subject: Update README --- challenge-014/jaime/README | 37 +++++-------------------------------- 1 file changed, 5 insertions(+), 32 deletions(-) diff --git a/challenge-014/jaime/README b/challenge-014/jaime/README index 6b98f9b732..9acbfee5ea 100644 --- a/challenge-014/jaime/README +++ b/challenge-014/jaime/README @@ -2,41 +2,14 @@ Solution by Jaime Corchado, (@tortsnare)[https://twitter.com/tortsnare]. # Challenge #1 -The numbers formed by adding one to the products of the smallest -primes are called the Euclid Numbers (see wiki). Write a script that -finds the smallest Euclid Number that is not prime. - -## Solution - -Calculate the product of prime numbers and check if each successor is a prime. +Write a script to generate Van Eck’s sequence. # Challenge #2 -Write a script that finds the common directory path, given a -collection of paths and directory separator. For example, if the -following paths are supplied. - -``` -/a/b/c/d -/a/b/cd -/a/b/cc -/a/b/c/d/e -``` - -and the path separator is `/`. Your script should return `/a/b` as common -directory path. - -## Solution - -``` -perl -- ch-2.pl <*delimiter*> <*list of strings*> -``` - -The path *delimiter* is a string like `/`. -The *list of strings* is a string like `/usr/bin:/usr/sbin`. - -The solution is to find the consecutive intersection of all paths. +Using only the official postal (2-letter) abbreviations for the 50 U.S. states, +write a script to find the longest English word you can spell. # Challenge #3 -Find out the synonyms of a given word using the Synonyms API. +Find the given city current time using the Geo DB Cities API. + -- cgit From 7df6542fb4f35051f5522c7d21318c0bbfa4f6d4 Mon Sep 17 00:00:00 2001 From: Jaime <42359730+bracteatus@users.noreply.github.com> Date: Wed, 26 Jun 2019 11:48:01 -0600 Subject: Create ch-1.pl --- challenge-014/jaime/perl5/ch-1.pl | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 challenge-014/jaime/perl5/ch-1.pl diff --git a/challenge-014/jaime/perl5/ch-1.pl b/challenge-014/jaime/perl5/ch-1.pl new file mode 100644 index 0000000000..220183b345 --- /dev/null +++ b/challenge-014/jaime/perl5/ch-1.pl @@ -0,0 +1,6 @@ +# Solution by Jaime Corchado, (@tortsnare)[https://twitter.com/tortsnare]. +# +# Challenge #1 +# +# Write a script to generate Van Eck’s sequence. + -- cgit From cbf44639456e37d33be3d533a111ce8ed54094b7 Mon Sep 17 00:00:00 2001 From: Jaime <42359730+bracteatus@users.noreply.github.com> Date: Wed, 26 Jun 2019 11:48:31 -0600 Subject: Create ch-2.pl Using only the official postal abbreviations for the 50 U.S. states, write a script to find the longest English word you can spell. --- challenge-014/jaime/perl5/ch-2.pl | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 challenge-014/jaime/perl5/ch-2.pl diff --git a/challenge-014/jaime/perl5/ch-2.pl b/challenge-014/jaime/perl5/ch-2.pl new file mode 100644 index 0000000000..add2b97f25 --- /dev/null +++ b/challenge-014/jaime/perl5/ch-2.pl @@ -0,0 +1,7 @@ +# Solution by Jaime Corchado, (@tortsnare)[https://twitter.com/tortsnare]. +# +# Challenge #2 +# +# Using only the official postal abbreviations for the 50 U.S. states, +# write a script to find the longest English word you can spell. + -- cgit From 73ea96f3a913c4450d5324c06e1421c753a3b5ca Mon Sep 17 00:00:00 2001 From: Jaime <42359730+bracteatus@users.noreply.github.com> Date: Wed, 26 Jun 2019 11:50:00 -0600 Subject: Create ch-3.pl --- challenge-014/jaime/perl5/ch-3.pl | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 challenge-014/jaime/perl5/ch-3.pl diff --git a/challenge-014/jaime/perl5/ch-3.pl b/challenge-014/jaime/perl5/ch-3.pl new file mode 100644 index 0000000000..efe6dde77a --- /dev/null +++ b/challenge-014/jaime/perl5/ch-3.pl @@ -0,0 +1,6 @@ +# Solution by Jaime Corchado, (@tortsnare)[https://twitter.com/tortsnare]. +# +# Challenge #3 +# +# Find the given city current time using the Geo DB Cities API. + -- cgit From 374a9fd171ec504a40522c322e163c954533caaf Mon Sep 17 00:00:00 2001 From: Jaime <42359730+bracteatus@users.noreply.github.com> Date: Wed, 26 Jun 2019 15:36:22 -0600 Subject: Update ch-1.pl Shift the Van Eck sequence to prepare $a_{n+1}$ knowing $a_n$. --- challenge-014/jaime/perl5/ch-1.pl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/challenge-014/jaime/perl5/ch-1.pl b/challenge-014/jaime/perl5/ch-1.pl index 220183b345..18041efa05 100644 --- a/challenge-014/jaime/perl5/ch-1.pl +++ b/challenge-014/jaime/perl5/ch-1.pl @@ -4,3 +4,23 @@ # # Write a script to generate Van Eck’s sequence. +my @ecks = (0); +print "0\n"; # start the sequence. + +for (my $n = 0; ; $n++) { + $a1 = 0; + $an = shift @ecks; + + my $m = 1; # the distance between matching entries. + for my $am (@ecks) { + if ($an == $am) { + $a1 = $m; + last; # only update with most recent entry. + } + } continue { $m++; } + + unshift @ecks, $an; + unshift @ecks, $a1; # series is stored in reverse. + + print "@ecks[0]\n"; # filter series with `perl ch-1.pl | head -n $LENGTH` +} -- cgit From 2704a306be8226ce474abdd84a02d220bba620b3 Mon Sep 17 00:00:00 2001 From: "E. Choroba" Date: Thu, 27 Jun 2019 01:04:13 +0200 Subject: Add link to Choroba's blogpost and the solution to the extra task Also, remove unneccesary condition. --- challenge-014/e-choroba/blog.txt | 1 + challenge-014/e-choroba/perl5/ch-2.pl | 2 -- challenge-014/e-choroba/perl5/ch-2a.pl | 53 ++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 challenge-014/e-choroba/blog.txt create mode 100755 challenge-014/e-choroba/perl5/ch-2a.pl diff --git a/challenge-014/e-choroba/blog.txt b/challenge-014/e-choroba/blog.txt new file mode 100644 index 0000000000..92de29c1a2 --- /dev/null +++ b/challenge-014/e-choroba/blog.txt @@ -0,0 +1 @@ +http://blogs.perl.org/users/e_choroba/2019/06/perl-weekly-challenge-014-van-eck-and-the-us-states.html diff --git a/challenge-014/e-choroba/perl5/ch-2.pl b/challenge-014/e-choroba/perl5/ch-2.pl index ca5a4dc3e8..514b92cdfe 100755 --- a/challenge-014/e-choroba/perl5/ch-2.pl +++ b/challenge-014/e-choroba/perl5/ch-2.pl @@ -18,8 +18,6 @@ while (my $word = <$in>) { my $uc_word = uc $word; my @pairs = $uc_word =~ /\G(..)/g; - next if length $uc_word != 2 * @pairs; - next if grep ! exists $states{$_}, @pairs; next if length($word) < length $longest[0]; diff --git a/challenge-014/e-choroba/perl5/ch-2a.pl b/challenge-014/e-choroba/perl5/ch-2a.pl new file mode 100755 index 0000000000..65df78f69e --- /dev/null +++ b/challenge-014/e-choroba/perl5/ch-2a.pl @@ -0,0 +1,53 @@ +#!/usr/bin/perl +use warnings; +use strict; +use feature qw{ say }; + +use Cpanel::JSON::XS; + +my $json = ; + +my $data = Cpanel::JSON::XS->new->decode($json); +my %by_initials; +undef $by_initials{$data->{$_}{initials}}{$_} for keys %$data; + +my @longest = ([""]); +while (my $word = <>) { + chomp $word; + $word = lc $word; + if (my @path = path($word, [])) { + if (length $word > length $longest[0][0]) { + @longest = ([$word, \@path]); + } elsif (length $word == length $longest[0][0]) { + push @longest, [$word, \@path]; + } + } +} + +say "$_->[0]: ", map { map "[@$_] ", @$_ } @{ $_->[1] } for @longest; + + +sub path { + my ($rest, $path) = @_; + + return [$path] if "" eq $rest; + + my @solutions; + for my $length (1, 2) { + next if $length > length $rest; + + my $prefix = substr $rest, 0, $length; + next unless exists $by_initials{$prefix}; + + for my $state (keys %{ $by_initials{$prefix} }) { + next if @$path + && ((grep $_ eq $state, @$path) + || ! grep $state eq $_, + @{ $data->{ $path->[-1] }{adjacent} }); + push @solutions, path(substr($rest, $length), [ @$path, $state ]); + } + } + return @solutions +} +__DATA__ +{"AL":{"name":"Alabama","initials":"a","adjacent":["FL","GA","TN","MS"]},"AK":{"name":"Alaska","initials":"a","adjacent":[]},"AZ":{"name":"Arizona","initials":"a","adjacent":["NM","UT","NV","CA"]},"AR":{"name":"Arkansas","initials":"a","adjacent":["LA","MS","TN","MO","OK","TX"]},"CA":{"name":"California","initials":"c","adjacent":["AZ","NV","OR"]},"CO":{"name":"Colorado","initials":"c","adjacent":["NM","OK","KS","NE","WY","UT"]},"CT":{"name":"Connecticut","initials":"c","adjacent":["RI","MA","NY"]},"DE":{"name":"Delaware","initials":"d","adjacent":["NJ","PA","MD"]},"FL":{"name":"Florida","initials":"f","adjacent":["GA","AL"]},"GA":{"name":"Georgia","initials":"g","adjacent":["SC","NC","TN","AL","FL"]},"HI":{"name":"Hawaii","initials":"h","adjacent":[]},"ID":{"name":"Idaho","initials":"i","adjacent":["WA","OR","NV","UT","WY","MT"]},"IL":{"name":"Illinois","initials":"i","adjacent":["WI","IA","MO","KY","IN"]},"IN":{"name":"Indiana","initials":"i","adjacent":["IL","KY","OH","MI"]},"IA":{"name":"Iowa","initials":"i","adjacent":["MN","SD","NE","MO","IL","WI"]},"KS":{"name":"Kansas","initials":"k","adjacent":["OK","MO","NE","CO"]},"KY":{"name":"Kentucky","initials":"k","adjacent":["TN","VA","WV","OH","IN","IL","MO"]},"LA":{"name":"Louisiana","initials":"l","adjacent":["MS","AR","TX"]},"ME":{"name":"Maine","initials":"m","adjacent":["NH"]},"MD":{"name":"Maryland","initials":"m","adjacent":["DE","PA","WV","VA"]},"MA":{"name":"Massachusetts","initials":"m","adjacent":["NH","VT","NY","CT","RI"]},"MI":{"name":"Michigan","initials":"m","adjacent":["WI","IN","OH"]},"MN":{"name":"Minnesota","initials":"m","adjacent":["ND","SD","IA","WI"]},"MS":{"name":"Mississippi","initials":"m","adjacent":["AL","TN","AR","LA"]},"MO":{"name":"Missouri","initials":"m","adjacent":["AR","TN","KY","IL","IA","NE","KS","OK"]},"MT":{"name":"Montana","initials":"m","adjacent":["ID","WY","SD","ND"]},"NE":{"name":"Nebraska","initials":"n","adjacent":["KS","MO","IA","SD","WY","CO"]},"NV":{"name":"Nevada","initials":"n","adjacent":["AZ","UT","ID","OR","CA"]},"NH":{"name":"NewHampshire","initials":"nh","adjacent":["VT","MA","ME"]},"NJ":{"name":"NewJersey","initials":"nj","adjacent":["NY","PA","DE"]},"NM":{"name":"NewMexico","initials":"nm","adjacent":["TX","OK","CO","AZ"]},"NY":{"name":"NewYork","initials":"ny","adjacent":["PA","NJ","CT","MA","VT"]},"NC":{"name":"NorthCarolina","initials":"nc","adjacent":["VA","TN","GA","SC"]},"ND":{"name":"NorthDakota","initials":"nd","adjacent":["MT","SD","MN"]},"OH":{"name":"Ohio","initials":"o","adjacent":["MI","IN","KY","WV","PA"]},"OK":{"name":"Oklahoma","initials":"o","adjacent":["TX","AR","MO","KS","CO","NM"]},"OR":{"name":"Oregon","initials":"o","adjacent":["CA","NV","ID","WA"]},"PA":{"name":"Pennsylvania","initials":"p","adjacent":["OH","WV","MD","DE","NJ","NY"]},"RI":{"name":"RhodeIsland","initials":"ri","adjacent":["MA","CT"]},"SC":{"name":"SouthCarolina","initials":"sc","adjacent":["NC","GA"]},"SD":{"name":"SouthDakota","initials":"sd","adjacent":["NE","IA","MN","ND","MT","WY"]},"TN":{"name":"Tennessee","initials":"t","adjacent":["AL","GA","NC","VA","KY","MO","AR","MS"]},"TX":{"name":"Texas","initials":"t","adjacent":["LA","AR","OK","NM"]},"UT":{"name":"Utah","initials":"u","adjacent":["AZ","CO","WY","ID","NV"]},"VT":{"name":"Vermont","initials":"v","adjacent":["NY","MA","NH"]},"VA":{"name":"Virginia","initials":"v","adjacent":["MD","WV","KY","TN","NC"]},"WA":{"name":"Washington","initials":"w","adjacent":["OR","ID"]},"WV":{"name":"WestVirginia","initials":"wv","adjacent":["VA","MD","PA","OH","KY"]},"WI":{"name":"Wisconsin","initials":"w","adjacent":["MN","IA","IL","MI"]},"WY":{"name":"Wyoming","initials":"w","adjacent":["CO","NE","SD","MT","ID","UT"]}} -- cgit From 89aef35db6066a08aba9e02fd1827e713f52bbe0 Mon Sep 17 00:00:00 2001 From: "Gustavo L. de M. Chaves" Date: Tue, 25 Jun 2019 21:39:33 -0300 Subject: New Gustavo Chaves solution to ch014#2 --- challenge-014/gustavo-chaves/perl5/README.pod | 25 ++++++++++++-- .../gustavo-chaves/perl5/ch-1-iterative.pl | 30 ++++++++++++++++ .../gustavo-chaves/perl5/ch-1-recursive.pl | 36 +++++++++++++++++++ challenge-014/gustavo-chaves/perl5/ch-1.pl | 36 ------------------- challenge-014/gustavo-chaves/perl5/ch-1a.pl | 30 ---------------- challenge-014/gustavo-chaves/perl5/ch-2-all.pl | 40 ++++++++++++++++++++++ challenge-014/gustavo-chaves/perl5/ch-2-one.pl | 34 ++++++++++++++++++ challenge-014/gustavo-chaves/perl5/ch-2.pl | 32 ----------------- 8 files changed, 162 insertions(+), 101 deletions(-) create mode 100755 challenge-014/gustavo-chaves/perl5/ch-1-iterative.pl create mode 100755 challenge-014/gustavo-chaves/perl5/ch-1-recursive.pl delete mode 100755 challenge-014/gustavo-chaves/perl5/ch-1.pl delete mode 100755 challenge-014/gustavo-chaves/perl5/ch-1a.pl create mode 100755 challenge-014/gustavo-chaves/perl5/ch-2-all.pl create mode 100755 challenge-014/gustavo-chaves/perl5/ch-2-one.pl delete mode 100755 challenge-014/gustavo-chaves/perl5/ch-2.pl diff --git a/challenge-014/gustavo-chaves/perl5/README.pod b/challenge-014/gustavo-chaves/perl5/README.pod index 3eb671d407..3a34a22d72 100644 --- a/challenge-014/gustavo-chaves/perl5/README.pod +++ b/challenge-014/gustavo-chaves/perl5/README.pod @@ -19,7 +19,7 @@ The recursive solution is a little easier to grasp, I think, because it's a more direct expression of the sequence's definition. But even using memoization it's 33 times slower than the iterative version. - $ ./ch-1a.pl 10 + $ ./ch-1-recursive.pl 10 0 0 1 @@ -31,7 +31,7 @@ direct expression of the sequence's definition. But even using memoization it's 1 6 - $ ./ch-1b.pl 10 + $ ./ch-1-iterative.pl 10 0 0 1 @@ -60,8 +60,27 @@ the US Postal Codes. But I was dumbfounded when I ran it and saw the result: - $ ./ch-2.pl + $ ./ch-2-one.pl Campinas Campinas is the name of the city where I live, in Brazil. But I don't have a clue what is it doing in an English dictionary! :-) + +After having sent my solutions it downed on me that there could be more than one +"largest" word in the dictionary. So, I implemented a second version which +prints all of them: + + $ ./ch-2-all.pl + Campinas + Concorde + Ganymede + Mandarin + Victoria + calamine + complain + mainland + malarial + mandarin + mascaras + memorial + moorland diff --git a/challenge-014/gustavo-chaves/perl5/ch-1-iterative.pl b/challenge-014/gustavo-chaves/perl5/ch-1-iterative.pl new file mode 100755 index 0000000000..3b24e8a570 --- /dev/null +++ b/challenge-014/gustavo-chaves/perl5/ch-1-iterative.pl @@ -0,0 +1,30 @@ +#!/usr/bin/env perl + +# Write a script to generate Van Eck’s sequence starts with 0. For more +# information, please check out wikipedia page +# (https://en.wikipedia.org/wiki/Van_Eck%27s_sequence). This challenge was +# proposed by team member Andrezgz. + +# This is an iterative implementation, which is more than 30x faster than the +# recursive one. + +use 5.026; +use strict; +use warnings; + +my $sequence_size = shift or die "Usage: $0 SIZE\n"; + +my @sequence = (0); + +VALUE: +for my $i (0 .. $sequence_size-2) { + for (my $j=$i-1; $j >= 0; --$j) { + if ($sequence[$j] == $sequence[$i]) { + push @sequence, $i-$j; + next VALUE; + } + } + push @sequence, 0; +} + +say foreach @sequence; diff --git a/challenge-014/gustavo-chaves/perl5/ch-1-recursive.pl b/challenge-014/gustavo-chaves/perl5/ch-1-recursive.pl new file mode 100755 index 0000000000..98002f0cad --- /dev/null +++ b/challenge-014/gustavo-chaves/perl5/ch-1-recursive.pl @@ -0,0 +1,36 @@ +#!/usr/bin/env perl + +# Write a script to generate Van Eck’s sequence starts with 0. For more +# information, please check out wikipedia page +# (https://en.wikipedia.org/wiki/Van_Eck%27s_sequence). This challenge was +# proposed by team member Andrezgz. + +# This is a recursive implementation. + +use 5.026; +use strict; +use warnings; +use Memoize; + +my $sequence_size = shift or die "Usage: $0 SIZE\n"; + +memoize('van_ecks'); +sub van_ecks { + my ($n) = @_; + + return 0 if $n <= 1; + + my $previous_value = van_ecks($n-1); + + for (my $i=$n-2; $i >= 0; --$i) { + if (van_ecks($i) == $previous_value) { + return ($n-1) - $i; + } + } + + return 0; +} + +for my $i (0 .. $sequence_size-1) { + say van_ecks($i); +} diff --git a/challenge-014/gustavo-chaves/perl5/ch-1.pl b/challenge-014/gustavo-chaves/perl5/ch-1.pl deleted file mode 100755 index 98002f0cad..0000000000 --- a/challenge-014/gustavo-chaves/perl5/ch-1.pl +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env perl - -# Write a script to generate Van Eck’s sequence starts with 0. For more -# information, please check out wikipedia page -# (https://en.wikipedia.org/wiki/Van_Eck%27s_sequence). This challenge was -# proposed by team member Andrezgz. - -# This is a recursive implementation. - -use 5.026; -use strict; -use warnings; -use Memoize; - -my $sequence_size = shift or die "Usage: $0 SIZE\n"; - -memoize('van_ecks'); -sub van_ecks { - my ($n) = @_; - - return 0 if $n <= 1; - - my $previous_value = van_ecks($n-1); - - for (my $i=$n-2; $i >= 0; --$i) { - if (van_ecks($i) == $previous_value) { - return ($n-1) - $i; - } - } - - return 0; -} - -for my $i (0 .. $sequence_size-1) { - say van_ecks($i); -} diff --git a/challenge-014/gustavo-chaves/perl5/ch-1a.pl b/challenge-014/gustavo-chaves/perl5/ch-1a.pl deleted file mode 100755 index 3b24e8a570..0000000000 --- a/challenge-014/gustavo-chaves/perl5/ch-1a.pl +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env perl - -# Write a script to generate Van Eck’s sequence starts with 0. For more -# information, please check out wikipedia page -# (https://en.wikipedia.org/wiki/Van_Eck%27s_sequence). This challenge was -# proposed by team member Andrezgz. - -# This is an iterative implementation, which is more than 30x faster than the -# recursive one. - -use 5.026; -use strict; -use warnings; - -my $sequence_size = shift or die "Usage: $0 SIZE\n"; - -my @sequence = (0); - -VALUE: -for my $i (0 .. $sequence_size-2) { - for (my $j=$i-1; $j >= 0; --$j) { - if ($sequence[$j] == $sequence[$i]) { - push @sequence, $i-$j; - next VALUE; - } - } - push @sequence, 0; -} - -say foreach @sequence; diff --git a/challenge-014/gustavo-chaves/perl5/ch-2-all.pl b/challenge-014/gustavo-chaves/perl5/ch-2-all.pl new file mode 100755 index 0000000000..726576f4a3 --- /dev/null +++ b/challenge-014/gustavo-chaves/perl5/ch-2-all.pl @@ -0,0 +1,40 @@ +#!/usr/bin/env perl + +# Using only the official postal (2-letter) abbreviations for the 50 +# U.S. states, write a script to find the longest English word you can spell? +# Here is the list of U.S. states abbreviations as per wikipedia page +# (https://en.wikipedia.org/wiki/List_of_U.S._state_abbreviations). This +# challenge was proposed by team member Neil Bowers. + +# This version prints all the largest words. + +use 5.026; +use strict; +use autodie; +use warnings; +use Locale::US; +use List::Util qw(all); + +my @postal_codes = Locale::US->new()->all_state_codes(); +my %postal_codes = map {lc($_) => undef} @postal_codes; + +my $largest_length_so_far = 0; +my @largest_words_so_far; + +open my $dict, '<', '/usr/share/dict/words'; +while (<$dict>) { + chomp; + my $word = $_; + next unless length($word) >= $largest_length_so_far; + next unless (length($word) % 2) == 0; + next unless all {exists $postal_codes{$_}} (lc($word) =~ m/../g); + if (length($word) == $largest_length_so_far) { + push @largest_words_so_far, $word; + } else { + $largest_length_so_far = length($word); + @largest_words_so_far = ($word); + } +} +close $dict; + +say foreach @largest_words_so_far; diff --git a/challenge-014/gustavo-chaves/perl5/ch-2-one.pl b/challenge-014/gustavo-chaves/perl5/ch-2-one.pl new file mode 100755 index 0000000000..1ef5e6c00e --- /dev/null +++ b/challenge-014/gustavo-chaves/perl5/ch-2-one.pl @@ -0,0 +1,34 @@ +#!/usr/bin/env perl + +# Using only the official postal (2-letter) abbreviations for the 50 +# U.S. states, write a script to find the longest English word you can spell? +# Here is the list of U.S. states abbreviations as per wikipedia page +# (https://en.wikipedia.org/wiki/List_of_U.S._state_abbreviations). This +# challenge was proposed by team member Neil Bowers. + +# This version prints the first largest word. + +use 5.026; +use strict; +use autodie; +use warnings; +use Locale::US; +use List::Util qw(all); + +my @postal_codes = Locale::US->new()->all_state_codes(); +my %postal_codes = map {lc($_) => undef} @postal_codes; + +my $largest_word_so_far = ''; + +open my $dict, '<', '/usr/share/dict/words'; +while (<$dict>) { + chomp; + my $word = $_; + next unless length($word) > length($largest_word_so_far); + next unless (length($word) % 2) == 0; + next unless all {exists $postal_codes{$_}} (lc($word) =~ m/../g); + $largest_word_so_far = $word; +} +close $dict; + +say $largest_word_so_far; diff --git a/challenge-014/gustavo-chaves/perl5/ch-2.pl b/challenge-014/gustavo-chaves/perl5/ch-2.pl deleted file mode 100755 index 66a3bc60bd..0000000000 --- a/challenge-014/gustavo-chaves/perl5/ch-2.pl +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env perl - -# Using only the official postal (2-letter) abbreviations for the 50 -# U.S. states, write a script to find the longest English word you can spell? -# Here is the list of U.S. states abbreviations as per wikipedia page -# (https://en.wikipedia.org/wiki/List_of_U.S._state_abbreviations). This -# challenge was proposed by team member Neil Bowers. - -use 5.026; -use strict; -use autodie; -use warnings; -use Locale::US; -use List::Util qw(all); - -my @postal_codes = Locale::US->new()->all_state_codes(); -my %postal_codes = map {lc($_) => undef} @postal_codes; - -my $largest_word_so_far = ''; - -open my $dict, '<', '/usr/share/dict/words'; -while (<$dict>) { - chomp; - my $word = $_; - next unless length($word) > length($largest_word_so_far); - next unless (length($word) % 2) == 0; - next unless all {exists $postal_codes{$_}} (lc($word) =~ m/../g); - $largest_word_so_far = $word; -} -close $dict; - -say $largest_word_so_far; -- cgit From c05d334c1212bc8f4823ed0bb44085e185b55ec3 Mon Sep 17 00:00:00 2001 From: "Gustavo L. de M. Chaves" Date: Wed, 26 Jun 2019 20:00:47 -0300 Subject: Gustavo Chaves solution to challenge 014 extra --- challenge-014/gustavo-chaves/perl5/README.pod | 17 +++++++ challenge-014/gustavo-chaves/perl5/ch-extra.pl | 63 ++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100755 challenge-014/gustavo-chaves/perl5/ch-extra.pl diff --git a/challenge-014/gustavo-chaves/perl5/README.pod b/challenge-014/gustavo-chaves/perl5/README.pod index 3a34a22d72..b01ac3c1f9 100644 --- a/challenge-014/gustavo-chaves/perl5/README.pod +++ b/challenge-014/gustavo-chaves/perl5/README.pod @@ -84,3 +84,20 @@ prints all of them: mascaras memorial moorland + +=head1 #extra US Traversal + +Neil Bowers blogged about this challenge saying that the second problem wasn't +exactly the one he proposed. He explained what he actually had in mind in a +L. + +Basically, he wants to know what is the largest English word that can be made +using only the initials if US states, beginning in any of them and following +only adjacent states. He offered a JSON data structure in a GitHub Gist +containing the ajdacency and initials of the states. + +Using the Linux dictionary in F my script tells me that +the word is "fatal": + + $ ./ch-extra.pl + fatal (Florida => Alabama => Tennessee => Arkansas => Louisiana) diff --git a/challenge-014/gustavo-chaves/perl5/ch-extra.pl b/challenge-014/gustavo-chaves/perl5/ch-extra.pl new file mode 100755 index 0000000000..c5f21c3e25 --- /dev/null +++ b/challenge-014/gustavo-chaves/perl5/ch-extra.pl @@ -0,0 +1,63 @@ +#!/usr/bin/env perl + +# http://neilb.org/2019/06/24/additional-challenge-14.html + +use 5.026; +use strict; +use autodie; +use warnings; +use LWP::Simple; +use JSON; + +my $usa_state_data_url = 'https://gist.githubusercontent.com/neilb/ee60cd179d5eb17d1cb616cdeeda760f/raw/3d31a508a5277ddb4df3a73fb14715102b452302/usa-state-data.json'; + +my $usa_state_data_json = get($usa_state_data_url) + or die "Could not get $usa_state_data_url"; + +my $usa_state_data = decode_json($usa_state_data_json); + +my @all_states = sort keys %$usa_state_data; + +# Mark all states are non-visited yet. +$_->{visited} = 0 foreach values %$usa_state_data; + +sub is_traversable_via { + my ($word, $adjacents) = @_; + + foreach my $state (@{$usa_state_data}{@$adjacents}) { + next if $state->{visited}; + my $initials = $state->{initials}; + next if $initials ne substr($word, 0, length($initials)); + return ($state) if length($initials) eq length($word); + local $state->{visited} = 1; + if (my @path = is_traversable_via(substr($word, length($initials)), $state->{adjacent})) { + return ($state, @path); + } + } + + return; +} + +my $largest_length_so_far = 0; +my @largest_words_so_far; + +open my $dict, '<', '/usr/share/dict/words'; +while (<$dict>) { + chomp; + my $word = $_; + next unless length($word) >= $largest_length_so_far; + if (my @path = is_traversable_via(lc $word, \@all_states)) { + if (length($word) == $largest_length_so_far) { + push @largest_words_so_far, [$word, \@path]; + } else { + $largest_length_so_far = length($word); + @largest_words_so_far = ([$word, \@path]); + } + } +} +close $dict; + +foreach (@largest_words_so_far) { + my ($word, $path) = @$_; + say $word, ' (', join(' => ', map {$_->{name}} @$path), ')'; +} -- cgit From c38d7c53f21f035966c049f21a658db64299b0e4 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Thu, 27 Jun 2019 11:10:30 +0100 Subject: - Added solutions by E. Choroba. - Added script refresh-stats.sh. --- script/refresh-stats.sh | 48 +++ stats/pwc-current.json | 164 +++++----- stats/pwc-language-breakdown-summary.json | 66 ++-- stats/pwc-language-breakdown.json | 136 ++++---- stats/pwc-leaders.json | 494 +++++++++++++++--------------- stats/pwc-summary-1-30.json | 34 +- stats/pwc-summary-31-60.json | 46 +-- stats/pwc-summary-61-90.json | 40 +-- stats/pwc-summary-91-120.json | 48 +-- stats/pwc-summary.json | 254 +++++++-------- 10 files changed, 691 insertions(+), 639 deletions(-) create mode 100644 script/refresh-stats.sh diff --git a/script/refresh-stats.sh b/script/refresh-stats.sh new file mode 100644 index 0000000000..84edfb8c08 --- /dev/null +++ b/script/refresh-stats.sh @@ -0,0 +1,48 @@ +fetch-pwc-stats --members members.json --source challenge-001 --current +mv pwc-current.json stats/pwc-challenge-001.json +fetch-pwc-stats --members members.json --source challenge-002 --current +mv pwc-current.json stats/pwc-challenge-002.json +fetch-pwc-stats --members members.json --source challenge-003 --current +mv pwc-current.json stats/pwc-challenge-003.json +fetch-pwc-stats --members members.json --source challenge-004 --current +mv pwc-current.json stats/pwc-challenge-004.json +fetch-pwc-stats --members members.json --source challenge-005 --current +mv pwc-current.json stats/pwc-challenge-005.json +fetch-pwc-stats --members members.json --source challenge-006 --current +mv pwc-current.json stats/pwc-challenge-006.json +fetch-pwc-stats --members members.json --source challenge-007 --current +mv pwc-current.json stats/pwc-challenge-007.json +fetch-pwc-stats --members members.json --source challenge-008 --current +mv pwc-current.json stats/pwc-challenge-008.json +fetch-pwc-stats --members members.json --source challenge-009 --current +mv pwc-current.json stats/pwc-challenge-009.json +fetch-pwc-stats --members members.json --source challenge-010 --current +mv pwc-current.json stats/pwc-challenge-010.json +fetch-pwc-stats --members members.json --source challenge-011 --current +mv pwc-current.json stats/pwc-challenge-011.json +fetch-pwc-stats --members members.json --source challenge-012 --current +mv pwc-current.json stats/pwc-challenge-012.json +fetch-pwc-stats --members members.json --source challenge-013 --current +mv pwc-current.json stats/pwc-challenge-013.json +fetch-pwc-stats --members members.json --source challenge-014 --current +mv pwc-current.json stats/ + +fetch-pwc-stats --members members.json --source challenge-001 --summary +fetch-pwc-stats --members members.json --source challenge-002 --master pwc-summary.json --update +fetch-pwc-stats --members members.json --source challenge-003 --master pwc-summary.json --update +fetch-pwc-stats --members members.json --source challenge-004 --master pwc-summary.json --update +fetch-pwc-stats --members members.json --source challenge-005 --master pwc-summary.json --update +fetch-pwc-stats --members members.json --source challenge-006 --master pwc-summary.json --update +fetch-pwc-stats --members members.json --source challenge-007 --master pwc-summary.json --update +fetch-pwc-stats --members members.json --source challenge-008 --master pwc-summary.json --update +fetch-pwc-stats --members members.json --source challenge-009 --master pwc-summary.json --update +fetch-pwc-stats --members members.json --source challenge-010 --master pwc-summary.json --update +fetch-pwc-stats --members members.json --source challenge-011 --master pwc-summary.json --update +fetch-pwc-stats --members members.json --source challenge-012 --master pwc-summary.json --update +fetch-pwc-stats --members members.json --source challenge-013 --master pwc-summary.json --update +mv pwc-summary.json stats/pwc-master-stats.json + +echo Now fetch current stats +echo ups +echo upl +echo upb diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 21f2e1f3f7..5f325400f2 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,41 +1,49 @@ { + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "title" : { + "text" : "Perl Weekly Challenge - 014" + }, "series" : [ { "data" : [ { + "y" : 2, "name" : "Aaron Sherman", - "drilldown" : "Aaron Sherman", - "y" : 2 + "drilldown" : "Aaron Sherman" }, { + "drilldown" : "Andrezgz", "name" : "Andrezgz", - "y" : 2, - "drilldown" : "Andrezgz" + "y" : 2 }, { - "name" : "Dave Jacoby", "drilldown" : "Dave Jacoby", - "y" : 4 + "y" : 4, + "name" : "Dave Jacoby" }, { + "y" : 4, "name" : "Donald Hunter", - "drilldown" : "Donald Hunter", - "y" : 4 + "drilldown" : "Donald Hunter" }, { - "name" : "Duane Powell", "drilldown" : "Duane Powell", + "name" : "Duane Powell", "y" : 2 }, { - "name" : "E. Choroba", - "y" : 2, - "drilldown" : "E. Choroba" + "drilldown" : "E. Choroba", + "y" : 3, + "name" : "E. Choroba" }, { - "name" : "Feng Chang", "drilldown" : "Feng Chang", - "y" : 4 + "y" : 4, + "name" : "Feng Chang" }, { "name" : "Gustavo Chaves", @@ -43,14 +51,14 @@ "drilldown" : "Gustavo Chaves" }, { - "y" : 2, "drilldown" : "Kevin Colyer", - "name" : "Kevin Colyer" + "name" : "Kevin Colyer", + "y" : 2 }, { - "name" : "Lubos Kolouch", "drilldown" : "Lubos Kolouch", - "y" : 3 + "y" : 3, + "name" : "Lubos Kolouch" }, { "drilldown" : "Robert Van Dam", @@ -59,84 +67,56 @@ }, { "name" : "Roger Bell West", - "drilldown" : "Roger Bell West", - "y" : 2 + "y" : 2, + "drilldown" : "Roger Bell West" }, { - "y" : 1, "drilldown" : "Simon Proctor", - "name" : "Simon Proctor" + "name" : "Simon Proctor", + "y" : 1 }, { "y" : 3, - "drilldown" : "Steven Wilson", - "name" : "Steven Wilson" + "name" : "Steven Wilson", + "drilldown" : "Steven Wilson" }, { - "name" : "Walt Mankowski", "drilldown" : "Walt Mankowski", - "y" : 2 + "y" : 2, + "name" : "Walt Mankowski" } ], - "colorByPoint" : 1, - "name" : "Perl Weekly Challenge - 014" + "name" : "Perl Weekly Challenge - 014", + "colorByPoint" : 1 } ], "chart" : { "type" : "column" }, - "tooltip" : { - "followPointer" : 1, - "headerFormat" : "{series.name}
", - "pointFormat" : "{point.name}: {point.y:f}
" - }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - } - } - }, - "xAxis" : { - "type" : "category" - }, - "subtitle" : { - "text" : "[Champions: 15] Last updated at 2019-06-26 16:42:53 GMT" - }, - "legend" : { - "enabled" : 0 - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, "drilldown" : { "series" : [ { - "id" : "Aaron Sherman", + "name" : "Aaron Sherman", "data" : [ [ "Perl 6", 2 ] ], - "name" : "Aaron Sherman" + "id" : "Aaron Sherman" }, { - "name" : "Andrezgz", "data" : [ [ "Perl 5", 2 ] ], + "name" : "Andrezgz", "id" : "Andrezgz" }, { - "id" : "Dave Jacoby", + "name" : "Dave Jacoby", "data" : [ [ "Perl 5", @@ -151,9 +131,10 @@ 1 ] ], - "name" : "Dave Jacoby" + "id" : "Dave Jacoby" }, { + "id" : "Donald Hunter", "data" : [ [ "Perl 6", @@ -164,31 +145,33 @@ 2 ] ], - "id" : "Donald Hunter", "name" : "Donald Hunter" }, { "id" : "Duane Powell", + "name" : "Duane Powell", "data" : [ [ "Perl 5", 2 ] - ], - "name" : "Duane Powell" + ] }, { - "name" : "E. Choroba", "id" : "E. Choroba", "data" : [ [ "Perl 5", 2 + ], + [ + "Blog", + 1 ] - ] + ], + "name" : "E. Choroba" }, { - "name" : "Feng Chang", "data" : [ [ "Perl 5", @@ -199,67 +182,68 @@ 2 ] ], + "name" : "Feng Chang", "id" : "Feng Chang" }, { + "id" : "Gustavo Chaves", "name" : "Gustavo Chaves", "data" : [ [ "Perl 5", 2 ] - ], - "id" : "Gustavo Chaves" + ] }, { - "name" : "Kevin Colyer", "data" : [ [ "Perl 6", 2 ] ], + "name" : "Kevin Colyer", "id" : "Kevin Colyer" }, { + "id" : "Lubos Kolouch", "name" : "Lubos Kolouch", "data" : [ [ "Perl 5", 3 ] - ], - "id" : "Lubos Kolouch" + ] }, { - "name" : "Robert Van Dam", "id" : "Robert Van Dam", "data" : [ [ "Perl 5", 3 ] - ] + ], + "name" : "Robert Van Dam" }, { + "id" : "Roger Bell West", "data" : [ [ "Perl 5", 2 ] ], - "id" : "Roger Bell West", "name" : "Roger Bell West" }, { - "name" : "Simon Proctor", - "id" : "Simon Proctor", "data" : [ [ "Perl 6", 1 ] - ] + ], + "name" : "Simon Proctor", + "id" : "Simon Proctor" }, { "name" : "Steven Wilson", @@ -287,7 +271,27 @@ } ] }, - "title" : { - "text" : "Perl Weekly Challenge - 014" + "tooltip" : { + "followPointer" : 1, + "headerFormat" : "{series.name}
", + "pointFormat" : "{point.name}: {point.y:f}
" + }, + "subtitle" : { + "text" : "[Champions: 15] Last updated at 2019-06-27 10:02:55 GMT" + }, + "legend" : { + "enabled" : 0 + }, + "xAxis" : { + "type" : "category" + }, + "plotOptions" : { + "series" : { + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + }, + "borderWidth" : 0 + } } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 07852e7c50..58f05e50b4 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,44 +1,23 @@ { - "chart" : { - "type" : "column" - }, - "title" : { - "text" : "Perl Weekly Challenge Contributions - 2019" - }, - "tooltip" : { - "pointFormat" : "{point.y:.0f}" - }, - "xAxis" : { - "type" : "category", - "labels" : { - "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" - } - } - }, - "subtitle" : { - "text" : "Last updated at 2019-06-26 16:43:07 GMT" - }, "series" : [ { "name" : "Contributions", "dataLabels" : { - "enabled" : "true", - "color" : "#FFFFFF", - "rotation" : -90, - "format" : "{point.y:.0f}", + "y" : 10, "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" }, - "y" : 10, - "align" : "right" + "rotation" : -90, + "color" : "#FFFFFF", + "align" : "right", + "format" : "{point.y:.0f}", + "enabled" : "true" }, "data" : [ [ "Blog", - 122 + 123 ], [ "Perl 5", @@ -51,13 +30,34 @@ ] } ], - "legend" : { - "enabled" : "false" - }, "yAxis" : { "title" : { "text" : null }, "min" : 0 + }, + "subtitle" : { + "text" : "Last updated at 2019-06-27 10:03:15 GMT" + }, + "legend" : { + "enabled" : "false" + }, + "chart" : { + "type" : "column" + }, + "tooltip" : { + "pointFormat" : "{point.y:.0f}" + }, + "xAxis" : { + "labels" : { + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + } + }, + "type" : "category" + }, + "title" : { + "text" : "Perl Weekly Challenge Contributions - 2019" } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index 737da49e25..974dfad178 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,18 +1,9 @@ { - "xAxis" : { - "type" : "category" - }, - "tooltip" : { - "pointFormat" : "Challenge {point.name}: {point.y:f}
", - "headerFormat" : "", - "followPointer" : "true" - }, - "chart" : { - "type" : "column" - }, "drilldown" : { "series" : [ { + "id" : "001", + "name" : "001", "data" : [ [ "Perl 5", @@ -26,9 +17,7 @@ "Blog", 10 ] - ], - "id" : "001", - "name" : "001" + ] }, { "id" : "002", @@ -49,6 +38,7 @@ ] }, { + "id" : "003", "data" : [ [ "Perl 5", @@ -63,12 +53,9 @@ 8 ] ], - "id" : "003", "name" : "003" }, { - "id" : "004", - "name" : "004", "data" : [ [ "Perl 5", @@ -82,9 +69,12 @@ "Blog", 9 ] - ] + ], + "name" : "004", + "id" : "004" }, { + "name" : "005", "data" : [ [ "Perl 5", @@ -99,12 +89,9 @@ 11 ] ], - "name" : "005", "id" : "005" }, { - "id" : "006", - "name" : "006", "data" : [ [ "Perl 5", @@ -118,11 +105,11 @@ "Blog", 6 ] - ] + ], + "name" : "006", + "id" : "006" }, { - "id" : "007", - "name" : "007", "data" : [ [ "Perl 5", @@ -136,7 +123,9 @@ "Blog", 8 ] - ] + ], + "name" : "007", + "id" : "007" }, { "id" : "008", @@ -157,6 +146,7 @@ ] }, { + "name" : "009", "data" : [ [ "Perl 5", @@ -171,11 +161,9 @@ 11 ] ], - "name" : "009", "id" : "009" }, { - "id" : "010", "name" : "010", "data" : [ [ @@ -190,9 +178,11 @@ "Blog", 9 ] - ] + ], + "id" : "010" }, { + "name" : "011", "data" : [ [ "Perl 5", @@ -207,7 +197,6 @@ 8 ] ], - "name" : "011", "id" : "011" }, { @@ -225,12 +214,11 @@ 9 ] ], - "id" : "012", - "name" : "012" + "name" : "012", + "id" : "012" }, { "name" : "013", - "id" : "013", "data" : [ [ "Perl 5", @@ -244,11 +232,10 @@ "Blog", 11 ] - ] + ], + "id" : "013" }, { - "name" : "014", - "id" : "014", "data" : [ [ "Perl 5", @@ -260,24 +247,23 @@ ], [ "Blog", - 4 + 5 ] - ] + ], + "name" : "014", + "id" : "014" } ] }, "plotOptions" : { "series" : { + "borderWidth" : 0, "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - }, - "borderWidth" : 0 + "enabled" : 1, + "format" : "{point.y}" + } } }, - "title" : { - "text" : "Perl Weekly Challenge Language" - }, "yAxis" : { "title" : { "text" : "Total Solutions" @@ -294,43 +280,43 @@ "y" : 123 }, { + "y" : 104, "drilldown" : "002", - "name" : "#002", - "y" : 104 + "name" : "#002" }, { + "y" : 66, "drilldown" : "003", - "name" : "#003", - "y" : 66 + "name" : "#003" }, { - "drilldown" : "004", "y" : 84, + "drilldown" : "004", "name" : "#004" }, { - "name" : "#005", "y" : 66, + "name" : "#005", "drilldown" : "005" }, { + "y" : 47, "drilldown" : "006", - "name" : "#006", - "y" : 47 + "name" : "#006" }, { "y" : 54, - "name" : "#007", - "drilldown" : "007" + "drilldown" : "007", + "name" : "#007" }, { "drilldown" : "008", - "y" : 67, - "name" : "#008" + "name" : "#008", + "y" : 67 }, { - "drilldown" : "009", "y" : 62, + "drilldown" : "009", "name" : "#009" }, { @@ -339,32 +325,46 @@ "y" : 58 }, { - "y" : 75, + "drilldown" : "011", "name" : "#011", - "drilldown" : "011" + "y" : 75 }, { "name" : "#012", - "y" : 81, - "drilldown" : "012" + "drilldown" : "012", + "y" : 81 }, { "name" : "#013", - "y" : 74, - "drilldown" : "013" + "drilldown" : "013", + "y" : 74 }, { - "name" : "#014", - "y" : 38, - "drilldown" : "014" + "y" : 39, + "drilldown" : "014", + "name" : "#014" } ] } ], + "xAxis" : { + "type" : "category" + }, + "title" : { + "text" : "Perl Weekly Challenge Language" + }, + "subtitle" : { + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2019-06-27 10:03:15 GMT" + }, "legend" : { "enabled" : "false" }, - "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2019-06-26 16:43:07 GMT" + "tooltip" : { + "headerFormat" : "", + "followPointer" : "true", + "pointFormat" : "Challenge {point.name}: {point.y:f}
" + }, + "chart" : { + "type" : "column" } } diff --git a/stats/pwc-leaders.json b/stats/pwc-leaders.json index b399ed3568..0b8e1d0c22 100644 --- a/stats/pwc-leaders.json +++ b/stats/pwc-leaders.json @@ -1,46 +1,23 @@ { - "legend" : { - "enabled" : "false" - }, - "plotOptions" : { - "series" : { - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - }, - "borderWidth" : 0 - } - }, - "yAxis" : { - "title" : { - "text" : "Total Score" - } - }, - "title" : { - "text" : "Perl Weekly Challenge Leaders (TOP 50)" - }, - "xAxis" : { - "type" : "category" - }, "series" : [ { - "name" : "Perl Weekly Challenge Leaders", "colorByPoint" : "true", + "name" : "Perl Weekly Challenge Leaders", "data" : [ { - "y" : 136, + "drilldown" : "Joelle Maslak", "name" : "#1: Joelle Maslak", - "drilldown" : "Joelle Maslak" + "y" : 136 }, { "y" : 132, - "name" : "#2: Laurent Rosenfeld", - "drilldown" : "Laurent Rosenfeld" + "drilldown" : "Laurent Rosenfeld", + "name" : "#2: Laurent Rosenfeld" }, { - "y" : 106, + "drilldown" : "Jaldhar H. Vyas", "name" : "#3: Jaldhar H. Vyas", - "drilldown" : "Jaldhar H. Vyas" + "y" : 106 }, { "drilldown" : "Ruben Westerberg", @@ -53,8 +30,8 @@ "drilldown" : "Adam Russell" }, { - "name" : "#6: Arne Sommer", "drilldown" : "Arne Sommer", + "name" : "#6: Arne Sommer", "y" : 70 }, { @@ -73,29 +50,29 @@ "y" : 66 }, { - "name" : "#10: Dave Jacoby", - "drilldown" : "Dave Jacoby", - "y" : 58 + "y" : 60, + "drilldown" : "E. Choroba", + "name" : "#10: E. Choroba" }, { - "drilldown" : "E. Choroba", - "name" : "#11: E. Choroba", - "y" : 58 + "y" : 58, + "name" : "#11: Dave Jacoby", + "drilldown" : "Dave Jacoby" }, { - "drilldown" : "Gustavo Chaves", + "y" : 58, "name" : "#12: Gustavo Chaves", - "y" : 58 + "drilldown" : "Gustavo Chaves" }, { + "y" : 54, "name" : "#13: Andrezgz", - "drilldown" : "Andrezgz", - "y" : 54 + "drilldown" : "Andrezgz" }, { - "y" : 54, + "name" : "#14: Francis Whittle", "drilldown" : "Francis Whittle", - "name" : "#14: Francis Whittle" + "y" : 54 }, { "y" : 48, @@ -108,44 +85,44 @@ "y" : 44 }, { - "y" : 40, + "name" : "#17: Daniel Mantovani", "drilldown" : "Daniel Mantovani", - "name" : "#17: Daniel Mantovani" + "y" : 40 }, { + "y" : 40, "name" : "#18: Duncan C. White", - "drilldown" : "Duncan C. White", - "y" : 40 + "drilldown" : "Duncan C. White" }, { - "name" : "#19: Steven Wilson", "drilldown" : "Steven Wilson", + "name" : "#19: Steven Wilson", "y" : 38 }, { - "y" : 36, "drilldown" : "Feng Chang", - "name" : "#20: Feng Chang" + "name" : "#20: Feng Chang", + "y" : 36 }, { - "drilldown" : "Yozen Hernandez", + "y" : 34, "name" : "#21: Yozen Hernandez", - "y" : 34 + "drilldown" : "Yozen Hernandez" }, { - "y" : 32, "name" : "#22: Mark Senn", - "drilldown" : "Mark Senn" + "drilldown" : "Mark Senn", + "y" : 32 }, { "y" : 32, - "drilldown" : "Nick Logan", - "name" : "#23: Nick Logan" + "name" : "#23: Nick Logan", + "drilldown" : "Nick Logan" }, { - "y" : 28, "drilldown" : "Lars Balker", - "name" : "#24: Lars Balker" + "name" : "#24: Lars Balker", + "y" : 28 }, { "y" : 26, @@ -159,8 +136,8 @@ }, { "y" : 24, - "drilldown" : "Maxim Nechaev", - "name" : "#27: Maxim Nechaev" + "name" : "#27: Maxim Nechaev", + "drilldown" : "Maxim Nechaev" }, { "y" : 22, @@ -173,14 +150,14 @@ "name" : "#29: Doug Schrag" }, { - "name" : "#30: Kevin Colyer", + "y" : 16, "drilldown" : "Kevin Colyer", - "y" : 16 + "name" : "#30: Kevin Colyer" }, { - "y" : 16, "name" : "#31: Robert Gratza", - "drilldown" : "Robert Gratza" + "drilldown" : "Robert Gratza", + "y" : 16 }, { "y" : 14, @@ -188,39 +165,39 @@ "name" : "#32: John Barrett" }, { + "y" : 14, "name" : "#33: Khalid", - "drilldown" : "Khalid", - "y" : 14 + "drilldown" : "Khalid" }, { - "y" : 12, "drilldown" : "Aaron Sherman", - "name" : "#34: Aaron Sherman" + "name" : "#34: Aaron Sherman", + "y" : 12 }, { - "y" : 12, "drilldown" : "Donald Hunter", - "name" : "#35: Donald Hunter" + "name" : "#35: Donald Hunter", + "y" : 12 }, { - "drilldown" : "Jaime Corchado", + "y" : 12, "name" : "#36: Jaime Corchado", - "y" : 12 + "drilldown" : "Jaime Corchado" }, { - "name" : "#37: Kivanc Yazan", "drilldown" : "Kivanc Yazan", + "name" : "#37: Kivanc Yazan", "y" : 12 }, { - "y" : 12, + "name" : "#38: Maxim Kolodyazhny", "drilldown" : "Maxim Kolodyazhny", - "name" : "#38: Maxim Kolodyazhny" + "y" : 12 }, { - "y" : 12, + "name" : "#39: Philippe Bruhat", "drilldown" : "Philippe Bruhat", - "name" : "#39: Philippe Bruhat" + "y" : 12 }, { "y" : 12, @@ -228,49 +205,49 @@ "drilldown" : "Sergio Iglesias" }, { - "y" : 10, + "drilldown" : "Arpad Toth", "name" : "#41: Arpad Toth", - "drilldown" : "Arpad Toth" + "y" : 10 }, { "y" : 10, - "name" : "#42: Lubos Kolouch", - "drilldown" : "Lubos Kolouch" + "drilldown" : "Lubos Kolouch", + "name" : "#42: Lubos Kolouch" }, { - "name" : "#43: Neil Bowers", "drilldown" : "Neil Bowers", + "name" : "#43: Neil Bowers", "y" : 10 }, { - "name" : "#44: Pete Houston", "drilldown" : "Pete Houston", + "name" : "#44: Pete Houston", "y" : 10 }, { + "y" : 10, "name" : "#45: Steve Rogerson", - "drilldown" : "Steve Rogerson", - "y" : 10 + "drilldown" : "Steve Rogerson" }, { + "y" : 10, "drilldown" : "Veesh Goldman", - "name" : "#46: Veesh Goldman", - "y" : 10 + "name" : "#46: Veesh Goldman" }, { - "y" : 8, + "name" : "#47: Alex Daniel", "drilldown" : "Alex Daniel", - "name" : "#47: Alex Daniel" + "y" : 8 }, { - "y" : 8, "drilldown" : "Bob Kleemann", - "name" : "#48: Bob Kleemann" + "name" : "#48: Bob Kleemann", + "y" : 8 }, { - "y" : 8, + "drilldown" : "Chenyf", "name" : "#49: Chenyf", - "drilldown" : "Chenyf" + "y" : 8 }, { "y" : 8, @@ -280,14 +257,20 @@ ] } ], - "subtitle" : { - "text" : "Click the columns to drilldown the score breakdown. Last updated at 2019-06-26 16:43:04 GMT" + "chart" : { + "type" : "column" + }, + "title" : { + "text" : "Perl Weekly Challenge Leaders (TOP 50)" }, "drilldown" : { "series" : [ { - "id" : "Joelle Maslak", "data" : [ + [ + "Perl 6", + 32 + ], [ "Blog", 4 @@ -295,15 +278,14 @@ [ "Perl 5", 32 - ], - [ - "Perl 6", - 32 ] ], + "id" : "Joelle Maslak", "name" : "Joelle Maslak" }, { + "id" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld", "data" : [ [ "Perl 6", @@ -317,30 +299,29 @@ "Perl 5", 26 ] - ], - "id" : "Laurent Rosenfeld", - "name" : "Laurent Rosenfeld" + ] }, { - "name" : "Jaldhar H. Vyas", "data" : [ - [ - "Blog", - 1 - ], [ "Perl 5", 26 ], + [ + "Blog", + 1 + ], [ "Perl 6", 26 ] ], - "id" : "Jaldhar H. Vyas" + "id" : "Jaldhar H. Vyas", + "name" : "Jaldhar H. Vyas" }, { "id" : "Ruben Westerberg", + "name" : "Ruben Westerberg", "data" : [ [ "Perl 6", @@ -350,25 +331,23 @@ "Perl 5", 23 ] - ], - "name" : "Ruben Westerberg" + ] }, { - "name" : "Adam Russell", "id" : "Adam Russell", + "name" : "Adam Russell", "data" : [ - [ - "Blog", - 13 - ], [ "Perl 5", 26 + ], + [ + "Blog", + 13 ] ] }, { - "id" : "Arne Sommer", "data" : [ [ "Perl 6", @@ -379,25 +358,26 @@ 12 ] ], - "name" : "Arne Sommer" + "name" : "Arne Sommer", + "id" : "Arne Sommer" }, { "name" : "Kian-Meng Ang", "id" : "Kian-Meng Ang", "data" : [ - [ - "Blog", - 11 - ], [ "Perl 5", 23 + ], + [ + "Blog", + 11 ] ] }, { - "name" : "Simon Proctor", "id" : "Simon Proctor", + "name" : "Simon Proctor", "data" : [ [ "Perl 6", @@ -414,7 +394,13 @@ ] }, { + "name" : "Athanasius", + "id" : "Athanasius", "data" : [ + [ + "Perl 6", + 4 + ], [ "Perl 5", 28 @@ -422,48 +408,44 @@ [ "Blog", 1 - ], - [ - "Perl 6", - 4 ] - ], - "id" : "Athanasius", - "name" : "Athanasius" + ] }, { - "name" : "Dave Jacoby", + "name" : "E. Choroba", + "id" : "E. Choroba", "data" : [ [ "Perl 5", - 15 + 20 ], [ "Blog", - 13 - ], - [ - "Perl 6", - 1 + 10 ] - ], - "id" : "Dave Jacoby" + ] }, { - "name" : "E. Choroba", - "id" : "E. Choroba", "data" : [ [ - "Blog", - 9 + "Perl 6", + 1 ], [ "Perl 5", - 20 + 15 + ], + [ + "Blog", + 13 ] - ] + ], + "name" : "Dave Jacoby", + "id" : "Dave Jacoby" }, { + "id" : "Gustavo Chaves", + "name" : "Gustavo Chaves", "data" : [ [ "Blog", @@ -473,36 +455,38 @@ "Perl 5", 25 ] - ], - "id" : "Gustavo Chaves", - "name" : "Gustavo Chaves" + ] }, { + "name" : "Andrezgz", "id" : "Andrezgz", "data" : [ [ "Perl 5", 27 ] - ], - "name" : "Andrezgz" + ] }, { + "id" : "Francis Whittle", "name" : "Francis Whittle", "data" : [ - [ - "Perl 6", - 21 - ], [ "Blog",