diff options
| -rw-r--r-- | challenge-073/e-choroba/erlang/ch-1.erl | 24 | ||||
| -rw-r--r-- | challenge-073/e-choroba/erlang/ch-2.erl | 24 | ||||
| -rwxr-xr-x | challenge-073/e-choroba/perl/ch-1.pl (renamed from challenge-073/e-choroba/perl5/ch-1.pl) | 0 | ||||
| -rwxr-xr-x | challenge-073/e-choroba/perl/ch-2.pl (renamed from challenge-073/e-choroba/perl5/ch-2.pl) | 0 | ||||
| -rw-r--r-- | stats/pwc-current.json | 145 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown-summary.json | 78 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown.json | 568 | ||||
| -rw-r--r-- | stats/pwc-leaders.json | 778 | ||||
| -rw-r--r-- | stats/pwc-summary-1-30.json | 114 | ||||
| -rw-r--r-- | stats/pwc-summary-121-150.json | 44 | ||||
| -rw-r--r-- | stats/pwc-summary-151-180.json | 100 | ||||
| -rw-r--r-- | stats/pwc-summary-181-210.json | 48 | ||||
| -rw-r--r-- | stats/pwc-summary-31-60.json | 104 | ||||
| -rw-r--r-- | stats/pwc-summary-61-90.json | 92 | ||||
| -rw-r--r-- | stats/pwc-summary-91-120.json | 84 | ||||
| -rw-r--r-- | stats/pwc-summary.json | 58 |
16 files changed, 1162 insertions, 1099 deletions
diff --git a/challenge-073/e-choroba/erlang/ch-1.erl b/challenge-073/e-choroba/erlang/ch-1.erl new file mode 100644 index 0000000000..fa45be6d47 --- /dev/null +++ b/challenge-073/e-choroba/erlang/ch-1.erl @@ -0,0 +1,24 @@ +-module(pwc073). +-export([min_sliding_window/2, smallest_neighbour/1]). + +min_sliding_window(List, WinSize) when length(List) < WinSize -> + []; +min_sliding_window(List, WinSize) -> + [lists:min(lists:sublist(List, WinSize)) + | min_sliding_window(lists:nthtail(1, List), WinSize)]. + +smallest_neighbour([H|T]) -> + [0 | smallest_neighbour(T, H)]. + +smallest_neighbour([], _Min) -> + []; +smallest_neighbour([H|T], Min) -> + [ case Min < H of + true -> Min; + false -> 0 + end + | smallest_neighbour(T, case H < Min of + true -> H; + false -> Min + end ) + ]. diff --git a/challenge-073/e-choroba/erlang/ch-2.erl b/challenge-073/e-choroba/erlang/ch-2.erl new file mode 100644 index 0000000000..fa45be6d47 --- /dev/null +++ b/challenge-073/e-choroba/erlang/ch-2.erl @@ -0,0 +1,24 @@ +-module(pwc073). +-export([min_sliding_window/2, smallest_neighbour/1]). + +min_sliding_window(List, WinSize) when length(List) < WinSize -> + []; +min_sliding_window(List, WinSize) -> + [lists:min(lists:sublist(List, WinSize)) + | min_sliding_window(lists:nthtail(1, List), WinSize)]. + +smallest_neighbour([H|T]) -> + [0 | smallest_neighbour(T, H)]. + +smallest_neighbour([], _Min) -> + []; +smallest_neighbour([H|T], Min) -> + [ case Min < H of + true -> Min; + false -> 0 + end + | smallest_neighbour(T, case H < Min of + true -> H; + false -> Min + end ) + ]. diff --git a/challenge-073/e-choroba/perl5/ch-1.pl b/challenge-073/e-choroba/perl/ch-1.pl index f91a18417c..f91a18417c 100755 --- a/challenge-073/e-choroba/perl5/ch-1.pl +++ b/challenge-073/e-choroba/perl/ch-1.pl diff --git a/challenge-073/e-choroba/perl5/ch-2.pl b/challenge-073/e-choroba/perl/ch-2.pl index 17ccef9fe3..17ccef9fe3 100755 --- a/challenge-073/e-choroba/perl5/ch-2.pl +++ b/challenge-073/e-choroba/perl/ch-2.pl diff --git a/stats/pwc-current.json b/stats/pwc-current.json index de2509eb67..818dbc0a89 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,45 +1,42 @@ { - "xAxis" : { - "type" : "category" + "tooltip" : { + "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>", + "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>", + "followPointer" : 1 + }, + "chart" : { + "type" : "column" + }, + "legend" : { + "enabled" : 0 + }, + "subtitle" : { + "text" : "[Champions: 13] Last updated at 2020-08-10 20:33:28 GMT" }, "yAxis" : { "title" : { "text" : "Total Solutions" } }, - "subtitle" : { - "text" : "[Champions: 12] Last updated at 2020-08-10 19:54:56 GMT" - }, - "chart" : { - "type" : "column" - }, "plotOptions" : { "series" : { + "borderWidth" : 0, "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - }, - "borderWidth" : 0 + "format" : "{point.y}", + "enabled" : 1 + } } }, - "legend" : { - "enabled" : 0 - }, - "tooltip" : { - "followPointer" : 1, - "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>", - "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>" - }, "title" : { "text" : "Perl Weekly Challenge - 073" }, "series" : [ { - "colorByPoint" : 1, + "name" : "Perl Weekly Challenge - 073", "data" : [ { - "drilldown" : "Andrew Shitov", "y" : 3, + "drilldown" : "Andrew Shitov", "name" : "Andrew Shitov" }, { @@ -53,24 +50,29 @@ "y" : 2 }, { - "drilldown" : "Jason Messer", + "name" : "E. Choroba", + "drilldown" : "E. Choroba", + "y" : 2 + }, + { "y" : 2, + "drilldown" : "Jason Messer", "name" : "Jason Messer" }, { - "name" : "Mark Anderson", + "y" : 2, "drilldown" : "Mark Anderson", - "y" : 2 + "name" : "Mark Anderson" }, { - "drilldown" : "Markus Holzer", + "name" : "Markus Holzer", "y" : 2, - "name" : "Markus Holzer" + "drilldown" : "Markus Holzer" }, { - "name" : "Mohammad S Anwar", + "y" : 4, "drilldown" : "Mohammad S Anwar", - "y" : 4 + "name" : "Mohammad S Anwar" }, { "y" : 2, @@ -83,29 +85,27 @@ "drilldown" : "Roger Bell_West" }, { - "name" : "Shawn Wagner", "drilldown" : "Shawn Wagner", - "y" : 2 + "y" : 2, + "name" : "Shawn Wagner" }, { - "name" : "Simon Proctor", "drilldown" : "Simon Proctor", - "y" : 2 + "y" : 2, + "name" : "Simon Proctor" }, { - "drilldown" : "Wanderdoc", + "name" : "Wanderdoc", "y" : 2, - "name" : "Wanderdoc" + "drilldown" : "Wanderdoc" } ], - "name" : "Perl Weekly Challenge - 073" + "colorByPoint" : 1 } ], "drilldown" : { "series" : [ { - "id" : "Andrew Shitov", - "name" : "Andrew Shitov", "data" : [ [ "Raku", @@ -115,17 +115,19 @@ "Blog", 1 ] - ] + ], + "id" : "Andrew Shitov", + "name" : "Andrew Shitov" }, { - "name" : "Ben Davies", - "id" : "Ben Davies", "data" : [ [ "Raku", 2 ] - ] + ], + "id" : "Ben Davies", + "name" : "Ben Davies" }, { "data" : [ @@ -134,18 +136,28 @@ 2 ] ], - "id" : "Dave Jacoby", - "name" : "Dave Jacoby" + "name" : "Dave Jacoby", + "id" : "Dave Jacoby" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "E. Choroba", + "id" : "E. Choroba" }, { - "id" : "Jason Messer", - "name" : "Jason Messer", "data" : [ [ "Raku", 2 ] - ] + ], + "id" : "Jason Messer", + "name" : "Jason Messer" }, { "name" : "Mark Anderson", @@ -168,8 +180,6 @@ ] }, { - "name" : "Mohammad S Anwar", - "id" : "Mohammad S Anwar", "data" : [ [ "Perl", @@ -179,21 +189,21 @@ "Raku", 2 ] - ] + ], + "id" : "Mohammad S Anwar", + "name" : "Mohammad S Anwar" }, { - "name" : "Pavel Kuptsov", - "id" : "Pavel Kuptsov", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Pavel Kuptsov", + "name" : "Pavel Kuptsov" }, { - "id" : "Roger Bell_West", - "name" : "Roger Bell_West", "data" : [ [ "Perl", @@ -203,38 +213,43 @@ "Raku", 2 ] - ] + ], + "name" : "Roger Bell_West", + "id" : "Roger Bell_West" }, { + "name" : "Shawn Wagner", + "id" : "Shawn Wagner", "data" : [ [ "Perl", 2 ] - ], - "id" : "Shawn Wagner", - "name" : "Shawn Wagner" + ] }, { + "id" : "Simon Proctor", + "name" : "Simon Proctor", "data" : [ [ "Raku", 2 ] - ], - "id" : "Simon Proctor", - "name" : "Simon Proctor" + ] }, { + "name" : "Wanderdoc", + "id" : "Wanderdoc", "data" : [ [ "Perl", 2 ] - ], - "name" : "Wanderdoc", - "id" : "Wanderdoc" + ] } ] + }, + "xAxis" : { + "type" : "category" } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 44a64533bd..6f90945c76 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,49 +1,18 @@ { - "subtitle" : { - "text" : "Last updated at 2020-08-10 19:54:55 GMT" - }, - "yAxis" : { - "title" : { - "text" : null - }, - "min" : 0 - }, - "xAxis" : { - "type" : "category", - "labels" : { - "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" - } - } - }, - "legend" : { - "enabled" : "false" - }, - "tooltip" : { - "pointFormat" : "<b>{point.y:.0f}</b>" - }, - "title" : { - "text" : "Perl Weekly Challenge Contributions [2019 - 2020]" - }, - "chart" : { - "type" : "column" - }, "series" : [ { "dataLabels" : { - "color" : "#FFFFFF", "format" : "{point.y:.0f}", - "enabled" : "true", "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" + "fontSize" : "13px", + "fontFamily" : "Verdana, sans-serif" }, "y" : 10, + "rotation" : -90, "align" : "right", - "rotation" : -90 + "enabled" : "true", + "color" : "#FFFFFF" }, - "name" : "Contributions", "data" : [ [ "Blog", @@ -51,13 +20,44 @@ ], [ "Perl", - 3001 + 3003 ], [ "Raku", 1957 ] - ] + ], + "name" : "Contributions" + } + ], + "title" : { + "text" : "Perl Weekly Challenge Contributions [2019 - 2020]" + }, + "xAxis" : { + "type" : "category", + "labels" : { + "style" : { + "fontSize" : "13px", + "fontFamily" : "Verdana, sans-serif" + } } - ] + }, + "tooltip" : { + "pointFormat" : "<b>{point.y:.0f}</b>" + }, + "legend" : { + "enabled" : "false" + }, + "chart" : { + "type" : "column" + }, + "subtitle" : { + "text" : "Last updated at 2020-08-10 20:33:28 GMT" + }, + "yAxis" : { + "title" : { + "text" : null + }, + "min" : 0 + } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index 64ea346d3c..2950fb8a8a 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,38 +1,7 @@ { - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2020-08-10 19:54:56 GMT" - }, "xAxis" : { "type" : "category" }, - "tooltip" : { - "headerFormat" : "<span style=\"font-size:11px\"></span>", - "followPointer" : "true", - "pointFormat" : "<span style=\"color:{point.color}\">Challenge {point.name}</span>: <b>{point.y:f}</b><br/>" - }, - "legend" : { - "enabled" : "false" - }, - "title" : { - "text" : "Perl Weekly Challenge Language" - }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - } - } - }, - "chart" : { - "type" : "column" - }, "drilldown" : { "series" : [ { @@ -54,8 +23,6 @@ ] }, { - "id" : "002", - "name" : "002", "data" : [ [ "Perl", @@ -69,9 +36,13 @@ "Blog", 10 ] - ] + ], + "id" : "002", + "name" : "002" }, { + "name" : "003", + "id" : "003", "data" : [ [ "Perl", @@ -85,13 +56,9 @@ "Blog", 9 ] - ], - "name" : "003", - "id" : "003" + ] }, { - "name" : "004", - "id" : "004", "data" : [ [ "Perl", @@ -105,9 +72,13 @@ "Blog", 10 ] - ] + ], + "id" : "004", + "name" : "004" }, { + "id" : "005", + "name" : "005", "data" : [ [ "Perl", @@ -121,13 +92,9 @@ "Blog", 12 ] - ], - "id" : "005", - "name" : "005" + ] }, { - "name" : "006", - "id" : "006", "data" : [ [ "Perl", @@ -141,7 +108,9 @@ "Blog", 7 ] - ] + ], + "name" : "006", + "id" : "006" }, { "data" : [ @@ -158,12 +127,10 @@ 10 ] ], - "name" : "007", - "id" : "007" + "id" : "007", + "name" : "007" }, { - "name" : "008", - "id" : "008", "data" : [ [ "Perl", @@ -177,11 +144,11 @@ "Blog", 12 ] - ] + ], + "name" : "008", + "id" : "008" }, { - "id" : "009", - "name" : "009", "data" : [ [ "Perl", @@ -195,11 +162,11 @@ "Blog", 13 ] - ] + ], + "name" : "009", + "id" : "009" }, { - "id" : "010", - "name" : "010", "data" : [ [ "Perl", @@ -213,9 +180,13 @@ "Blog", 11 ] - ] + ], + "name" : "010", + "id" : "010" }, { + "name" : "011", + "id" : "011", "data" : [ [ "Perl", @@ -229,9 +200,7 @@ "Blog", 10 ] - ], - "id" : "011", - "name" : "011" + ] }, { "name" : "012", @@ -266,12 +235,10 @@ 13 ] ], - "name" : "013", - "id" : "013" + "id" : "013", + "name" : "013" }, { - "name" : "014", - "id" : "014", "data" : [ [ "Perl", @@ -285,9 +252,13 @@ "Blog", 15 ] - ] + ], + "id" : "014", + "name" : "014" }, { + "name" : "015", + "id" : "015", "data" : [ [ "Perl", @@ -301,13 +272,9 @@ "Blog", 15 ] - ], - "name" : "015", - "id" : "015" + ] }, { - "id" : "016", - "name" : "016", "data" : [ [ "Perl", @@ -321,11 +288,11 @@ "Blog", 12 ] - ] + ], + "id" : "016", + "name" : "016" }, { - "name" : "017", - "id" : "017", "data" : [ [ "Perl", @@ -339,11 +306,13 @@ "Blog", 12 ] - ] + ], + "name" : "017", + "id" : "017" }, { - "name" : "018", "id" : "018", + "name" : "018", "data" : [ [ "Perl", @@ -360,8 +329,8 @@ ] }, { - "name" : "019", "id" : "019", + "name" : "019", "data" : [ [ "Perl", @@ -378,6 +347,8 @@ ] }, { + "name" : "020", + "id" : "020", "data" : [ [ "Perl", @@ -391,11 +362,11 @@ "Blog", 13 ] - ], - "name" : "020", - "id" : "020" + ] }, { + "id" : "021", + "name" : "021", "data" : [ [ "Perl", @@ -409,11 +380,11 @@ "Blog", 10 ] - ], - "name" : "021", - "id" : "021" + ] }, { + "name" : "022", + "id" : "022", "data" : [ [ "Perl", @@ -427,9 +398,7 @@ "Blog", 10 ] - ], - "id" : "022", - "name" : "022" + ] }, { "data" : [ @@ -446,12 +415,10 @@ 12 ] ], - "id" : "023", - "name" : "023" + "name" : "023", + "id" : "023" }, { - "name" : "024", - "id" : "024", "data" : [ [ "Perl", @@ -465,9 +432,13 @@ "Blog", 11 ] - ] + ], + "name" : "024", + "id" : "024" }, { + "name" : "025", + "id" : "025", "data" : [ [ "Perl", @@ -481,9 +452,7 @@ "Blog", 12 ] - ], - "id" : "025", - "name" : "025" + ] }, { "data" : [ @@ -500,12 +469,10 @@ 10 ] ], - "name" : "026", - "id" : "026" + "id" : "026", + "name" : "026" }, { - "name" : "027", - "id" : "027", "data" : [ [ "Perl", @@ -519,11 +486,13 @@ "Blog", 9 ] - ] + ], + "name" : "027", + "id" : "027" }, { - "id" : "028", "name" : "028", + "id" : "028", "data" : [ [ "Perl", @@ -540,6 +509,8 @@ ] }, { + "id" : "029", + "name" : "029", "data" : [ [ "Perl", @@ -553,9 +524,7 @@ "Blog", 12 ] - ], - "id" : "029", - "name" : "029" + ] }, { "data" : [ @@ -576,6 +545,8 @@ "name" : "030" }, { + "id" : "031", + "name" : "031", "data" : [ [ "Perl", @@ -589,13 +560,11 @@ "Blog", 9 ] - ], - "id" : "031", - "name" : "031" + ] }, { - "id" : "032", "name" : "032", + "id" : "032", "data" : [ [ "Perl", @@ -612,8 +581,6 @@ ] }, { - "name" : "033", - "id" : "033", "data" : [ [ "Perl", @@ -627,7 +594,9 @@ "Blog", 10 ] - ] + ], + "name" : "033", + "id" : "033" }, { "id" : "034", @@ -648,6 +617,8 @@ ] }, { + "name" : "035", + "id" : "035", "data" : [ [ "Perl", @@ -661,11 +632,11 @@ "Blog", 9 ] - ], - "name" : "035", - "id" : "035" + ] }, { + "id" : "036", + "name" : "036", "data" : [ [ "Perl", @@ -679,13 +650,9 @@ "Blog", 11 ] - ], - "name" : "036", - "id" : "036" + ] }, { - "name" : "037", - "id" : "037", "data" : [ [ "Perl", @@ -699,9 +666,13 @@ "Blog", 9 ] - ] + ], + "name" : "037", + "id" : "037" }, { + "id" : "038", + "name" : "038", "data" : [ [ "Perl", @@ -715,13 +686,9 @@ "Blog", 12 ] - ], - "name" : "038", - "id" : "038" + ] }, { - "name" : "039", - "id" : "039", "data" : [ [ "Perl", @@ -735,7 +702,9 @@ "Blog", 12 ] - ] + ], + "name" : "039", + "id" : "039" }, { "data" : [ @@ -774,6 +743,8 @@ "id" : "041" }, { + "id" : "042", + "name" : "042", "data" : [ [ "Perl", @@ -787,9 +758,7 @@ "Blog", 11 ] - ], - "name" : "042", - "id" : "042" + ] }, { "data" : [ @@ -810,8 +779,8 @@ "name" : "043" }, { - "id" : "044", "name" : "044", + "id" : "044", "data" : [ [ "Perl", @@ -828,8 +797,8 @@ ] }, { - "id" : "045", "name" : "045", + "id" : "045", "data" : [ [ "Perl", @@ -846,8 +815,6 @@ ] }, { - "name" : "046", - "id" : "046", "data" : [ [ "Perl", @@ -861,9 +828,13 @@ "Blog", 10 ] - ] + ], + "name" : "046", + "id" : "046" }, { + "id" : "047", + "name" : "047", "data" : [ [ "Perl", @@ -877,13 +848,9 @@ "Blog", 10 ] - ], - "name" : "047", - "id" : "047" + ] }, { - "name" : "048", - "id" : "048", "data" : [ [ "Perl", @@ -897,9 +864,13 @@ "Blog", 12 ] - ] + ], + "id" : "048", + "name" : "048" }, { + "name" : "049", + "id" : "049", "data" : [ [ "Perl", @@ -913,13 +884,9 @@ "Blog", 12 ] - ], - "id" : "049", - "name" : "049" + ] }, { - "name" : "050", - "id" : "050", "data" : [ [ "Perl", @@ -933,11 +900,13 @@ "Blog", 12 ] - ] + ], + "name" : "050", + "id" : "050" }, { - "name" : "051", "id" : "051", + "name" : "051", "data" : [ [ "Perl", @@ -972,6 +941,8 @@ "id" : "052" }, { + "name" : "053", + "id" : "053", "data" : [ [ "Perl", @@ -985,13 +956,9 @@ |
