From 15cc51dae188fa61bf6051aaa6e5daf771dcfcbb Mon Sep 17 00:00:00 2001 From: "E. Choroba" Date: Mon, 3 Feb 2020 08:52:53 +0100 Subject: Add solutions to 046 (Cryptic Message + Is the Room Open?) by E. Choroba --- challenge-046/e-choroba/perl/ch-1.pl | 22 ++++++++++++++++++++++ challenge-046/e-choroba/perl/ch-2a.pl | 13 +++++++++++++ challenge-046/e-choroba/perl/ch-2b.pl | 9 +++++++++ challenge-046/e-choroba/perl/ch-2c.pl | 6 ++++++ 4 files changed, 50 insertions(+) create mode 100755 challenge-046/e-choroba/perl/ch-1.pl create mode 100755 challenge-046/e-choroba/perl/ch-2a.pl create mode 100755 challenge-046/e-choroba/perl/ch-2b.pl create mode 100755 challenge-046/e-choroba/perl/ch-2c.pl diff --git a/challenge-046/e-choroba/perl/ch-1.pl b/challenge-046/e-choroba/perl/ch-1.pl new file mode 100755 index 0000000000..affc81b7fe --- /dev/null +++ b/challenge-046/e-choroba/perl/ch-1.pl @@ -0,0 +1,22 @@ +#!/usr/bin/perl +use warnings; +use strict; + +use List::Util qw{ max }; + +my @message_sets = (['Hxl4!', 'ce-lo', 'ze6lg', 'HWlvR', 'q9m#o'], + ['P+2l!ato', '1e80R$4u', '5-r]+a>/', 'Pxwlb3k\\', + '2e35R8yu', '{$_} == $max and print for keys %$position; + } + print "\n"; +} diff --git a/challenge-046/e-choroba/perl/ch-2a.pl b/challenge-046/e-choroba/perl/ch-2a.pl new file mode 100755 index 0000000000..372ad3cc19 --- /dev/null +++ b/challenge-046/e-choroba/perl/ch-2a.pl @@ -0,0 +1,13 @@ +#!/usr/bin/perl +use warnings; +use strict; +use feature qw{ say }; + +my $MAX = 500; + +my @doors = (0) x $MAX; # All closed. +for my $employee (0 .. $MAX - 1) { + $doors[$_] = ! $doors[$_] + for grep 0 == (1 + $_) % (1 + $employee), 0 .. $MAX - 1; +} +say join ' ', map 1 + $_, grep $doors[$_], 0 .. $MAX; diff --git a/challenge-046/e-choroba/perl/ch-2b.pl b/challenge-046/e-choroba/perl/ch-2b.pl new file mode 100755 index 0000000000..38ff9a103a --- /dev/null +++ b/challenge-046/e-choroba/perl/ch-2b.pl @@ -0,0 +1,9 @@ +#!/usr/bin/perl +use warnings; +use strict; +use feature qw{ say }; + +say join ' ', grep { + my $door = $_; + 1 == (grep 0 == $door % $_, 1 .. 500) % 2 +} 1 .. 500; diff --git a/challenge-046/e-choroba/perl/ch-2c.pl b/challenge-046/e-choroba/perl/ch-2c.pl new file mode 100755 index 0000000000..0b60d23608 --- /dev/null +++ b/challenge-046/e-choroba/perl/ch-2c.pl @@ -0,0 +1,6 @@ +#!/usr/bin/perl +use warnings; +use strict; +use feature qw{ say }; + +say join ' ', map $_ ** 2, 1 .. sqrt 500; -- cgit From b06fb82804ced460fec17d500448986fbec0ebe8 Mon Sep 17 00:00:00 2001 From: Roger Bell_West Date: Mon, 3 Feb 2020 09:42:23 +0000 Subject: Blog post for challenge #42. --- challenge-042/roger-bell-west/blog.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 challenge-042/roger-bell-west/blog.txt diff --git a/challenge-042/roger-bell-west/blog.txt b/challenge-042/roger-bell-west/blog.txt new file mode 100644 index 0000000000..c10d17d6f2 --- /dev/null +++ b/challenge-042/roger-bell-west/blog.txt @@ -0,0 +1 @@ +https://blog.firedrake.org/archive/2020/02/Perl_Weekly_Challenge_42__octal_and_balancing_brackets.html -- cgit From 4f93f9cb7e80313097925e99e3392d8c1f94be77 Mon Sep 17 00:00:00 2001 From: Roger Bell_West Date: Mon, 3 Feb 2020 10:14:58 +0000 Subject: Solutions for challenge #46. --- challenge-046/roger-bell-west/input1 | 5 +++++ challenge-046/roger-bell-west/input2 | 6 ++++++ challenge-046/roger-bell-west/perl5/ch-1.pl | 19 +++++++++++++++++++ challenge-046/roger-bell-west/perl5/ch-2.pl | 14 ++++++++++++++ challenge-046/roger-bell-west/perl6/ch-1.p6 | 16 ++++++++++++++++ challenge-046/roger-bell-west/perl6/ch-2.p6 | 11 +++++++++++ 6 files changed, 71 insertions(+) create mode 100644 challenge-046/roger-bell-west/input1 create mode 100644 challenge-046/roger-bell-west/input2 create mode 100755 challenge-046/roger-bell-west/perl5/ch-1.pl create mode 100755 challenge-046/roger-bell-west/perl5/ch-2.pl create mode 100755 challenge-046/roger-bell-west/perl6/ch-1.p6 create mode 100755 challenge-046/roger-bell-west/perl6/ch-2.p6 diff --git a/challenge-046/roger-bell-west/input1 b/challenge-046/roger-bell-west/input1 new file mode 100644 index 0000000000..c6506df0d8 --- /dev/null +++ b/challenge-046/roger-bell-west/input1 @@ -0,0 +1,5 @@ +H x l 4 ! +c e - l o +z e 6 l g +H W l v R +q 9 m # o diff --git a/challenge-046/roger-bell-west/input2 b/challenge-046/roger-bell-west/input2 new file mode 100644 index 0000000000..e36e661453 --- /dev/null +++ b/challenge-046/roger-bell-west/input2 @@ -0,0 +1,6 @@ +P + 2 l ! a t o +1 e 8 0 R $ 4 u +5 - r ] + a > / +P x w l b 3 k \ +2 e 3 5 R 8 y u +< ! r ^ ( ) k 0 diff --git a/challenge-046/roger-bell-west/perl5/ch-1.pl b/challenge-046/roger-bell-west/perl5/ch-1.pl new file mode 100755 index 0000000000..8a0a4ac40b --- /dev/null +++ b/challenge-046/roger-bell-west/perl5/ch-1.pl @@ -0,0 +1,19 @@ +#! /usr/bin/perl + +use strict; +use warnings; + +my @place; +while (<>) { + chomp; + my @k=split / /,$_; + map {$place[$_]{$k[$_]}++} (0..$#k); +} + +foreach my $h (@place) { + my @v=values %{$h}; + my @k=keys %{$h}; + my @i=sort {$v[$b] <=> $v[$a]} (0..$#v); + print $k[$i[0]]; +} +print "\n"; diff --git a/challenge-046/roger-bell-west/perl5/ch-2.pl b/challenge-046/roger-bell-west/perl5/ch-2.pl new file mode 100755 index 0000000000..cd3073fc19 --- /dev/null +++ b/challenge-046/roger-bell-west/perl5/ch-2.pl @@ -0,0 +1,14 @@ +#! /usr/bin/perl + +use strict; +use warnings; + +my @rooms=(1) x 500; + +foreach my $n (2..500) { + for (my $k=$n-1;$k<500;$k+=$n) { + $rooms[$k]=1-$rooms[$k]; + } +} + +print map {$_+1,"\n"} grep {$rooms[$_]==1} (0..$#rooms); diff --git a/challenge-046/roger-bell-west/perl6/ch-1.p6 b/challenge-046/roger-bell-west/perl6/ch-1.p6 new file mode 100755 index 0000000000..6740f36e46 --- /dev/null +++ b/challenge-046/roger-bell-west/perl6/ch-1.p6 @@ -0,0 +1,16 @@ +#! /usr/bin/perl6 + +my @place; +for lines() { + .chomp; + my @k=comb(/\S/,$_); + map {@place[$_]{@k[$_]}++}, (0..@k.end); +} + +for @place -> %h { + my @v=values %h; + my @k=keys %h; + my @i=sort {@v[$^b] <=> @v[$^a]}, (0..@v.end); + print @k[@i[0]]; +} +print "\n"; diff --git a/challenge-046/roger-bell-west/perl6/ch-2.p6 b/challenge-046/roger-bell-west/perl6/ch-2.p6 new file mode 100755 index 0000000000..34c52743d1 --- /dev/null +++ b/challenge-046/roger-bell-west/perl6/ch-2.p6 @@ -0,0 +1,11 @@ +#! /usr/bin/perl6 + +my @rooms=1 xx 500; + +for 2..500 -> $n { + loop (my $k=$n-1 ; $k <500 ; $k+=$n) { + @rooms[$k]=1-@rooms[$k]; + } +} + +map {say $_+1}, grep {@rooms[$_]==1}, (0..@rooms.end); -- cgit From 71c7b41a740de7349c9bb1e3a2ff9884df2e5fe9 Mon Sep 17 00:00:00 2001 From: Luca Ferrari Date: Mon, 3 Feb 2020 11:46:28 +0100 Subject: Challenge 46, task 1. --- challenge-046/luca-ferrari/ch-1.p6 | 111 +++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 challenge-046/luca-ferrari/ch-1.p6 diff --git a/challenge-046/luca-ferrari/ch-1.p6 b/challenge-046/luca-ferrari/ch-1.p6 new file mode 100644 index 0000000000..46cb1f0cc3 --- /dev/null +++ b/challenge-046/luca-ferrari/ch-1.p6 @@ -0,0 +1,111 @@ +#!env perl6 + +# Perl Weekly Challenge 46 +# +# Task 1 +# The communication system of an office is broken +# and message received are not completely reliable. +# To send message Hello, it ended up sending these following: + +# H x l 4 ! +# c e - l o +# z e 6 l g +# H W l v R +# q 9 m # o +# +# Similary another day we received a message repeatedly like below: +# +# P + 2 l ! a t o +# 1 e 8 0 R $ 4 u +# 5 - r ] + a > / +# P x w l b 3 k \ +# 2 e 3 5 R 8 y u +# < ! r ^ ( ) k 0 +# +# Write a script to decrypt the above repeated message (one message repeated 6 times). +# HINT: Look for characters repeated in a particular position in all six messages received. +# +# +# +# The output produced is: +# % perl6 ch-1.p6 +# The encoded message was +# H x l 4 ! +# c e - l o +# z e 6 l g +# H W l v R +# q 9 m # o +# resulted into the plain message +# Hello +# The encoded message was +# P + 2 l ! a t o +# 1 e 8 0 R $ 4 u +# 5 - r ] + a > / +# P x w l b 3 k \ +# 2 e 3 5 R 8 y u +# < ! r ^ ( ) k 0 +# resulted into the plain message +# PerlRaku + +# Done! + + + + + +sub decode( @message ) { + my @chars; + my $decoded; + + # covnert every line of the message into single chars + # and push them as an array for every position within the + # string. It produces something like: + # [[P 1 5 P 2 <] [+ e - x e !] [2 8 r w 3 r] + # [l 0 ] l 5 ^] [! R + b R (] [a $ a 3 8 )] + # [t 4 > k y k] [o u / \ u 0]] + for @message -> $single-line { + for $single-line.split( '', :skip-empty ) { + next if ! $_.trim; + @chars[ $++ ].push: $_; + } + } + + # now for every inner list, gets the chars that are + # present multiple times + for @chars -> @line { + for @line -> $searching_for { + if @line.grep( { $_ eq $searching_for} ).elems > 1 { + $decoded ~= $searching_for; + last; + } + } + } + + return $decoded; +} + +sub MAIN { + my @hello-msg = "H x l 4 !" + , "c e - l o" + , "z e 6 l g" + , "H W l v R" + , 'q 9 m # o'; + + + my @secret-message = 'P + 2 l ! a t o' + ,'1 e 8 0 R $ 4 u' + ,'5 - r ] + a > /' + ,'P x w l b 3 k \ ' + ,'2 e 3 5 R 8 y u' + ,'< ! r ^ ( ) k 0'; + + + for [@hello-msg, @secret-message ] { + say "The encoded message was "; + $_.join( "\n" ).say; + say "resulted into the plain message "; + say decode( $_ ); + } + + say "\nDone!"; +} -- cgit From cd9d4ec54614c8baa8726a21160b9744c83d2232 Mon Sep 17 00:00:00 2001 From: Simon Proctor Date: Mon, 3 Feb 2020 11:02:31 +0000 Subject: Challenge 1 done --- challenge-046/simon-proctor/raku/ch-1.p6 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 challenge-046/simon-proctor/raku/ch-1.p6 diff --git a/challenge-046/simon-proctor/raku/ch-1.p6 b/challenge-046/simon-proctor/raku/ch-1.p6 new file mode 100644 index 0000000000..0996db054e --- /dev/null +++ b/challenge-046/simon-proctor/raku/ch-1.p6 @@ -0,0 +1,24 @@ +#!/usr/bin/env raku + +my @test1 = (, + , + , + , + ); + +die "Decoder is bust" unless decode-message( @test1 ) ~~ "Hello"; + +my @message = ( +

