aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad S Anwar <mohammad.anwar@yahoo.com>2019-05-30 12:29:51 +0100
committerMohammad S Anwar <mohammad.anwar@yahoo.com>2019-05-30 12:29:51 +0100
commit2d6fe89dbab4cfa5b3daf930765c441ee2048eff (patch)
tree4e077ab2c37c44bea52a13c7d6100c669ed4c9ba
parent00134de0ebe7e6fc71a80466824f8f1fb7c16739 (diff)
downloadperlweeklychallenge-club-2d6fe89dbab4cfa5b3daf930765c441ee2048eff.tar.gz
perlweeklychallenge-club-2d6fe89dbab4cfa5b3daf930765c441ee2048eff.tar.bz2
perlweeklychallenge-club-2d6fe89dbab4cfa5b3daf930765c441ee2048eff.zip
- Added solutions by Laurent Rosenfeld.
-rw-r--r--challenge-010/laurent-rosenfeld/blog.txt1
-rw-r--r--challenge-010/laurent-rosenfeld/perl5/ch-1.pl51
-rw-r--r--challenge-010/laurent-rosenfeld/perl5/ch-2.pl54
-rw-r--r--challenge-010/laurent-rosenfeld/perl6/ch-1.p644
-rw-r--r--challenge-010/laurent-rosenfeld/perl6/ch-1.t36
-rw-r--r--challenge-010/laurent-rosenfeld/perl6/ch-2.p644
-rw-r--r--stats/pwc-current.json185
-rw-r--r--stats/pwc-language-breakdown-summary.json46
-rw-r--r--stats/pwc-language-breakdown.json182
-rw-r--r--stats/pwc-leaders.json492
-rw-r--r--stats/pwc-summary-1-30.json52
-rw-r--r--stats/pwc-summary-31-60.json56
-rw-r--r--stats/pwc-summary-61-90.json92
-rw-r--r--stats/pwc-summary.json226
14 files changed, 905 insertions, 656 deletions
diff --git a/challenge-010/laurent-rosenfeld/blog.txt b/challenge-010/laurent-rosenfeld/blog.txt
new file mode 100644
index 0000000000..9a2cb23c89
--- /dev/null
+++ b/challenge-010/laurent-rosenfeld/blog.txt
@@ -0,0 +1 @@
+http://blogs.perl.org/users/laurent_r/2019/05/perl-weekly-challenge-10-roman-numerals-and-jaro-winkler-distance.html
diff --git a/challenge-010/laurent-rosenfeld/perl5/ch-1.pl b/challenge-010/laurent-rosenfeld/perl5/ch-1.pl
new file mode 100644
index 0000000000..efcd8ad506
--- /dev/null
+++ b/challenge-010/laurent-rosenfeld/perl5/ch-1.pl
@@ -0,0 +1,51 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use feature qw/say/;
+
+
+my %rom_tab = (I => 1, V => 5, X => 10, L => 50, C => 100, D => 500, M => 1000);
+
+sub from_roman {
+ my $roman = uc shift;
+ my $numeric = 0;
+ my $prev_letter = "M";
+ for my $letter (split //, $roman) {
+ $numeric -= 2 * $rom_tab{$prev_letter}
+ if $rom_tab{$letter} > $rom_tab{$prev_letter};
+ $numeric += $rom_tab{$letter};
+ $prev_letter = $letter;
+ }
+ return $numeric;
+}
+
+sub to_roman {
+ my $arabic = shift;
+ warn "$arabic out of bounds" unless $arabic > 0 and $arabic < 4000;
+ my %hash = %rom_tab;
+ $hash{$_->[0]} = $_->[1] for (['IV', 4], ['IX', 9], ['XL', 40],
+ ['XC', 90], ['CD', 400], ['CM', 900] );
+ my $roman = "";
+ for my $key (sort { $hash{$b} <=> $hash{$a} } keys %hash) {
+ my $num = int ($arabic / $hash{$key});
+ $roman .= $key x $num;
+ $arabic -= $hash{$key} * $num;
+ }
+ return $roman;
+}
+
+say "From Roman to Arabic";
+say "$_\t=>\t", from_roman $_ for qw <MM MCM LXXIII XCIII IC XCIX xv>;
+
+my @test_nums = qw <19 42 67 90 97 99 429 498 687 938 949 996 2145 3597>;
+say "From Arabic to Roman";
+say "$_\t=>\t", to_roman $_ for @test_nums;
+
+say "Some round trips: from Arabic to Roman to Arabic";
+say "$_\t=>\t", from_roman to_roman $_ for @test_nums;
+
+say "Sanity check (round trip through the whole range)";
+for (1..3999) {
+ my $result = from_roman to_roman $_;
+ say "Error on $_ " unless $result == $_;
+}
diff --git a/challenge-010/laurent-rosenfeld/perl5/ch-2.pl b/challenge-010/laurent-rosenfeld/perl5/ch-2.pl
new file mode 100644
index 0000000000..13aaca9b31
--- /dev/null
+++ b/challenge-010/laurent-rosenfeld/perl5/ch-2.pl
@@ -0,0 +1,54 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use feature qw/say/;
+
+sub max { $_[0] > $_[1] ? $_[0] : $_[1] }
+sub min { $_[0] > $_[1] ? $_[1] : $_[0] }
+
+sub simj {
+ my ($str1, $str2) = @_;
+ my $len1 = length $str1;
+ my $len2 = length $str2;
+ my $dmax = int (max($len1, $len2) / 2) -1;
+ my @st1 = split //, $str1;
+ my $i = 0;
+ my @matches;
+ for my $letter (split //, $str2) {
+ push @matches, $letter if (grep { $letter eq $_ }
+ @st1[max(0,$i-$dmax)..min($i+$dmax,$len1-1)]);
+ $i++;
+ }
+ my $nb_matches = scalar @matches;
+ return 0 if $nb_matches == 0;
+ my %matching_letters = map { $_ => 1} @matches;
+ my @matches_str1 = grep exists $matching_letters{$_},
+ split //, $str1;
+ my $disorder = 0;
+ for my $i (0..$nb_matches-1) {
+ $disorder++ if $matches[$i] ne $matches_str1[$i];
+ }
+ my $transposition = $disorder / 2;
+ return ($nb_matches / $len1 + $nb_matches / $len2 +
+ ($nb_matches - $transposition)/$nb_matches) / 3;
+}
+sub simw {
+ my ($str1, $str2) = @_;
+ my $p_constant = 0.1;
+ my $length_prefix = 0;
+ for my $count (0..3) {
+ last if substr $str1, $count, 1 ne substr $str2, $count, 1;
+ $length_prefix++;
+ }
+ my $simj = simj $str1, $str2;
+ return $simj + $length_prefix * $p_constant * (1 - $simj);
+}
+
+my @tests = ( ["FOO", "BAR"], ["CRATE", "TRACE"],
+ ["CRATE", "CRATE"], ["TRACE", "CRATE"],
+ ["CREATE", "TRACT"], ["DWAYNE", "DUANE"], );
+for my $word_pair (@tests) {
+ my ($w1, $w2) = @$word_pair;
+ my $simw = simw $w1, $w2;
+ say "Jaro-Winkler distance between $w1 and $w2 is: ", 1 - $simw;
+}
diff --git a/challenge-010/laurent-rosenfeld/perl6/ch-1.p6 b/challenge-010/laurent-rosenfeld/perl6/ch-1.p6
new file mode 100644
index 0000000000..d17320c362
--- /dev/null
+++ b/challenge-010/laurent-rosenfeld/perl6/ch-1.p6
@@ -0,0 +1,44 @@
+use v6;
+
+subset Roman-str of Str where $_ ~~ /^<[IVXLCDMivxlcdm]>+$/;
+
+my %rom-tab = < I 1 V 5 X 10 L 50 C 100 D 500 M 1000
+ IV 4 IX 9 XL 40 XC 90 CD 400 CM 900 >;
+my @ordered_romans = reverse sort { %rom-tab{$_} }, keys %rom-tab;
+
+sub from-roman (Roman-str $roman) {
+ my $numeric = 0;
+ my $prev_letter = "M";
+ for $roman.uc.comb -> $letter {
+ $numeric -= 2 * %rom-tab{$prev_letter}
+ if %rom-tab{$letter} > %rom-tab{$prev_letter};
+ $numeric += %rom-tab{$letter};
+ $prev_letter = $letter;
+ }
+ return $numeric;
+}
+
+sub to-roman (Int $arabic is copy where { 0 < $_ < 4000 }) {
+ my $roman = "";
+ for @ordered_romans -> $key {
+ my $num = ($arabic / %rom-tab{$key}).Int;
+ $roman ~= $key x $num;
+ $arabic -= %rom-tab{$key} * $num;
+ }
+ return $roman;
+}
+
+say "$_\t=>\t", from-roman $_ for <MM MCM LXXIII XCIII IC XCIX xv>;
+
+my @test_nums = <19 42 67 90 97 99 429 498 687 938 949 996 2145 3597>;
+say "From Arabic to Roman";
+say "$_\t=>\t", to-roman $_.Int for @test_nums;
+
+say "Some round trips: from Arabic to Roman to Arabic";
+say "$_\t=>\t", from-roman to-roman $_.Int for @test_nums;
+
+say "Sanity check (round trip through the whole range)";
+for (1..3999) {
+ my $result = from-roman to-roman $_;
+ say "Error on $_ " unless $result == $_;
+}
diff --git a/challenge-010/laurent-rosenfeld/perl6/ch-1.t b/challenge-010/laurent-rosenfeld/perl6/ch-1.t
new file mode 100644
index 0000000000..33bde3e1b1
--- /dev/null
+++ b/challenge-010/laurent-rosenfeld/perl6/ch-1.t
@@ -0,0 +1,36 @@
+use Test;
+plan 45;
+
+say "\nFrom Roman to Arabic";
+for < MM 2000 MCM 1900 LXXIII 73 XCIII 93 IC 99 XCIX 99 xv 15> -> $roman, $arabic {
+ is from-roman($roman), $arabic, "$roman => $arabic";
+}
+isnt from-roman("VII"), 8, "OK: VII not equal to 8";
+for <12 foo bar MCMA> -> $param {
+ dies-ok {from-roman $param}, "Caught exception OK in from-roman: wrong parameter";
+}
+say "\nFrom Arabic to Roman";
+my %test-nums = map { $_[0] => $_[1] }, (
+ <19 42 67 90 97 99 429 498 687 938 949 996 2145 3597> Z
+ <XIX XLII LXVII XC XCVII XCIX CDXXIX CDXCVIII DCLXXXVII
+ CMXXXVIII CMXLIX CMXCVI MMCXLV MMMDXCVII>);
+for %test-nums.keys -> $key {
+ is to-roman($key.Int), %test-nums{$key}, "$key => %test-nums{$key}";
+}
+for 0, 4000, "foobar", 3e6 -> $param {
+ dies-ok { to-roman $param}, "Caught exception OK in to-roman: wrong parameter";
+}
+say "\nSome round trips: from Arabic to Roman to Arabic";
+for %test-nums.keys.sort -> $key {
+ is from-roman(to-roman $key.Int), $key, "Round trip OK for $key";
+}
+my $upper-bound = 3999;
+say "\nSanity check (round trip through the whole range 1 .. $upper-bound range)";
+
+lives-ok {
+ for (1..$upper-bound) -> $arabic {
+ die "Failed round trip on $arabic" if from-roman(to-roman $arabic) != $arabic;
+ }
+}, "Passed round trip on the full 1..$upper-bound range";
+
+
diff --git a/challenge-010/laurent-rosenfeld/perl6/ch-2.p6 b/challenge-010/laurent-rosenfeld/perl6/ch-2.p6
new file mode 100644
index 0000000000..9794a5bd0e
--- /dev/null
+++ b/challenge-010/laurent-rosenfeld/perl6/ch-2.p6
@@ -0,0 +1,44 @@
+use v6;
+
+sub simjaro (Str $str1, Str $str2) {
+ my $len1 = $str1.chars;
+ my $len2 = $str2.chars;
+ my $dmax = (max($len1, $len2) / 2).Int -1;
+ my @st1 = $str1.comb;
+ my $i = 0;
+ my @matches;
+ for $str2.comb -> $letter {
+ push @matches, $letter if (grep { $letter eq $_ },
+ @st1[max(0,$i-$dmax)..min($i+$dmax,$len1-1)]);
+ $i++;
+ }
+ my $nb_matches = @matches.elems;
+ return 0 if $nb_matches == 0;
+ my %matching_letters = map { $_ => 1}, @matches;
+ my @matches_str1 = grep { %matching_letters{$_}:exists },
+ $str1.comb;
+ my $disorder = 0;
+ for 0..$nb_matches-1 -> $i {
+ $disorder++ if @matches[$i] ne @matches_str1[$i];
+ }
+ my $transposition = $disorder / 2;
+ return ($nb_matches / $len1 + $nb_matches / $len2 +
+ ($nb_matches - $transposition)/$nb_matches) / 3;
+}
+sub simwinkler (Str $str1, Str $str2) {
+ my $p_constant = 0.1;
+ my $length_prefix = 0;
+ for 0..3 -> $count {
+ last if substr $str1, $count, 1 ne substr $str2, $count, 1;
+ $length_prefix++;
+ }
+ my $simj = simjaro $str1, $str2;
+ return $simj + $length_prefix * $p_constant * (1 - $simj);
+}
+
+my @tests = < FOOB BARF CRATE TRACE CRATE CRATE TRACE CRATE
+ CREATE TRACT DWAYNE DUANE >;
+for @tests -> $w1, $w2 {
+ my $simw = simwinkler $w1, $w2;
+ say "Jaro-Winkler distance between $w1 and $w2 is: ", (1 - $simw).fmt("\t%.3f");
+}
diff --git a/stats/pwc-current.json b/stats/pwc-current.json
index 0885d54111..d99a5f5cd1 100644
--- a/stats/pwc-current.json
+++ b/stats/pwc-current.json
@@ -1,106 +1,53 @@
{
- "plotOptions" : {
- "series" : {
- "dataLabels" : {
- "format" : "{point.y}",
- "enabled" : 1
- },
- "borderWidth" : 0
- }
- },
- "subtitle" : {
- "text" : "[Champions: 7] Last updated at 2019-05-30 11:15:47 GMT"
- },
- "series" : [
- {
- "data" : [
- {
- "name" : "Daniel Mita",
- "drilldown" : "Daniel Mita",
- "y" : 1
- },
- {
- "y" : 1,
- "drilldown" : "Donald Hunter",
- "name" : "Donald Hunter"
- },
- {
- "y" : 1,
- "name" : "Kivanc Yazan",
- "drilldown" : "Kivanc Yazan"
- },
- {
- "y" : 1,
- "drilldown" : "Martin Barth",
- "name" : "Martin Barth"
- },
- {
- "y" : 1,
- "drilldown" : "Maxim Nechaev",
- "name" : "Maxim Nechaev"
- },
- {
- "y" : 1,
- "name" : "Pavel Jurca",
- "drilldown" : "Pavel Jurca"
- },
- {
- "drilldown" : "Simon Proctor",
- "name" : "Simon Proctor",
- "y" : 1
- }
- ],
- "name" : "Champions",
- "colorByPoint" : 1
- }
- ],
- "legend" : {
- "enabled" : 0
- },
- "xAxis" : {
- "type" : "category"
- },
- "title" : {
- "text" : "Perl Weekly Challenge - 010"
- },
- "chart" : {
- "type" : "column"
- },
"drilldown" : {
"series" : [
{
- "id" : "Daniel Mita",
- "name" : "Daniel Mita",
"data" : [
[
"Perl 6",
1
]
- ]
+ ],
+ "name" : "Daniel Mita",
+ "id" : "Daniel Mita"
},
{
- "id" : "Donald Hunter",
- "name" : "Donald Hunter",
"data" : [
[
"Perl 6",
1
]
- ]
+ ],
+ "name" : "Donald Hunter",
+ "id" : "Donald Hunter"
},
{
+ "name" : "Kivanc Yazan",
+ "id" : "Kivanc Yazan",
"data" : [
[
"Perl 5",
1
]
+ ]
+ },
+ {
+ "data" : [
+ [
+ "Perl 5",
+ 2
+ ],
+ [
+ "Perl 6",
+ 2
+ ]
],
- "id" : "Kivanc Yazan",
- "name" : "Kivanc Yazan"
+ "name" : "Laurent Rosenfeld",
+ "id" : "Laurent Rosenfeld"
},
{
- "id" : "Martin Barth",
"name" : "Martin Barth",
+ "id" : "Martin Barth",
"data" : [
[
"Perl 6",
@@ -109,14 +56,14 @@
]
},
{
+ "id" : "Maxim Nechaev",
+ "name" : "Maxim Nechaev",
"data" : [
[
"Perl 5",
1
]
- ],
- "id" : "Maxim Nechaev",
- "name" : "Maxim Nechaev"
+ ]
},
{
"data" : [
@@ -129,25 +76,97 @@
"name" : "Pavel Jurca"
},
{
+ "id" : "Simon Proctor",
+ "name" : "Simon Proctor",
"data" : [
[
"Perl 6",
1
]
- ],
- "id" : "Simon Proctor",
- "name" : "Simon Proctor"
+ ]
}
]
},
+ "xAxis" : {
+ "type" : "category"
+ },
"yAxis" : {
"title" : {
"text" : "Total Solutions"
}
},
"tooltip" : {
- "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>",
"followPointer" : 1,
+ "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>",
"pointerFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>"
+ },
+ "subtitle" : {
+ "text" : "[Champions: 8] Last updated at 2019-05-30 11:29:10 GMT"
+ },
+ "title" : {
+ "text" : "Perl Weekly Challenge - 010"
+ },
+ "plotOptions" : {
+ "series" : {
+ "dataLabels" : {
+ "format" : "{point.y}",
+ "enabled" : 1
+ },
+ "borderWidth" : 0
+ }
+ },
+ "legend" : {
+ "enabled" : 0
+ },
+ "series" : [
+ {
+ "name" : "Champions",
+ "colorByPoint" : 1,
+ "data" : [
+ {
+ "y" : 1,
+ "drilldown" : "Daniel Mita",
+ "name" : "Daniel Mita"
+ },
+ {
+ "name" : "Donald Hunter",
+ "y" : 1,
+ "drilldown" : "Donald Hunter"
+ },
+ {
+ "name" : "Kivanc Yazan",
+ "drilldown" : "Kivanc Yazan",
+ "y" : 1
+ },
+ {
+ "name" : "Laurent Rosenfeld",
+ "drilldown" : "Laurent Rosenfeld",
+ "y" : 4
+ },
+ {
+ "drilldown" : "Martin Barth",
+ "y" : 1,
+ "name" : "Martin Barth"
+ },
+ {
+ "drilldown" : "Maxim Nechaev",
+ "y" : 1,
+ "name" : "Maxim Nechaev"
+ },
+ {
+ "drilldown" : "Pavel Jurca",
+ "y" : 1,
+ "name" : "Pavel Jurca"
+ },
+ {
+ "y" : 1,
+ "drilldown" : "Simon Proctor",
+ "name" : "Simon Proctor"
+ }
+ ]
+ }
+ ],
+ "chart" : {
+ "type" : "column"
}
}
diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json
index c3ce1378fc..43f465a455 100644
--- a/stats/pwc-language-breakdown-summary.json
+++ b/stats/pwc-language-breakdown-summary.json
@@ -8,56 +8,56 @@
}
}
},
- "chart" : {
- "type" : "column"
- },
"subtitle" : {
- "text" : "Last updated at 2019-05-30 11:16:04 GMT"
- },
- "tooltip" : {
- "pointFormat" : "<b>{point.y:.0f}</b>"
+ "text" : "Last updated at 2019-05-30 11:29:26 GMT"
},
- "legend" : {
- "enabled" : "false"
+ "yAxis" : {
+ "min" : 0,
+ "title" : {
+ "text" : null
+ }
},
"series" : [
{
+ "name" : "Contributions",
"data" : [
[
"Blog",
- 82
+ 83
],
[
"Perl 5",
- 375
+ 377
],
[
"Perl 6",
- 222
+ 224
]
],
"dataLabels" : {
- "y" : 10,
- "color" : "#FFFFFF",
+ "enabled" : "true",
"rotation" : -90,
"style" : {
"fontSize" : "13px",
"fontFamily" : "Verdana, sans-serif"
},
- "enabled" : "true",
+ "format" : "{point.y:.0f}",
+ "color" : "#FFFFFF",
"align" : "right",
- "format" : "{point.y:.0f}"
- },
- "name" : "Contributions"
+ "y" : 10
+ }
}
],
"title" : {
"text" : "Contribution Summary"
},
- "yAxis" : {
- "min" : 0,
- "title" : {
- "text" : null
- }
+ "legend" : {
+ "enabled" : "false"
+ },
+ "chart" : {
+ "type" : "column"
+ },
+ "tooltip" : {
+ "pointFormat" : "<b>{point.y:.0f}</b>"
}
}
diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json
index ae25f0ed91..8a82d14124 100644
--- a/stats/pwc-language-breakdown.json
+++ b/stats/pwc-language-breakdown.json
@@ -1,68 +1,4 @@
{
- "subtitle" : {
- "text" : "Click the columns to drilldown the language breakdown. Last updated at 2019-05-30 11:16:04 GMT"
- },
- "legend" : {
- "enabled" : "false"
- },
- "series" : [
- {
- "colorByPoint" : "true",
- "name" : "Perl Weekly Challenge Languages",
- "data" : [
- {
- "drilldown" : "001",
- "name" : "#001 [P5=76 P6=37]",
- "y" : 113
- },
- {
- "drilldown" : "002",
- "name" : "#002 [P5=63 P6=32]",
- "y" : 95
- },
- {
- "drilldown" : "003",
- "name" : "#003 [P5=32 P6=26]",
- "y" : 58
- },
- {
- "drilldown" : "004",
- "name" : "#004 [P5=46 P6=29]",
- "y" : 75
- },
- {
- "drilldown" : "005",
- "y" : 55,
- "name" : "#005 [P5=33 P6=22]"
- },
- {
- "drilldown" : "006",
- "y" : 41,
- "name" : "#006 [P5=27 P6=14]"
- },
- {
- "y" : 46,
- "name" : "#007 [P5=26 P6=20]",
- "drilldown" : "007"
- },
- {
- "drilldown" : "008",
- "y" : 56,
- "name" : "#008 [P5=36 P6=20]"
- },
- {
- "name" : "#009 [P5=33 P6=18]",
- "y" : 51,
- "drilldown" : "009"
- },
- {
- "name" : "#010 [P5=3 P6=4]",
- "y" : 7,
- "drilldown" : "010"
- }
- ]
- }
- ],
"plotOptions" : {
"series" : {
"borderWidth" : 0,
@@ -72,13 +8,13 @@
}
}
},
- "tooltip" : {
- "followPointer" : "true",
- "headerFormat" : "<span style=\"font-size:11px\"></span>",
- "pointFormat" : "<span style=\"color:{point.color}\">{point.name}</span>: <b>{point.y:f}</b><br/>"
+ "subtitle" : {
+ "text" : "Click the columns to drilldown the language breakdown. Last updated at 2019-05-30 11:29:26 GMT"
},
- "title" : {
- "text" : "Perl Weekly Challenge Language"
+ "yAxis" : {
+ "title" : {
+ "text" : "Total Solutions"
+ }
},
"xAxis" : {
"type" : "category"
@@ -86,6 +22,14 @@
"chart" : {
"type" : "column"
},
+ "tooltip" : {
+ "followPointer" : "true",
+ "pointFormat" : "<span style=\"color:{point.color}\">{point.name}</span>: <b>{point.y:f}</b><br/>",
+ "headerFormat" : "<span style=\"font-size:11px\"></span>"
+ },
+ "legend" : {
+ "enabled" : "false"
+ },
"drilldown" : {
"series" : [
{
@@ -103,6 +47,8 @@
]
},
{
+ "name" : "002",
+ "id" : "002",
"data" : [
[
"Perl 5",
@@ -112,11 +58,10 @@
"Perl 6",
32
]
- ],
- "name" : "002",
- "id" : "002"
+ ]
},
{
+ "name" : "003",
"data" : [
[
"Perl 5",
@@ -127,11 +72,9 @@
26
]
],
- "name" : "003",
"id" : "003"
},
{
- "name" : "004",
"id" : "004",
"data" : [
[
@@ -142,10 +85,10 @@
"Perl 6",
29
]
- ]
+ ],
+ "name" : "004"
},
{
- "id" : "005",
"name" : "005",
"data" : [
[
@@ -156,9 +99,11 @@
"Perl 6",
22
]
- ]
+ ],
+ "id" : "005"
},
{
+ "name" : "006",
"data" : [
[
"Perl 5",
@@ -169,10 +114,10 @@
14
]
],
- "name" : "006",
"id" : "006"
},
{
+ "id" : "007",
"data" : [
[
"Perl 5",
@@ -183,10 +128,11 @@
20
]
],
- "name" : "007",
- "id" : "007"
+ "name" : "007"
},
{
+ "name" : "008",
+ "id" : "008",
"data" : [
[
"Perl 5",
@@ -196,9 +142,7 @@
"Perl 6",
20
]
- ],
- "name" : "008",
- "id" : "008"
+ ]
},
{
"name" : "009",
@@ -215,24 +159,80 @@
]
},
{
- "id" : "010",
"name" : "010",
"data" : [
[
"Perl 5",
- 3
+ 5
],
[
"Perl 6",
- 4
+ 6
]
- ]
+ ],
+ "id" : "010"
}
]
},
- "yAxis" : {
- "title" : {
- "text" : "Total Solutions"
+ "series" : [
+ {
+ "data" : [
+ {
+ "name" : "#001 [P5=76 P6=37]",
+ "drilldown" : "001",
+ "y" : 113
+ },
+ {
+ "y" : 95,
+ "drilldown" : "002",
+ "name" : "#002 [P5=63 P6=32]"
+ },
+ {
+ "y" : 58,
+ "drilldown" : "003",
+ "name" : "#003 [P5=32 P6=26]"
+ },
+ {
+ "y" : 75,
+ "drilldown" : "004",
+ "name" : "#004 [P5=46 P6=29]"
+ },
+ {
+ "drilldown" : "005",
+ "name" : "#005 [P5=33 P6=22]",
+ "y" : 55
+ },
+ {
+ "y" : 41,
+ "name" : "#006 [P5=27 P6=14]",
+ "drilldown" : "006"
+ },
+ {
+ "name" : "#007 [P5=26 P6=20]",
+ "drilldown" : "007",
+ "y" : 46
+ },
+ {
+ "y" : 56,
+ "drilldown" : "008",
+ "name" : "#008 [P5=36 P6=20]"
+ },
+ {
+ "name" : "#009 [P5=33 P6=18]",
+ "drilldown" : "009",
+ "y" : 51
+ },
+ {
+ "drilldown" : "010",
+ "name" : "#010 [P5=5 P6=6]",
+ "y" : 11
+ }
+ ],
+ "name" : "Perl Weekly Challenge Languages",
+ "colorByPoint" : "true"
}
+ ],
+ "title" : {
+ "text" : "Perl Weekly Challenge Language"
}
}
diff --git a/stats/pwc-leaders.json b/stats/pwc-leaders.json
index 6b1a40c306..1334539c06 100644
--- a/stats/pwc-leaders.json
+++ b/stats/pwc-leaders.json
@@ -1,64 +1,89 @@
{
+ "legend" : {
+ "enabled" : "false"
+ },
+ "plotOptions" : {
+ "series" : {
+ "dataLabels" : {
+ "format" : "{point.y}",
+ "enabled" : 1
+ },
+ "borderWidth" : 0
+ }
+ },
+ "subtitle" : {
+ "text" : "Click the columns to drilldown the score breakdown. Last updated at 2019-05-30 11:29:19 GMT"
+ },
"title" : {
"text" : "Perl Weekly Challenge Leaders (TOP 50)"
},
- "xAxis" : {
- "type" : "category"
+ "chart" : {
+ "type" : "column"
+ },
+ "tooltip" : {
+ "headerFormat" : "<span style=\"font-size:11px\"></span>",
+ "pointFormat" : "<span style=\"color:{point.color}\">{point.name}</span>: <b>{point.y:f}</b><br/>",
+ "followPointer" : "true"
+ },
+ "yAxis" : {
+ "title" : {
+ "text" : "Total Score"
+ }
},
"series" : [
{
- "name" : "Perl Weekly Challenge Leaders",
"colorByPoint" : "true",
+ "name" : "Perl Weekly Challenge Leaders",
"data" : [
{
- "drilldown" : "Laurent Rosenfeld",
- "y" : 92,
- "name" : "#1: Laurent Rosenfeld"
+ "name" : "#1: Laurent Rosenfeld",
+ "y" : 102,
+ "drilldown" : "Laurent Rosenfeld"
},
{
"drilldown" : "Joelle Maslak",
- "y" : 84,
- "name" : "#2: Joelle Maslak"
+ "name" : "#2: Joelle Maslak",
+ "y" : 84
},
{
- "name" : "#3: Jaldhar H. Vyas",
"y" : 72,
+ "name" : "#3: Jaldhar H. Vyas",
"drilldown" : "Jaldhar H. Vyas"
},
{
+ "drilldown" : "Ruben Westerberg",
"y" : 64,
- "name" : "#4: Ruben Westerberg",
- "drilldown" : "Ruben Westerberg"
+ "name" : "#4: Ruben Westerberg"
},
{
"drilldown" : "Adam Russell",
- "y" : 54,
- "name" : "#5: Adam Russell"
+ "name" : "#5: Adam Russell",
+ "y" : 54
},
{
- "name" : "#6: Simon Proctor",
"y" : 52,
+ "name" : "#6: Simon Proctor",
"drilldown" : "Simon Proctor"
},
{
- "name" : "#7: Kian-Meng Ang",
+ "drilldown" : "Kian-Meng Ang",
"y" : 50,
- "drilldown" : "Kian-Meng Ang"
+ "name" : "#7: Kian-Meng Ang"
},
{
- "y" : 48,
"name" : "#8: Arne Sommer",
+ "y" : 48,
"drilldown" : "Arne Sommer"
},
{
"drilldown" : "Dr James A. Smith",
- "name" : "#9: Dr James A. Smith",
- "y" : 44
+ "y" : 44,
+ "name" : "#9: Dr James A. Smith"
},
{
- "drilldown" : "Jo Christian Oterhals",
"name" : "#10: Jo Christian Oterhals",
- "y" : 42
+ "y" : 42,
+ "drilldown" : "Jo Christian Oterhals"
},
{
"y" : 38,
@@ -66,19 +91,19 @@
"drilldown" : "Gustavo Chaves"
},
{
- "drilldown" : "Athanasius",
+ "name" : "#12: Athanasius",
"y" : 36,
- "name" : "#12: Athanasius"
+ "drilldown" : "Athanasius"
},
{
+ "drilldown" : "Andrezgz",
"name" : "#13: Andrezgz",
- "y" : 34,
-