, + <1 e 8 0 R $ 4 u>, + <5 - r ] + a \> />, +

, + <2 e 3 5 R 8 y u>, + <\< ! r ^ ( ) k 0>, + ); + +say decode-message( @message ); + +sub decode-message( $data ) { + zip( $data.List ).map( { Bag.new($_) } ).map( *.pairs.sort( { $^b.value cmp $^a.value } ).first.key ).join("") +} -- cgit From 6dff2b10d2cb38ccdc28f9b3aa39496c10e6ce5a Mon Sep 17 00:00:00 2001 From: Luca Ferrari Date: Mon, 3 Feb 2020 12:03:54 +0100 Subject: Implementation of the Task2, challenge 46. --- challenge-046/luca-ferrari/ch-2.p6 | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 challenge-046/luca-ferrari/ch-2.p6 diff --git a/challenge-046/luca-ferrari/ch-2.p6 b/challenge-046/luca-ferrari/ch-2.p6 new file mode 100644 index 0000000000..54d72de681 --- /dev/null +++ b/challenge-046/luca-ferrari/ch-2.p6 @@ -0,0 +1,58 @@ +#!env perl6 + +# Perl Weekly Challenge 46 +# +# Task 2 +# There are 500 rooms in a hotel with 500 employees having keys to all the rooms. +# The first employee opened main entrance door of all the rooms. +# The second employee then closed the doors of room numbers 2,4,6,8,10 and so on to 500. +# The third employee then closed the door if it was opened or opened the door if it was closed +# of rooms 3,6,9,12,15 and so on to 500. +# Similarly the fourth employee did the same as the third but only +# room numbers 4,8,12,16 and so on to 500. +# This goes on until all employees has had a turn. +# Write a script to find out all the rooms still open at the end. +# +# Possible output: +# % perl6 ch-2.p6 +# Room 1 is Open +# Room 4 is Open +# Room 9 is Open +# Room 16 is Open +# Room 25 is Open +# Room 36 is Open +# Room 49 is Open +# Room 64 is Open +# Room 81 is Open +# Room 100 is Open +# Room 121 is Open +# Room 144 is Open +# Room 169 is Open +# Room 196 is Open +# Room 225 is Open +# Room 256 is Open +# Room 289 is Open +# Room 324 is Open +# Room 361 is Open +# Room 400 is Open +# Room 441 is Open +# Room 484 is Open + + + + +sub MAIN( Int :$room-count = 500 ) { + + # create an hash with the rooms, the False status means they are closed, + # while the True means they are open + my %rooms = ( 1 .. $room-count).map: * => False; + + # every employee flips the status + for 1 .. $room-count -> $employee { + %rooms{ $_ } = ! %rooms{ $_ } if $_ %% $employee for 1 .. $room-count; + } + + # now print out all the opened rooms + say "Room $_ is Open" if %rooms{ $_ } for %rooms.keys.sort: *.Int <=> *.Int; + +} -- cgit From ad1e55f7116990caaf3baa2167598c1261b9ca52 Mon Sep 17 00:00:00 2001 From: Simon Proctor Date: Mon, 3 Feb 2020 11:10:06 +0000 Subject: I know there's a neat math thing for this (and a reason it's all the squares...) but I'm tired so brute force it is. --- challenge-046/simon-proctor/raku/ch-2.p6 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 challenge-046/simon-proctor/raku/ch-2.p6 diff --git a/challenge-046/simon-proctor/raku/ch-2.p6 b/challenge-046/simon-proctor/raku/ch-2.p6 new file mode 100644 index 0000000000..4b82c9fa15 --- /dev/null +++ b/challenge-046/simon-proctor/raku/ch-2.p6 @@ -0,0 +1,15 @@ +#!/usr/bin/env raku + +my @doors-open = 501 xx False; + +for 1..500 -> $inc { + my $cur = $inc; + while $cur <= 500 { + @doors-open[$cur] = ! @doors-open[$cur]; + $cur += $inc; + } +} + +for 1..500 -> $door { + say "$door is Open" if @doors-open[$door]; +} -- cgit From 19e5e3ccdf13e5620001288031fb7d7d896de736 Mon Sep 17 00:00:00 2001 From: Luca Ferrari Date: Mon, 3 Feb 2020 12:18:20 +0100 Subject: Placed solutions into directory. Added blog links. --- challenge-046/luca-ferrari/blog-1.txt | 1 + challenge-046/luca-ferrari/blog-2.txt | 1 + challenge-046/luca-ferrari/ch-1.p6 | 111 -------------------------------- challenge-046/luca-ferrari/ch-2.p6 | 58 ----------------- challenge-046/luca-ferrari/raku/ch-1.p6 | 111 ++++++++++++++++++++++++++++++++ challenge-046/luca-ferrari/raku/ch-2.p6 | 58 +++++++++++++++++ 6 files changed, 171 insertions(+), 169 deletions(-) create mode 100644 challenge-046/luca-ferrari/blog-1.txt create mode 100644 challenge-046/luca-ferrari/blog-2.txt delete mode 100644 challenge-046/luca-ferrari/ch-1.p6 delete mode 100644 challenge-046/luca-ferrari/ch-2.p6 create mode 100644 challenge-046/luca-ferrari/raku/ch-1.p6 create mode 100644 challenge-046/luca-ferrari/raku/ch-2.p6 diff --git a/challenge-046/luca-ferrari/blog-1.txt b/challenge-046/luca-ferrari/blog-1.txt new file mode 100644 index 0000000000..6da1f3f948 --- /dev/null +++ b/challenge-046/luca-ferrari/blog-1.txt @@ -0,0 +1 @@ +https://fluca1978.github.io/2020/02/03/PerlWeeklyChallened_46.html diff --git a/challenge-046/luca-ferrari/blog-2.txt b/challenge-046/luca-ferrari/blog-2.txt new file mode 100644 index 0000000000..6da1f3f948 --- /dev/null +++ b/challenge-046/luca-ferrari/blog-2.txt @@ -0,0 +1 @@ +https://fluca1978.github.io/2020/02/03/PerlWeeklyChallened_46.html diff --git a/challenge-046/luca-ferrari/ch-1.p6 b/challenge-046/luca-ferrari/ch-1.p6 deleted file mode 100644 index 46cb1f0cc3..0000000000 --- a/challenge-046/luca-ferrari/ch-1.p6 +++ /dev/null @@ -1,111 +0,0 @@ -#!env perl6 - -# Perl Weekly Challenge 46 -# -# Task 1 -# The communication system of an office is broken -# and message received are not completely reliable. -# To send message Hello, it ended up sending these following: - -# H x l 4 ! -# c e - l o -# z e 6 l g -# H W l v R -# q 9 m # o -# -# Similary another day we received a message repeatedly like below: -# -# P + 2 l ! a t o -# 1 e 8 0 R $ 4 u -# 5 - r ] + a > / -# P x w l b 3 k \ -# 2 e 3 5 R 8 y u -# < ! r ^ ( ) k 0 -# -# Write a script to decrypt the above repeated message (one message repeated 6 times). -# HINT: Look for characters repeated in a particular position in all six messages received. -# -# -# -# The output produced is: -# % perl6 ch-1.p6 -# The encoded message was -# H x l 4 ! -# c e - l o -# z e 6 l g -# H W l v R -# q 9 m # o -# resulted into the plain message -# Hello -# The encoded message was -# P + 2 l ! a t o -# 1 e 8 0 R $ 4 u -# 5 - r ] + a > / -# P x w l b 3 k \ -# 2 e 3 5 R 8 y u -# < ! r ^ ( ) k 0 -# resulted into the plain message -# PerlRaku - -# Done! - - - - - -sub decode( @message ) { - my @chars; - my $decoded; - - # covnert every line of the message into single chars - # and push them as an array for every position within the - # string. It produces something like: - # [[P 1 5 P 2 <] [+ e - x e !] [2 8 r w 3 r] - # [l 0 ] l 5 ^] [! R + b R (] [a $ a 3 8 )] - # [t 4 > k y k] [o u / \ u 0]] - for @message -> $single-line { - for $single-line.split( '', :skip-empty ) { - next if ! $_.trim; - @chars[ $++ ].push: $_; - } - } - - # now for every inner list, gets the chars that are - # present multiple times - for @chars -> @line { - for @line -> $searching_for { - if @line.grep( { $_ eq $searching_for} ).elems > 1 { - $decoded ~= $searching_for; - last; - } - } - } - - return $decoded; -} - -sub MAIN { - my @hello-msg = "H x l 4 !" - , "c e - l o" - , "z e 6 l g" - , "H W l v R" - , 'q 9 m # o'; - - - my @secret-message = 'P + 2 l ! a t o' - ,'1 e 8 0 R $ 4 u' - ,'5 - r ] + a > /' - ,'P x w l b 3 k \ ' - ,'2 e 3 5 R 8 y u' - ,'< ! r ^ ( ) k 0'; - - - for [@hello-msg, @secret-message ] { - say "The encoded message was "; - $_.join( "\n" ).say; - say "resulted into the plain message "; - say decode( $_ ); - } - - say "\nDone!"; -} diff --git a/challenge-046/luca-ferrari/ch-2.p6 b/challenge-046/luca-ferrari/ch-2.p6 deleted file mode 100644 index 54d72de681..0000000000 --- a/challenge-046/luca-ferrari/ch-2.p6 +++ /dev/null @@ -1,58 +0,0 @@ -#!env perl6 - -# Perl Weekly Challenge 46 -# -# Task 2 -# There are 500 rooms in a hotel with 500 employees having keys to all the rooms. -# The first employee opened main entrance door of all the rooms. -# The second employee then closed the doors of room numbers 2,4,6,8,10 and so on to 500. -# The third employee then closed the door if it was opened or opened the door if it was closed -# of rooms 3,6,9,12,15 and so on to 500. -# Similarly the fourth employee did the same as the third but only -# room numbers 4,8,12,16 and so on to 500. -# This goes on until all employees has had a turn. -# Write a script to find out all the rooms still open at the end. -# -# Possible output: -# % perl6 ch-2.p6 -# Room 1 is Open -# Room 4 is Open -# Room 9 is Open -# Room 16 is Open -# Room 25 is Open -# Room 36 is Open -# Room 49 is Open -# Room 64 is Open -# Room 81 is Open -# Room 100 is Open -# Room 121 is Open -# Room 144 is Open -# Room 169 is Open -# Room 196 is Open -# Room 225 is Open -# Room 256 is Open -# Room 289 is Open -# Room 324 is Open -# Room 361 is Open -# Room 400 is Open -# Room 441 is Open -# Room 484 is Open - - - - -sub MAIN( Int :$room-count = 500 ) { - - # create an hash with the rooms, the False status means they are closed, - # while the True means they are open - my %rooms = ( 1 .. $room-count).map: * => False; - - # every employee flips the status - for 1 .. $room-count -> $employee { - %rooms{ $_ } = ! %rooms{ $_ } if $_ %% $employee for 1 .. $room-count; - } - - # now print out all the opened rooms - say "Room $_ is Open" if %rooms{ $_ } for %rooms.keys.sort: *.Int <=> *.Int; - -} diff --git a/challenge-046/luca-ferrari/raku/ch-1.p6 b/challenge-046/luca-ferrari/raku/ch-1.p6 new file mode 100644 index 0000000000..46cb1f0cc3 --- /dev/null +++ b/challenge-046/luca-ferrari/raku/ch-1.p6 @@ -0,0 +1,111 @@ +#!env perl6 + +# Perl Weekly Challenge 46 +# +# Task 1 +# The communication system of an office is broken +# and message received are not completely reliable. +# To send message Hello, it ended up sending these following: + +# H x l 4 ! +# c e - l o +# z e 6 l g +# H W l v R +# q 9 m # o +# +# Similary another day we received a message repeatedly like below: +# +# P + 2 l ! a t o +# 1 e 8 0 R $ 4 u +# 5 - r ] + a > / +# P x w l b 3 k \ +# 2 e 3 5 R 8 y u +# < ! r ^ ( ) k 0 +# +# Write a script to decrypt the above repeated message (one message repeated 6 times). +# HINT: Look for characters repeated in a particular position in all six messages received. +# +# +# +# The output produced is: +# % perl6 ch-1.p6 +# The encoded message was +# H x l 4 ! +# c e - l o +# z e 6 l g +# H W l v R +# q 9 m # o +# resulted into the plain message +# Hello +# The encoded message was +# P + 2 l ! a t o +# 1 e 8 0 R $ 4 u +# 5 - r ] + a > / +# P x w l b 3 k \ +# 2 e 3 5 R 8 y u +# < ! r ^ ( ) k 0 +# resulted into the plain message +# PerlRaku + +# Done! + + + + + +sub decode( @message ) { + my @chars; + my $decoded; + + # covnert every line of the message into single chars + # and push them as an array for every position within the + # string. It produces something like: + # [[P 1 5 P 2 <] [+ e - x e !] [2 8 r w 3 r] + # [l 0 ] l 5 ^] [! R + b R (] [a $ a 3 8 )] + # [t 4 > k y k] [o u / \ u 0]] + for @message -> $single-line { + for $single-line.split( '', :skip-empty ) { + next if ! $_.trim; + @chars[ $++ ].push: $_; + } + } + + # now for every inner list, gets the chars that are + # present multiple times + for @chars -> @line { + for @line -> $searching_for { + if @line.grep( { $_ eq $searching_for} ).elems > 1 { + $decoded ~= $searching_for; + last; + } + } + } + + return $decoded; +} + +sub MAIN { + my @hello-msg = "H x l 4 !" + , "c e - l o" + , "z e 6 l g" + , "H W l v R" + , 'q 9 m # o'; + + + my @secret-message = 'P + 2 l ! a t o' + ,'1 e 8 0 R $ 4 u' + ,'5 - r ] + a > /' + ,'P x w l b 3 k \ ' + ,'2 e 3 5 R 8 y u' + ,'< ! r ^ ( ) k 0'; + + + for [@hello-msg, @secret-message ] { + say "The encoded message was "; + $_.join( "\n" ).say; + say "resulted into the plain message "; + say decode( $_ ); + } + + say "\nDone!"; +} diff --git a/challenge-046/luca-ferrari/raku/ch-2.p6 b/challenge-046/luca-ferrari/raku/ch-2.p6 new file mode 100644 index 0000000000..54d72de681 --- /dev/null +++ b/challenge-046/luca-ferrari/raku/ch-2.p6 @@ -0,0 +1,58 @@ +#!env perl6 + +# Perl Weekly Challenge 46 +# +# Task 2 +# There are 500 rooms in a hotel with 500 employees having keys to all the rooms. +# The first employee opened main entrance door of all the rooms. +# The second employee then closed the doors of room numbers 2,4,6,8,10 and so on to 500. +# The third employee then closed the door if it was opened or opened the door if it was closed +# of rooms 3,6,9,12,15 and so on to 500. +# Similarly the fourth employee did the same as the third but only +# room numbers 4,8,12,16 and so on to 500. +# This goes on until all employees has had a turn. +# Write a script to find out all the rooms still open at the end. +# +# Possible output: +# % perl6 ch-2.p6 +# Room 1 is Open +# Room 4 is Open +# Room 9 is Open +# Room 16 is Open +# Room 25 is Open +# Room 36 is Open +# Room 49 is Open +# Room 64 is Open +# Room 81 is Open +# Room 100 is Open +# Room 121 is Open +# Room 144 is Open +# Room 169 is Open +# Room 196 is Open +# Room 225 is Open +# Room 256 is Open +# Room 289 is Open +# Room 324 is Open +# Room 361 is Open +# Room 400 is Open +# Room 441 is Open +# Room 484 is Open + + + + +sub MAIN( Int :$room-count = 500 ) { + + # create an hash with the rooms, the False status means they are closed, + # while the True means they are open + my %rooms = ( 1 .. $room-count).map: * => False; + + # every employee flips the status + for 1 .. $room-count -> $employee { + %rooms{ $_ } = ! %rooms{ $_ } if $_ %% $employee for 1 .. $room-count; + } + + # now print out all the opened rooms + say "Room $_ is Open" if %rooms{ $_ } for %rooms.keys.sort: *.Int <=> *.Int; + +} -- cgit From d350cbfaf9ec347d8e42415574c84e966c5f4d27 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Mon, 3 Feb 2020 13:09:27 +0000 Subject: - Added solutions by E. Choroba. --- challenge-046/e-choroba/perl/ch-2.pl | 13 + challenge-046/e-choroba/perl/ch-2a.pl | 12 +- challenge-046/e-choroba/perl/ch-2b.pl | 5 +- challenge-046/e-choroba/perl/ch-2c.pl | 6 - stats/pwc-challenge-045.json | 619 +++++++++++++++++++++++++ stats/pwc-current.json | 604 +----------------------- stats/pwc-language-breakdown-summary.json | 56 +-- stats/pwc-language-breakdown.json | 709 ++++++++++++++-------------- stats/pwc-leaders.json | 736 +++++++++++++++--------------- stats/pwc-summary-1-30.json | 112 ++--- stats/pwc-summary-121-150.json | 96 ++-- stats/pwc-summary-31-60.json | 34 +- stats/pwc-summary-61-90.json | 112 ++--- stats/pwc-summary-91-120.json | 36 +- stats/pwc-summary.json | 344 +++++++------- 15 files changed, 1790 insertions(+), 1704 deletions(-) create mode 100755 challenge-046/e-choroba/perl/ch-2.pl delete mode 100755 challenge-046/e-choroba/perl/ch-2c.pl create mode 100644 stats/pwc-challenge-045.json diff --git a/challenge-046/e-choroba/perl/ch-2.pl b/challenge-046/e-choroba/perl/ch-2.pl new file mode 100755 index 0000000000..372ad3cc19 --- /dev/null +++ b/challenge-046/e-choroba/perl/ch-2.pl @@ -0,0 +1,13 @@ +#!/usr/bin/perl +use warnings; +use strict; +use feature qw{ say }; + +my $MAX = 500; + +my @doors = (0) x $MAX; # All closed. +for my $employee (0 .. $MAX - 1) { + $doors[$_] = ! $doors[$_] + for grep 0 == (1 + $_) % (1 + $employee), 0 .. $MAX - 1; +} +say join ' ', map 1 + $_, grep $doors[$_], 0 .. $MAX; diff --git a/challenge-046/e-choroba/perl/ch-2a.pl b/challenge-046/e-choroba/perl/ch-2a.pl index 372ad3cc19..38ff9a103a 100755 --- a/challenge-046/e-choroba/perl/ch-2a.pl +++ b/challenge-046/e-choroba/perl/ch-2a.pl @@ -3,11 +3,7 @@ use warnings; use strict; use feature qw{ say }; -my $MAX = 500; - -my @doors = (0) x $MAX; # All closed. -for my $employee (0 .. $MAX - 1) { - $doors[$_] = ! $doors[$_] - for grep 0 == (1 + $_) % (1 + $employee), 0 .. $MAX - 1; -} -say join ' ', map 1 + $_, grep $doors[$_], 0 .. $MAX; +say join ' ', grep { + my $door = $_; + 1 == (grep 0 == $door % $_, 1 .. 500) % 2 +} 1 .. 500; diff --git a/challenge-046/e-choroba/perl/ch-2b.pl b/challenge-046/e-choroba/perl/ch-2b.pl index 38ff9a103a..0b60d23608 100755 --- a/challenge-046/e-choroba/perl/ch-2b.pl +++ b/challenge-046/e-choroba/perl/ch-2b.pl @@ -3,7 +3,4 @@ use warnings; use strict; use feature qw{ say }; -say join ' ', grep { - my $door = $_; - 1 == (grep 0 == $door % $_, 1 .. 500) % 2 -} 1 .. 500; +say join ' ', map $_ ** 2, 1 .. sqrt 500; diff --git a/challenge-046/e-choroba/perl/ch-2c.pl b/challenge-046/e-choroba/perl/ch-2c.pl deleted file mode 100755 index 0b60d23608..0000000000 --- a/challenge-046/e-choroba/perl/ch-2c.pl +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/perl -use warnings; -use strict; -use feature qw{ say }; - -say join ' ', map $_ ** 2, 1 .. sqrt 500; diff --git a/stats/pwc-challenge-045.json b/stats/pwc-challenge-045.json new file mode 100644 index 0000000000..d94ce57be1 --- /dev/null +++ b/stats/pwc-challenge-045.json @@ -0,0 +1,619 @@ +{ + "title" : { + "text" : "Perl Weekly Challenge - 045" + }, + "xAxis" : { + "type" : "category" + }, + "chart" : { + "type" : "column" + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + } + } + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "series" : [ + { + "name" : "Perl Weekly Challenge - 045", + "colorByPoint" : 1, + "data" : [ + { + "drilldown" : "Adam Russell", + "y" : 3, + "name" : "Adam Russell" + }, + { + "drilldown" : "Alicia Bielsa", + "y" : 2, + "name" : "Alicia Bielsa" + }, + { + "drilldown" : "Andrezgz", + "y" : 2, + "name" : "Andrezgz" + }, + { + "drilldown" : "Arne Sommer", + "name" : "Arne Sommer", + "y" : 5 + }, + { + "drilldown" : "Athanasius", + "name" : "Athanasius", + "y" : 1 + }, + { + "drilldown" : "Burkhard Nickels", + "name" : "Burkhard Nickels", + "y" : 4 + }, + { + "y" : 1, + "name" : "Cheok-Yin Fung", + "drilldown" : "Cheok-Yin Fung" + }, + { + "drilldown" : "Colin Crain", + "y" : 4, + "name" : "Colin Crain" + }, + { + "name" : "Cristina Heredia", + "y" : 1, + "drilldown" : "Cristina Heredia" + }, + { + "drilldown" : "Dave Cross", + "name" : "Dave Cross", + "y" : 2 + }, + { + "y" : 3, + "name" : "Dave Jacoby", + "drilldown" : "Dave Jacoby" + }, + { + "drilldown" : "Duane Powell", + "name" : "Duane Powell", + "y" : 2 + }, + { + "y" : 2, + "name" : "Duncan C. White", + "drilldown" : "Duncan C. White" + }, + { + "drilldown" : "E. Choroba", + "y" : 3, + "name" : "E. Choroba" + }, + { + "name" : "Jaldhar H. Vyas", + "y" : 5, + "drilldown" : "Jaldhar H. Vyas" + }, + { + "y" : 2, + "name" : "Jan Ole Kraft", + "drilldown" : "Jan Ole Kraft" + }, + { + "drilldown" : "Javier Luque", + "name" : "Javier Luque", + "y" : 5 + }, + { + "drilldown" : "Laurent Rosenfeld", + "y" : 5, + "name" : "Laurent Rosenfeld" + }, + { + "drilldown" : "Luca Ferrari", + "y" : 3, + "name" : "Luca Ferrari" + }, + { + "y" : 1, + "name" : "Mark Anderson", + "drilldown" : "Mark Anderson" + }, + { + "drilldown" : "Markus Holzer", + "y" : 2, + "name" : "Markus Holzer" + }, + { + "drilldown" : "Maxim Kolodyazhny", + "name" : "Maxim Kolodyazhny", + "y" : 2 + }, + { + "drilldown" : "Nazareno Delucca", + "name" : "Nazareno Delucca", + "y" : 2 + }, + { + "name" : "Noud Aldenhoven", + "y" : 2, + "drilldown" : "Noud Aldenhoven" + }, + { + "drilldown" : "Peter Scott", + "y" : 1, + "name" : "Peter Scott" + }, + { + "name" : "Rage311", + "y" : 2, + "drilldown" : "Rage311" + }, + { + "drilldown" : "Roger Bell West", + "y" : 4, + "name" : "Roger Bell West" + }, + { + "name" : "Ruben Westerberg", + "y" : 4, + "drilldown" : "Ruben Westerberg" + }, + { + "drilldown" : "Ryan Thompson", + "y" : 6, + "name" : "Ryan Thompson" + }, + { + "drilldown" : "Saif Ahmed", + "name" : "Saif Ahmed", + "y" : 2 + }, + { + "drilldown" : "Simon Proctor", + "name" : "Simon Proctor", + "y" : 2 + }, + { + "name" : "Ulrich Rieke", + "y" : 4, + "drilldown" : "Ulrich Rieke" + }, + { + "y" : 2, + "name" : "Wanderdoc", + "drilldown" : "Wanderdoc" + } + ] + } + ], + "legend" : { + "enabled" : 0 + }, + "drilldown" : { + "series" : [ + { + "id" : "Adam Russell", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Adam Russell" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Alicia Bielsa", + "name" : "Alicia Bielsa" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Andrezgz", + "name" : "Andrezgz" + }, + { + "name" : "Arne Sommer", + "id" : "Arne Sommer", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Athanasius", + "data" : [ + [ + "Perl", + 1 + ] + ], + "name" : "Athanasius" + }, + { + "name" : "Burkhard Nickels", + "id" : "Burkhard Nickels", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 1 + ] + ], + "id" : "Cheok-Yin Fung", + "name" : "Cheok-Yin Fung" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "id" : "Colin Crain", + "name" : "Colin Crain" + }, + { + "name" : "Cristina Heredia", + "data" : [ + [ + "Perl", + 1 + ] + ], + "id" : "Cristina Heredia" + }, + { + "name" : "Dave Cross", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Dave Cross" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Dave Jacoby", + "name" : "Dave Jacoby" + }, + { + "id" : "Duane Powell", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Duane Powell" + }, + { + "name" : "Duncan C. White", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Duncan C. White" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "E. Choroba", + "name" : "E. Choroba" + }, + { + "name" : "Jaldhar H. Vyas", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Jaldhar H. Vyas" + }, + { + "name" : "Jan Ole Kraft", + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Jan Ole Kraft" + }, + { + "name" : "Javier Luque", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Javier Luque" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld" + }, + { + "name" : "Luca Ferrari", + "id" : "Luca Ferrari", + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "name" : "Mark Anderson", + "data" : [ + [ + "Raku", + 1 + ] + ], + "id" : "Mark Anderson" + }, + { + "name" : "Markus Holzer", + "id" : "Markus Holzer", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "name" : "Maxim Kolodyazhny", + "id" : "Maxim Kolodyazhny", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "name" : "Nazareno Delucca", + "id" : "Nazareno Delucca", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "name" : "Noud Aldenhoven", + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Noud Aldenhoven" + }, + { + "name" : "Peter Scott", + "id" : "Peter Scott", + "data" : [ + [ + "Perl", + 1 + ] + ] + }, + { + "id" : "Rage311", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Rage311" + }, + { + "name" : "Roger Bell West", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "id" : "Roger Bell West" + }, + { + "name" : "Ruben Westerberg", + "id" : "Ruben Westerberg", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ] + }, + { + "name" : "Ryan Thompson", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 2 + ] + ], + "id" : "Ryan Thompson" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Saif Ahmed", + "name" : "Saif Ahmed" + }, + { + "name" : "Simon Proctor", + "id" : "Simon Proctor", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "name" : "Ulrich Rieke", + "id" : "Ulrich Rieke", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ] + }, + { + "name" : "Wanderdoc", + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Wanderdoc" + } + ] + }, + "tooltip" : { + "pointFormat" : "{point.name}: {point.y:f}
", + "followPointer" : 1, + "headerFormat" : "{series.name}
" + }, + "subtitle" : { + "text" : "[Champions: 33] Last updated at 2020-02-03 13:07:29 GMT" + } +} diff --git a/stats/pwc-current.json b/stats/pwc-current.json index c5e7d257f3..d57ac53b53 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,619 +1,63 @@ { - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, "series" : [ { "colorByPoint" : 1, - "name" : "Perl Weekly Challenge - 045", "data" : [ - { - "drilldown" : "Adam Russell", - "name" : "Adam Russell", - "y" : 3 - }, - { - "drilldown" : "Alicia Bielsa", - "y" : 2, - "name" : "Alicia Bielsa" - }, - { - "drilldown" : "Andrezgz", - "name" : "Andrezgz", - "y" : 2 - }, - { - "drilldown" : "Arne Sommer", - "y" : 5, - "name" : "Arne Sommer" - }, - { - "drilldown" : "Athanasius", - "y" : 1, - "name" : "Athanasius" - }, - { - "drilldown" : "Burkhard Nickels", - "name" : "Burkhard Nickels", - "y" : 4 - }, - { - "drilldown" : "Cheok-Yin Fung", - "y" : 1, - "name" : "Cheok-Yin Fung" - }, - { - "drilldown" : "Colin Crain", - "name" : "Colin Crain", - "y" : 4 - }, - { - "name" : "Cristina Heredia", - "y" : 1, - "drilldown" : "Cristina Heredia" - }, - { - "drilldown" : "Dave Cross", - "name" : "Dave Cross", - "y" : 2 - }, - { - "drilldown" : "Dave Jacoby", - "y" : 3, - "name" : "Dave Jacoby" - }, - { - "name" : "Duane Powell", - "y" : 2, - "drilldown" : "Duane Powell" - }, - { - "name" : "Duncan C. White", - "y" : 2, - "drilldown" : "Duncan C. White" - }, { "drilldown" : "E. Choroba", - "y" : 3, - "name" : "E. Choroba" - }, - { - "name" : "Jaldhar H. Vyas", - "y" : 5, - "drilldown" : "Jaldhar H. Vyas" - }, - { - "name" : "Jan Ole Kraft", - "y" : 2, - "drilldown" : "Jan Ole Kraft" - }, - { - "drilldown" : "Javier Luque", - "name" : "Javier Luque", - "y" : 5 - }, - { - "name" : "Laurent Rosenfeld", - "y" : 5, - "drilldown" : "Laurent Rosenfeld" - }, - { - "drilldown" : "Luca Ferrari", - "y" : 3, - "name" : "Luca Ferrari" - }, - { - "y" : 1, - "name" : "Mark Anderson", - "drilldown" : "Mark Anderson" - }, - { - "name" : "Markus Holzer", - "y" : 2, - "drilldown" : "Markus Holzer" - }, - { - "name" : "Maxim Kolodyazhny", - "y" : 2, - "drilldown" : "Maxim Kolodyazhny" - }, - { - "name" : "Nazareno Delucca", - "y" : 2, - "drilldown" : "Nazareno Delucca" - }, - { - "drilldown" : "Noud Aldenhoven", - "y" : 2, - "name" : "Noud Aldenhoven" - }, - { - "drilldown" : "Peter Scott", - "name" : "Peter Scott", - "y" : 1 - }, - { - "drilldown" : "Rage311", - "y" : 2, - "name" : "Rage311" - }, - { - "drilldown" : "Roger Bell West", - "name" : "Roger Bell West", - "y" : 4 - }, - { - "drilldown" : "Ruben Westerberg", - "name" : "Ruben Westerberg", - "y" : 4 - }, - { - "y" : 6, - "name" : "Ryan Thompson", - "drilldown" : "Ryan Thompson" - }, - { - "y" : 2, - "name" : "Saif Ahmed", - "drilldown" : "Saif Ahmed" - }, - { - "name" : "Simon Proctor", "y" : 2, - "drilldown" : "Simon Proctor" - }, - { - "drilldown" : "Ulrich Rieke", - "y" : 4, - "name" : "Ulrich Rieke" - }, - { - "drilldown" : "Wanderdoc", - "name" : "Wanderdoc", - "y" : 2 + "name" : "E. Choroba" } - ] + ], + "name" : "Perl Weekly Challenge - 046" } ], - "legend" : { - "enabled" : 0 + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "xAxis" : { + "type" : "category" }, "tooltip" : { "headerFormat" : "{series.name}
", - "pointFormat" : "{point.name}: {point.y:f}
", - "followPointer" : 1 + "followPointer" : 1, + "pointFormat" : "{point.name}: {point.y:f}
" }, "title" : { - "text" : "Perl Weekly Challenge - 045" + "text" : "Perl Weekly Challenge - 046" }, - "subtitle" : { - "text" : "[Champions: 33] Last updated at 2020-02-03 04:46:11 GMT" + "legend" : { + "enabled" : 0 + }, + "chart" : { + "type" : "column" }, "drilldown" : { "series" : [ { - "id" : "Adam Russell", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ], - "name" : "Adam Russell" - }, - { - "name" : "Alicia Bielsa", - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "Alicia Bielsa" - }, - { - "name" : "Andrezgz", - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "Andrezgz" - }, - { - "name" : "Arne Sommer", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Arne Sommer" - }, - { - "data" : [ - [ - "Perl", - 1 - ] - ], - "name" : "Athanasius", - "id" : "Athanasius" - }, - { - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ] - ], - "name" : "Burkhard Nickels", - "id" : "Burkhard Nickels" - }, - { - "name" : "Cheok-Yin Fung", - "data" : [ - [ - "Perl", - 1 - ] - ], - "id" : "Cheok-Yin Fung" - }, - { - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ] - ], - "name" : "Colin Crain", - "id" : "Colin Crain" - }, - { - "name" : "Cristina Heredia", - "data" : [ - [ - "Perl", - 1 - ] - ], - "id" : "Cristina Heredia" - }, - { - "id" : "Dave Cross", - "data" : [ - [ - "Perl", - 2 - ] - ], - "name" : "Dave Cross" - }, - { - "name" : "Dave Jacoby", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Dave Jacoby" - }, - { - "id" : "Duane Powell", - "name" : "Duane Powell", - "data" : [ - [ - "Perl", - 2 - ] - ] - }, - { - "id" : "Duncan C. White", - "data" : [ - [ - "Perl", - 2 - ] - ], - "name" : "Duncan C. White" - }, - { - "id" : "E. Choroba", "name" : "E. Choroba", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ] - }, - { - "id" : "Jaldhar H. Vyas", - "name" : "Jaldhar H. Vyas", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ] - }, - { - "name" : "Jan Ole Kraft", - "data" : [ - [ - "Raku", - 2 - ] - ], - "id" : "Jan Ole Kraft" - }, - { - "id" : "Javier Luque", - "name" : "Javier Luque", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ] - }, - { - "name" : "Laurent Rosenfeld", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Laurent Rosenfeld" - }, - { - "name" : "Luca Ferrari", - "data" : [ - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Luca Ferrari" - }, - { - "id" : "Mark Anderson", - "name" : "Mark Anderson", - "data" : [ - [ - "Raku", - 1 - ] - ] - }, - { - "id" : "Markus Holzer", - "name" : "Markus Holzer", - "data" : [ - [ - "Raku", - 2 - ] - ] - }, - { - "id" : "Maxim Kolodyazhny", - "data" : [ - [ - "Perl", - 2 - ] - ], - "name" : "Maxim Kolodyazhny" - }, - { - "name" : "Nazareno Delucca", - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "Nazareno Delucca" - }, - { - "id" : "Noud Aldenhoven", - "name" : "Noud Aldenhoven", - "data" : [ - [ - "Raku", - 2 - ] - ] - }, - { - "name" : "Peter Scott", - "data" : [ - [ - "Perl", - 1 - ] - ], - "id" : "Peter Scott" - }, - { "data" : [ [ "Perl", 2 ] ], - "name" : "Rage311", - "id" : "Rage311" - }, - { - "name" : "Roger Bell West", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ] - ], - "id" : "Roger Bell West" - }, - { - "id" : "Ruben Westerberg", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ] - ], - "name" : "Ruben Westerberg" - }, - { - "id" : "Ryan Thompson", - "name" : "Ryan Thompson", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 2 - ] - ] - }, - { - "id" : "Saif Ahmed", - "data" : [ - [ - "Perl", - 2 - ] - ], - "name" : "Saif Ahmed" - }, - { - "name" : "Simon Proctor", - "data" : [ - [ - "Raku", - 2 - ] - ], - "id" : "Simon Proctor" - }, - { - "name" : "Ulrich Rieke", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ] - ], - "id" : "Ulrich Rieke" - }, - { - "id" : "Wanderdoc", - "data" : [ - [ - "Perl", - 2 - ] - ], - "name" : "Wanderdoc" + "id" : "E. Choroba" } ] }, - "xAxis" : { - "type" : "category" - }, - "chart" : { - "type" : "column" - }, "plotOptions" : { "series" : { - "borderWidth" : 0, "dataLabels" : { "enabled" : 1, "format" : "{point.y}" - } + }, + "borderWidth" : 0 } + }, + "subtitle" : { + "text" : "[Champions: 1] Last updated at 2020-02-03 13:08:50 GMT" } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index c0a30cf260..96f48a886b 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,36 +1,21 @@ { - "xAxis" : { - "labels" : { - "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" - } + "yAxis" : { + "title" : { + "text" : null }, - "type" : "category" - }, - "chart" : { - "type" : "column" - }, - "subtitle" : { - "text" : "Last updated at 2020-02-03 04:46:11 GMT" - }, - "title" : { - "text" : "Perl Weekly Challenge Contributions [2019 - 2020]" - }, - "tooltip" : { - "pointFormat" : "{point.y:.0f}" + "min" : 0 }, "series" : [ { "dataLabels" : { - "format" : "{point.y:.0f}", - "rotation" : -90, "style" : { "fontSize" : "13px", "fontFamily" : "Verdana, sans-serif" }, - "align" : "right", "y" : 10, + "rotation" : -90, + "align" : "right", + "format" : "{point.y:.0f}", "enabled" : "true", "color" : "#FFFFFF" }, @@ -41,7 +26,7 @@ ], [ "Perl", - 1857 + 1859 ], [ "Raku", @@ -51,13 +36,28 @@ "name" : "Contributions" } ], - "yAxis" : { - "min" : 0, - "title" : { - "text" : null - } + "subtitle" : { + "text" : "Last updated at 2020-02-03 13:08:50 GMT" + }, + "chart" : { + "type" : "column" }, "legend" : { "enabled" : "false" + }, + "tooltip" : { + "pointFormat" : "{point.y:.0f}" + }, + "xAxis" : { + "labels" : { + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + } + }, + "type" : "category" + }, + "title" : { + "text" : "Perl Weekly Challenge Contributions [2019 - 2020]" } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index 8c66851411..4249624d30 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,273 +1,30 @@ { - "title" : { - "text" : "Perl Weekly Challenge Language" - }, - "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2020-02-03 04:46:11 GMT" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "series" : [ - { - "name" : "Perl Weekly Challenge Languages", - "data" : [ - { - "y" : 140, - "name" : "#001", - "drilldown" : "001" - }, - { - "name" : "#002", - "y" : 109, - "drilldown" : "002" - }, - { - "y" : 71, - "name" : "#003", - "drilldown" : "003" - }, - { - "y" : 91, - "name" : "#004", - "drilldown" : "004" - }, - { - "drilldown" : "005", - "y" : 71, - "name" : "#005" - }, - { - "drilldown" : "006", - "name" : "#006", - "y" : 48 - }, - { - "drilldown" : "007", - "y" : 56, - "name" : "#007" - }, - { - "drilldown" : "008", - "name" : "#008", - "y" : 70 - }, - { - "y" : 68, - "name" : "#009", - "drilldown" : "009" - }, - { - "drilldown" : "010", - "y" : 60, - "name" : "#010" - }, - { - "drilldown" : "011", - "y" : 79, - "name" : "#011" - }, - { - "y" : 83, - "name" : "#012", - "drilldown" : "012" - }, - { - "drilldown" : "013", - "y" : 76, - "name" : "#013" - }, - { - "drilldown" : "014", - "y" : 96, - "name" : "#014" - }, - { - "drilldown" : "015", - "name" : "#015", - "y" : 93 - }, - { - "name" : "#016", - "y" : 66, - "drilldown" : "016" - }, - { - "name" : "#017", - "y" : 79, - "drilldown" : "017" - }, - { - "y" : 76, - "name" : "#018", - "drilldown" : "018" - }, - { - "drilldown" : "019", - "name" : "#019", - "y" : 95 - }, - { - "drilldown" : "020", - "y" : 95, - "name" : "#020" - }, - { - "drilldown" : "021", - "name" : "#021", - "y" : 67 - }, - { - "drilldown" : "022", - "y" : 63, - "name" : "#022" - }, - { - "drilldown" : "023", - "name" : "#023", - "y" : 91 - }, - { - "y" : 70, - "name" : "#024", - "drilldown" : "024" - }, - { - "drilldown" : "025", - "name" : "#025", - "y" : 55 - }, - { - "drilldown" : "026", - "name" : "#026", - "y" : 70 - }, -