From 011d14fa29b85c7dcdc70a65af2483c0a81b65fe Mon Sep 17 00:00:00 2001 From: Lubos Kolouch Date: Sun, 28 May 2023 12:35:02 +0200 Subject: feat(challenge-114/lubos-kolouch/perl,python/): Challenge 114 LK Perl Python --- challenge-026/paulo-custodio/c/ch-1.c | 33 + challenge-026/paulo-custodio/c/ch-2.c | 45 + challenge-114/lubos-kolouch/perl/ch-1.pl | 10 + challenge-114/lubos-kolouch/perl/ch-2.pl | 11 + challenge-114/lubos-kolouch/python/ch-1.py | 13 + challenge-114/lubos-kolouch/python/ch-2.py | 15 + challenge-218/e-choroba/perl/ch-1.pl | 59 + challenge-218/e-choroba/perl/ch-2.pl | 74 + challenge-218/jo-37/perl/ch-1.pl | 69 + challenge-218/jo-37/perl/ch-2.pl | 89 + challenge-218/paulo-custodio/Makefile | 2 + challenge-218/paulo-custodio/perl/ch-1.pl | 56 + challenge-218/paulo-custodio/perl/ch-2.pl | 94 + challenge-218/paulo-custodio/t/test-1.yaml | 20 + challenge-218/paulo-custodio/t/test-2.yaml | 10 + challenge-218/robert-dicicco/julia/ch-2.jl | 127 + challenge-218/robert-dicicco/python/ch-2.py | 110 + challenge-218/robert-dicicco/raku/ch-2.raku | 120 + stats/pwc-current.json | 291 +- stats/pwc-language-breakdown-summary.json | 38 +- stats/pwc-language-breakdown.json | 8582 +++++++++++++-------------- stats/pwc-leaders.json | 736 +-- stats/pwc-summary-1-30.json | 52 +- stats/pwc-summary-121-150.json | 110 +- stats/pwc-summary-151-180.json | 34 +- stats/pwc-summary-181-210.json | 100 +- stats/pwc-summary-211-240.json | 110 +- stats/pwc-summary-241-270.json | 34 +- stats/pwc-summary-271-300.json | 84 +- stats/pwc-summary-31-60.json | 30 +- stats/pwc-summary-61-90.json | 34 +- stats/pwc-summary-91-120.json | 114 +- stats/pwc-summary.json | 1788 +++--- 33 files changed, 7048 insertions(+), 6046 deletions(-) create mode 100644 challenge-026/paulo-custodio/c/ch-1.c create mode 100644 challenge-026/paulo-custodio/c/ch-2.c create mode 100644 challenge-114/lubos-kolouch/perl/ch-1.pl create mode 100644 challenge-114/lubos-kolouch/perl/ch-2.pl create mode 100644 challenge-114/lubos-kolouch/python/ch-1.py create mode 100644 challenge-114/lubos-kolouch/python/ch-2.py create mode 100755 challenge-218/e-choroba/perl/ch-1.pl create mode 100755 challenge-218/e-choroba/perl/ch-2.pl create mode 100755 challenge-218/jo-37/perl/ch-1.pl create mode 100755 challenge-218/jo-37/perl/ch-2.pl create mode 100644 challenge-218/paulo-custodio/Makefile create mode 100644 challenge-218/paulo-custodio/perl/ch-1.pl create mode 100644 challenge-218/paulo-custodio/perl/ch-2.pl create mode 100644 challenge-218/paulo-custodio/t/test-1.yaml create mode 100644 challenge-218/paulo-custodio/t/test-2.yaml create mode 100644 challenge-218/robert-dicicco/julia/ch-2.jl create mode 100644 challenge-218/robert-dicicco/python/ch-2.py create mode 100644 challenge-218/robert-dicicco/raku/ch-2.raku diff --git a/challenge-026/paulo-custodio/c/ch-1.c b/challenge-026/paulo-custodio/c/ch-1.c new file mode 100644 index 0000000000..26e85e147a --- /dev/null +++ b/challenge-026/paulo-custodio/c/ch-1.c @@ -0,0 +1,33 @@ +/* +Challenge 026 + +Task #1 +Create a script that accepts two strings, let us call it, "stones" and +"jewels". It should print the count of "alphabet" from the string "stones" +found in the string "jewels". For example, if your stones is "chancellor" and +"jewels" is "chocolate", then the script should print "8". To keep it simple, +only A-Z,a-z characters are acceptable. Also make the comparison case +sensitive. +*/ + +#include +#include +#include + +int count_alphabet(const char* stones, const char* jewels) { + int count = 0; + for (const char* p = stones; *p; p++) { + if (strchr(jewels, *p)) + count++; + } + return count; +} + +int main(int argc, char* argv[]) { + if (argc != 3) { + fputs("Usage: ch-1 stones jewels\n", stderr); + return EXIT_FAILURE; + } + + printf("%d\n", count_alphabet(argv[1], argv[2])); +} diff --git a/challenge-026/paulo-custodio/c/ch-2.c b/challenge-026/paulo-custodio/c/ch-2.c new file mode 100644 index 0000000000..565926e544 --- /dev/null +++ b/challenge-026/paulo-custodio/c/ch-2.c @@ -0,0 +1,45 @@ +/* +Challenge 026 + +Task #2 +Create a script that prints mean angles of the given list of angles in degrees. +Please read wiki page that explains the formula in details with an example. +*/ + +#include +#include +#include + +void* check_mem(void* p) { + if (!p) { + fputs("Out of memory\n", stderr); + exit(EXIT_FAILURE); + } + return p; +} + +double mean_angle(double *angles, size_t size) { + double y = 0.0, x = 0.0; + for (size_t i = 0; i < size; i++) { + x += cos(angles[i] * M_PI / 180.0); + y += sin(angles[i] * M_PI / 180.0); + } + + return atan2(y / (double)size, x / (double)size) * 180.0 / M_PI; +} + +int main(int argc, char* argv[]) { + if (argc < 2) { + fputs("usage: ch-2 angles...\n", stderr); + return EXIT_FAILURE; + } + + size_t size = argc-1; + double* angles = check_mem(malloc(size * sizeof(double))); + for (size_t i = 0; i < size; i++) + angles[i] = atof(argv[i+1]); + + printf("%.1f", mean_angle(angles, size)); + + free(angles); +} diff --git a/challenge-114/lubos-kolouch/perl/ch-1.pl b/challenge-114/lubos-kolouch/perl/ch-1.pl new file mode 100644 index 0000000000..fb6e3649e5 --- /dev/null +++ b/challenge-114/lubos-kolouch/perl/ch-1.pl @@ -0,0 +1,10 @@ +sub next_palindrome { + my $n = shift; + while (1) { + $n += 1; + return $n if $n eq reverse $n; + } +} + +# Test +print next_palindrome(1234), "\n"; # Output: 1331 diff --git a/challenge-114/lubos-kolouch/perl/ch-2.pl b/challenge-114/lubos-kolouch/perl/ch-2.pl new file mode 100644 index 0000000000..349a330796 --- /dev/null +++ b/challenge-114/lubos-kolouch/perl/ch-2.pl @@ -0,0 +1,11 @@ +sub next_same_bits { + my $n = shift; + my $one_bits = unpack( "%32b*", pack( "N", $n ) ); + while (1) { + $n += 1; + return $n if unpack( "%32b*", pack( "N", $n ) ) == $one_bits; + } +} + +# Test +print next_same_bits(3), "\n"; # Output: 5 diff --git a/challenge-114/lubos-kolouch/python/ch-1.py b/challenge-114/lubos-kolouch/python/ch-1.py new file mode 100644 index 0000000000..e4d4da4dc0 --- /dev/null +++ b/challenge-114/lubos-kolouch/python/ch-1.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + + +def next_palindrome(n): + while True: + n += 1 + if str(n) == str(n)[::-1]: + return n + + +# Test +print(next_palindrome(1234)) # Output: 1331 diff --git a/challenge-114/lubos-kolouch/python/ch-2.py b/challenge-114/lubos-kolouch/python/ch-2.py new file mode 100644 index 0000000000..ebd0c29c85 --- /dev/null +++ b/challenge-114/lubos-kolouch/python/ch-2.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + + +def next_same_bits(n): + binary = bin(n)[2:] + one_bits = binary.count("1") + while True: + n += 1 + if bin(n)[2:].count("1") == one_bits: + return n + + +# Test +print(next_same_bits(3)) # Output: 5 diff --git a/challenge-218/e-choroba/perl/ch-1.pl b/challenge-218/e-choroba/perl/ch-1.pl new file mode 100755 index 0000000000..6e03c400c4 --- /dev/null +++ b/challenge-218/e-choroba/perl/ch-1.pl @@ -0,0 +1,59 @@ +#! /usr/bin/perl +use warnings; +use strict; +use experimental qw( signatures ); + +# Optimisation: Select the 3 least and 3 greatest numbers and build +# the maximum product from them by trying all the possibilities. The +# least numbers are needed as they might introduce negative numbers. +sub maximum_product (@list) { + return maximum_product_simple(@list) if @list <= 6; + return maximum_product_simple((sort { $a <=> $b } @list)[0, 1, 2, -3, -2, -1]) +} + +sub maximum_product_simple (@list) { + return product(@list) if 3 == @list; + + my $max_product = product(@list[0, 1, 2]); + for my $i (0 .. $#list - 2) { + for my $j ($i + 1 .. $#list - 1) { + my $p_ij = product(@list[$i, $j]); + for my $k ($j + 1 .. $#list) { + my $prod = $p_ij * $list[$k]; + $max_product = $prod if $prod > $max_product; + } + } + } + return $max_product +} + +sub product { + my $p = 1; + $p *= $_ for @_; + $p +} + +use Test::More tests => 2 * 4 + 1; + +for my $maximum_product (*maximum_product{CODE}, + *maximum_product_simple{CODE} +) { + is $maximum_product->(3, 1, 2), 6, 'Example 1'; + is $maximum_product->(4, 1, 3, 2), 24, 'Example 2'; + is $maximum_product->(-1, 0, 1, 3, 1), 3, 'Example 3'; + is $maximum_product->(-8, 2, -9, 0, -4, 3), 216, 'Example 4'; +} + +my @long = map int(rand 100) - 50, 1 .. 20; +is maximum_product(@long), maximum_product_simple(@long), "same @long"; + +use Benchmark qw{ cmpthese }; +cmpthese(-3, { + simple => sub { maximum_product_simple(@long) }, + preselect => sub { maximum_product(@long) }, +}); + +__END__ + Rate simple preselect +simple 8665/s -- -94% +preselect 140390/s 1520% -- diff --git a/challenge-218/e-choroba/perl/ch-2.pl b/challenge-218/e-choroba/perl/ch-2.pl new file mode 100755 index 0000000000..20714112d9 --- /dev/null +++ b/challenge-218/e-choroba/perl/ch-2.pl @@ -0,0 +1,74 @@ +#!/usr/bin/perl +use warnings; +use strict; +use experimental qw( signatures ); + +sub matrix_score($m) { + my $height = @$m; + my $width = @{ $m->[0] }; + my $ser = serialise($m); + my %agenda = my %done = ($ser => undef); + my $max = score($ser, $width); + + while (%agenda) { + my %next; + for my $s (keys %agenda) { + for my $i (0 .. ($width, $height)[$width < $height] - 1) { + my @flips; + push @flips, flip_col($s, $i, $width, $height) if $i < $width; + push @flips, flip_row($s, $i, $width, $height) if $i < $height; + for my $f (@flips) { + unless (exists $done{$f}) { + my $score = score($f, $width); + $max = $score if $score > $max; + undef $next{$f}; + undef $done{$f}; + } + } + } + } + %agenda = %next; + } + return $max +} + +sub serialise($m) { join "", map @$_, map @$_, @_ } + +sub flip_col($s, $x, $width, $height) { + for my $y (0 .. $height - 1) { + my $pos = $x + $y * $width; + substr $s, $pos, 1, substr($s, $pos, 1) ? 0 : 1; + } + return $s +} +sub flip_row($s, $y, $width, $height) { + my $pos = $y * $width; + for my $x (0 .. $width - 1) { + substr $s, $pos, 1, substr($s, $pos, 1) ? 0 : 1; + ++$pos; + } + return $s +} + +sub score($s, $width) { + my $score = 0; + my $pos = 0; + while (length(my $row = substr $s, $pos, $width)) { + $score += oct "0b$row"; + } continue { + $pos += $width; + } + return $score +} + +use Test::More tests => 3 + 2; + +is score('111110011111', 4), 39, 'score'; +is flip_col('001110', 1, 3, 2), '011100', 'flip column'; +is flip_row('001110', 1, 3, 2), '001001', 'flip row'; + +is matrix_score([ [0,0,1,1], + [1,0,1,0], + [1,1,0,0], ]), 39, 'Example 1'; + +is matrix_score([ [0] ]), 1, 'Example 2'; diff --git a/challenge-218/jo-37/perl/ch-1.pl b/challenge-218/jo-37/perl/ch-1.pl new file mode 100755 index 0000000000..acde924b6e --- /dev/null +++ b/challenge-218/jo-37/perl/ch-1.pl @@ -0,0 +1,69 @@ +#!/usr/bin/perl -s + +use v5.24; +use Test2::V0; + +our ($tests, $examples); + +run_tests() if $tests || $examples; # does not return + +die <= 3; +usage: $0 [-examples] [-tests] [--] [N...] + +-examples + run the examples from the challenge + +-tests + run some tests + +N... + list of at least three numbers + +EOS + + +### Input and Output + +say max_prod(@ARGV); + + +### Implementation + +# There are only two candidates for the maximum product of three +# elements: +# - the product of the three largest elements +# - the product of the two smallest elements with the largest +sub max_prod { + # For the sake of convenience, sort the elements. + my @s = sort {$a <=> $b} @_; + my $left = $s[0] * $s[1] * $s[-1]; + my $right = $s[-3] * $s[-2] * $s[-1]; + + $left > $right ? $left : $right; +} + + +### Examples and tests + +sub run_tests { + SKIP: { + skip "examples" unless $examples; + + is max_prod(3, 1, 2), 6, 'example 1'; + is max_prod(4, 1, 3, 2), 24, 'example 2'; + is max_prod(-1, 0, 1, 3, 1), 3, 'example 3'; + is max_prod(-8, 2, -9, 0, -4, 3), 216, 'example 4'; + } + + SKIP: { + skip "tests" unless $tests; + + is max_prod(-1, -2, -3, -4, -5), -6, 'all negative'; + is max_prod(1, 2, 3, 4, -5), 24, 'one negative'; + is max_prod(1, 2, -3, -4, 4, 5), 60, 'left wins'; + is max_prod(1, -2, 3, -4, 4, 5), 60, 'right wins'; + } + + done_testing; + exit; +} diff --git a/challenge-218/jo-37/perl/ch-2.pl b/challenge-218/jo-37/perl/ch-2.pl new file mode 100755 index 0000000000..6c67fa4ac0 --- /dev/null +++ b/challenge-218/jo-37/perl/ch-2.pl @@ -0,0 +1,89 @@ +#!/usr/bin/perl -s + +use v5.24; +use Test2::V0 '!float'; +use PDL; +use PDL::NiceSlice; +use Math::Prime::Util 'fromdigits'; +use experimental 'signatures'; + +our ($tests, $examples, $verbose); + +run_tests() if $tests || $examples; # does not return + +die <xchg(0, 1)->sumover < $b->dim(1) / 2; + say "final:", $b if $verbose; + + # Fromdigits accepts digits of any size, thus there is no need to + # calculate the individual numbers. + fromdigits $b->xchg(0, 1)->sumover->unpdl, 2; +} + + +### Examples and tests + +sub run_tests { + local $verbose; + + SKIP: { + skip "examples" unless $examples; + + is matrix_score(byte [0,0,1,1], [1,0,1,0], [1,1,0,0]), 39, 'example 1'; + is matrix_score(byte [[0]]), 1, 'example 2'; + } + + SKIP: { + skip "tests" unless $tests; + + is matrix_score(byte [1, 1, 0, 0, 0, 1], [0, 0, 0, 1, 1, 1], + [1, 0, 1, 1, 0, 0], [0, 1, 1, 0, 0, 1], [1, 0, 0, 0, 1, 1]), + 253, 'toggle all but first columns'; + # 32 * 5 + (16 + 8 + 4 + 2 + 1) * 3 + + } + + done_testing; + exit; +} diff --git a/challenge-218/paulo-custodio/Makefile b/challenge-218/paulo-custodio/Makefile new file mode 100644 index 0000000000..c3c762d746 --- /dev/null +++ b/challenge-218/paulo-custodio/Makefile @@ -0,0 +1,2 @@ +all: + perl ../../challenge-001/paulo-custodio/test.pl diff --git a/challenge-218/paulo-custodio/perl/ch-1.pl b/challenge-218/paulo-custodio/perl/ch-1.pl new file mode 100644 index 0000000000..2172a1675a --- /dev/null +++ b/challenge-218/paulo-custodio/perl/ch-1.pl @@ -0,0 +1,56 @@ +#!/usr/bin/perl + +# Challenge 218 +# +# Task 1: Maximum Product +# Submitted by: Mohammad S Anwar +# +# You are given a list of 3 or more integers. +# +# Write a script to find the 3 integers whose product is the maximum and return it. +# Example 1 +# +# Input: @list = (3, 1, 2) +# Output: 6 +# +# 1 x 2 x 3 => 6 +# +# Example 2 +# +# Input: @list = (4, 1, 3, 2) +# Output: 24 +# +# 2 x 3 x 4 => 24 +# +# Example 3 +# +# Input: @list = (-1, 0, 1, 3, 1) +# Output: 3 +# +# 1 x 1 x 3 => 3 +# +# Example 4 +# +# Input: @list = (-8, 2, -9, 0, -4, 3) +# Output: 216 +# +# -9 × -8 × 3 => 216 + +use Modern::Perl; + +sub max_product { + my(@N) = @_; + return 0 if @N < 3; + my $max = 0; + for my $i (0 .. $#N-2) { + for my $j ($i+1 .. $#N-1) { + for my $k ($j+1 .. $#N) { + my $prod = $N[$i]*$N[$j]*$N[$k]; + $max = $prod if $prod > $max; + } + } + } + return $max; +} + +say max_product(@ARGV); diff --git a/challenge-218/paulo-custodio/perl/ch-2.pl b/challenge-218/paulo-custodio/perl/ch-2.pl new file mode 100644 index 0000000000..15cdefc7b0 --- /dev/null +++ b/challenge-218/paulo-custodio/perl/ch-2.pl @@ -0,0 +1,94 @@ +#!/usr/bin/perl + +# Challenge 218 +# +# Task 2: Matrix Score +# Submitted by: Mohammad S Anwar +# +# You are given a m x n binary matrix i.e. having only 1 and 0. +# +# You are allowed to make as many moves as you want to get the highest score. +# +# A move can be either toggling each value in a row or column. +# +# To get the score, convert the each row binary to dec and return the sum. +# Example 1: +# +# Input: @matrix = [ [0,0,1,1], +# [1,0,1,0], +# [1,1,0,0], ] +# Output: 39 +# +# Move #1: convert row #1 => 1100 +# [ [1,1,0,0], +# [1,0,1,0], +# [1,1,0,0], ] +# +# Move #2: convert col #3 => 101 +# [ [1,1,1,0], +# [1,0,0,0], +# [1,1,1,0], ] +# +# Move #3: convert col #4 => 111 +# [ [1,1,1,1], +# [1,0,0,1], +# [1,1,1,1], ] +# +# Score: 0b1111 + 0b1001 + 0b1111 => 15 + 9 + 15 => 39 +# +# Example 2: +# +# Input: @matrix = [ [0] ] +# Output: 1 + +use Modern::Perl; +use List::Util 'sum'; + +sub compute_score { + my(@game) = @_; + return sum(map {oct("0b$_")} @game); +} + +sub invert_row { + my($row, @game) = @_; + $game[$row] =~ tr/01/10/; + return @game; +} + +sub invert_col { + my($col, @game) = @_; + for (@game) { + $_ = substr($_,0,$col).(1-substr($_,$col,1)).substr($_,$col+1); + } + return @game; +} + +sub maximize_score { + my(@game) = @_; + my $max = compute_score(@game); + my $changed; + do { + $changed = 0; + for my $row (0..$#game) { + my @new_game = invert_row($row, @game); + my $new_max = compute_score(@new_game); + if ($new_max > $max) { + @game = @new_game; + $max = $new_max; + $changed = 1; + } + } + for my $col (0..length($game[0])-1) { + my @new_game = invert_col($col, @game); + my $new_max = compute_score(@new_game); + if ($new_max > $max) { + @game = @new_game; + $max = $new_max; + $changed = 1; + } + } + } while ($changed); + return @game; +} + +say compute_score(maximize_score(@ARGV)); diff --git a/challenge-218/paulo-custodio/t/test-1.yaml b/challenge-218/paulo-custodio/t/test-1.yaml new file mode 100644 index 0000000000..538bbd6a57 --- /dev/null +++ b/challenge-218/paulo-custodio/t/test-1.yaml @@ -0,0 +1,20 @@ +- setup: + cleanup: + args: 3 1 2 + input: + output: 6 +- setup: + cleanup: + args: 4 1 3 2 + input: + output: 24 +- setup: + cleanup: + args: -1 0 1 3 1 + input: + output: 3 +- setup: + cleanup: + args: -8 2 -9 0 -4 3 + input: + output: 216 diff --git a/challenge-218/paulo-custodio/t/test-2.yaml b/challenge-218/paulo-custodio/t/test-2.yaml new file mode 100644 index 0000000000..d22f9cb2fb --- /dev/null +++ b/challenge-218/paulo-custodio/t/test-2.yaml @@ -0,0 +1,10 @@ +- setup: + cleanup: + args: 0011 1010 1100 + input: + output: 39 +- setup: + cleanup: + args: 0 + input: + output: 1 diff --git a/challenge-218/robert-dicicco/julia/ch-2.jl b/challenge-218/robert-dicicco/julia/ch-2.jl new file mode 100644 index 0000000000..25003b78cb --- /dev/null +++ b/challenge-218/robert-dicicco/julia/ch-2.jl @@ -0,0 +1,127 @@ +#!/usr/bin/env julia +#--------------------------------------------- +# AUTHOR: Robert DiCicco +# DATE : 2023-05-27 +# Challenge 218 MatrixScore.py ( Julia ) +#--------------------------------------------- +using Printf + +matrix = [ [0,0,1,1], + [1,0,1,0], + [1,1,0,0], ] + +function ToggleRow(r, ov) + testmat = [] + col = 1 + while col < 5 + x = matrix[r][col] + if x == 0 + push!(testmat,1) + else + push!(testmat,0) + end + col += 1 + end + testval = binary_to_decimal(testmat) + if testval > ov + @printf("\nToggled row %d\n",r) + matrix[r] = testmat + ShowMatrix() + end +end + +function ToggleCol(c) + ov = GetColVal(c); + row = 1; + testmat = []; + testval = 0; + while row <= 3 + matrix[row][c] == 0 ? push!(testmat,1) : push!(testmat,0) + row += 1 + end + testval = binary_to_decimal(testmat); + if testval > ov + for x in (1:3) + matrix[x][c] = testmat[x] + end + @printf("Toggled column %d\n",c); + ShowMatrix(); + end +end + + +function binary_to_decimal(binary_array) + decimal = 0 + power = length(binary_array) - 1 + for digit in binary_array + decimal += digit * ( 2 ^ power) + power -= 1 + end + return decimal +end + +function ShowMatrix() + total = 0 + cnt = 1 + while cnt <= 3 + @printf("%s\n",matrix[cnt]) + total += binary_to_decimal(matrix[cnt]) + cnt += 1 + end + @printf("Total = %d\n\n",total) +end + +function GetColVal(c) + testmat = [] + row = 1 + while row <= 3 + push!(testmat,matrix[row][c]) + row += 1 + end + colval = binary_to_decimal(testmat) + return colval +end + +ShowMatrix() +for myrow in (1:3) + bd = binary_to_decimal(matrix[myrow]) + ToggleRow(myrow,bd) +end + + +for mycol in (1:4) + ToggleCol(mycol) +end + +#= +#--------------------------------------------- +SAMPLE OUTPUT +julia .\MatrixScore.jl + +[0, 0, 1, 1] +[1, 0, 1, 0] +[1, 1, 0, 0] +Total = 25 + +Toggled row 1 +[1, 1, 0, 0] +[1, 0, 1, 0] +[1, 1, 0, 0] +Total = 34 + +Toggled column 3 +[1, 1, 1, 0] +[1, 0, 0, 0] +[1, 1, 1, 0] +Total = 36 + +Toggled column 4 +[1, 1, 1, 1] +[1, 0, 0, 1] +[1, 1, 1, 1] +Total = 39 + +#--------------------------------------------- +=# + + diff --git a/challenge-218/robert-dicicco/python/ch-2.py b/challenge-218/robert-dicicco/python/ch-2.py new file mode 100644 index 0000000000..20be6643f2 --- /dev/null +++ b/challenge-218/robert-dicicco/python/ch-2.py @@ -0,0 +1,110 @@ +#!/usr/bin/env python +#--------------------------------------------- +# AUTHOR: Robert DiCicco +# DATE : 2023-05-26 +# Challenge 218 MatrixScore.py ( Python ) +#--------------------------------------------- +matrix = [ [0,0,1,1], + [1,0,1,0], + [1,1,0,0], ] +row = 0 +col = 0 + +def ShowMatrix(): + total = 0 + for x in range(3): #[0,1,2]: + print(matrix[x]) + total += binary_to_decimal(matrix[x]) + print("Total = ",total,"\n") + +def ToggleRow(r, ov): + cnt = 0 + testmat = [] + for x in matrix[r]: + if x == 0: + testmat.append(1) + else: + testmat.append(0) + cnt += 1 + testval = binary_to_decimal(testmat) + cnt = 0 + if testval > ov: + for x in matrix[r]: + if x == 0: + matrix[r][cnt] = 1 + else: + matrix[r][cnt] = 0 + cnt += 1 + print("Toggled Row ",r) + ShowMatrix() + + +def ToggleCol(c): + ov = GetColVal(c) + row = 0 + testmat = [] + while row < 3: + if matrix[row][c] == 0: + testmat.append(1) + else: + testmat.append(0) + row += 1 + testval = binary_to_decimal(testmat) + if testval > ov: + for x in range(3): #[0,1,2]: + matrix[x][c] = testmat[x] + print("Toggled column ",c) + ShowMatrix() + +def binary_to_decimal(binary_array): + decimal = 0 + power = len(binary_array) - 1 + for digit in binary_array: + decimal += digit * (2 ** power) + power -= 1 + return decimal + +def GetColVal(c): + testmat = [] + row = 0 + while row < 3: + testmat.append(matrix[row][c]) + row += 1 + colval = binary_to_decimal(testmat) + return colval + +############################################ +ShowMatrix() +for myrow in range(3): #[0,1,2]: + bd = binary_to_decimal(matrix[myrow]) + ToggleRow(myrow, bd) + +for mycol in range(4): #[0,1,2,3]: + ToggleCol(mycol) + +#--------------------------------------------- +# SAMPLE OUTPUT +# python .\MatrixScore.py +# [0, 0, 1, 1] +# [1, 0, 1, 0] +# [1, 1, 0, 0] +# Total = 25 + +# Toggled Row 0 +# [1, 1, 0, 0] +# [1, 0, 1, 0] +# [1, 1, 0, 0] +# Total = 34 + +# Toggled column 2 +# [1, 1, 1, 0] +# [1, 0, 0, 0] +# [1, 1, 1, 0] +# Total = 36 + +# Toggled column 3 +# [1, 1, 1, 1] +# [1, 0, 0, 1] +# [1, 1, 1, 1] +# Total = 39 +#--------------------------------------------- diff --git a/challenge-218/robert-dicicco/raku/ch-2.raku b/challenge-218/robert-dicicco/raku/ch-2.raku new file mode 100644 index 0000000000..b0b5f50d59 --- /dev/null +++ b/challenge-218/robert-dicicco/raku/ch-2.raku @@ -0,0 +1,120 @@ +#!/usr/bin/env raku +#--------------------------------------------- +# AUTHOR: Robert DiCicco +# DATE : 2023-05-26 +# Challenge 218 MatrixScore.py ( Raku ) +#--------------------------------------------- +use v6; + +my @matrix = [ [0,0,1,1], + [1,0,1,0], + [1,1,0,0], ]; + +sub ShowMatrix() { + my $total = 0; + my $cnt = 0; + while $cnt <= 2 { + say (@matrix[$cnt]); + $total += binary_to_decimal(@matrix[$cnt]); + $cnt++; + } + say "Total = ",$total; + say ""; +} + +sub binary_to_decimal(@binary_array) { + my $decimal = 0; + my $power = @binary_array.elems - 1; + for (@binary_array) -> $digit { + $decimal += $digit * (2 ** $power); + $power -= 1; + } + return $decimal; +} + +sub ToggleRow($r, $ov) { + my @testmat = []; + my $col = 0; + while $col <= 3 { + my $x = @matrix[$r][$col++]; + $x == 0 ?? @testmat.push: 1 !! @testmat.push: 0; + } + my $testval = binary_to_decimal(@testmat); + if $testval > $ov { + say "Toggled row ",$r; + @matrix[$r] = @testmat; + ShowMatrix(); + } +} + +sub ToggleCol($c) { + my $ov = GetColVal($c); + my $row = 0; + my @testmat = []; + my $testval = 0; + while $row < 3 { + @matrix[$row][$c] == 0 ?? @testmat.push: 1 !! @testmat.push: 0; + $row++; + $testval = binary_to_decimal(@testmat); + } + if $testval > $ov { + for 0..3 -> $x { + @matrix[$x][$c] = @testmat[$x]; + } + print("Toggled column ",$c,"\n"); + ShowMatrix(); + } +} + +sub GetColVal($c) { + my @testmat = []; + my $row = 0; + while $row < 3 { + @testmat.push: @matrix[$row][$c]; + $row++; + } + my $colval = binary_to_decimal(@testmat); + return $colval; +} + + +#################################################### +ShowMatrix(); + +for 0..2 -> $myrow { + my $bd = binary_to_decimal(@matrix[$myrow]); + ToggleRow($myrow, $bd); +} + +for (0..3) -> $myrow { + ToggleCol($myrow); +} + +=begin comment +#--------------------------------------------- +SAMPLE OUTPUT +raku .\MatrixScore.rk +[0 0 1 1] +[1 0 1 0] +[1 1 0 0] +Total = 25 + +Toggled row 0 +[1 1 0 0] +[1 0 1 0] +[1 1 0 0] +Total = 34 + +Toggled column 2 +[1 1 1 0] +[1 0 0 0] +[1 1 1 0] +Total = 36 + +Toggled column 3 +[1 1 1 1] +[1 0 0 1] +[1 1 1 1] +Total = 39 +#--------------------------------------------- +=end comment diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 442c77c5a0..2f3476628e 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,8 +1,124 @@ { + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "title" : { + "text" : "The Weekly Challenge - 218" + }, + "tooltip" : { + "followPointer" : 1, + "pointFormat" : "{point.name}: {point.y:f}
", + "headerFormat" : "{series.name}
" + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + } + } + }, + "legend" : { + "enabled" : 0 + }, + "series" : [ + { + "data" : [ + { + "drilldown" : "Avery Adams", + "name" : "Avery Adams", + "y" : 3 + }, + { + "name" : "David Ferrone", + "drilldown" : "David Ferrone", + "y" : 2 + }, + { + "drilldown" : "E. Choroba", + "name" : "E. Choroba", + "y" : 2 + }, + { + "drilldown" : "Jorg Sommrey", + "name" : "Jorg Sommrey", + "y" : 2 + }, + { + "name" : "Lubos Kolouch", + "drilldown" : "Lubos Kolouch", + "y" : 2 + }, + { + "y" : 2, + "drilldown" : "Mark Anderson", + "name" : "Mark Anderson" + }, + { + "name" : "Niels van Dijke", + "drilldown" : "Niels van Dijke", + "y" : 2 + }, + { + "y" : 2, + "drilldown" : "Paulo Custodio", + "name" : "Paulo Custodio" + }, + { + "name" : "Peter Campbell Smith", + "drilldown" : "Peter Campbell Smith", + "y" : 3 + }, + { + "y" : 3, + "name" : "Robert DiCicco", + "drilldown" : "Robert DiCicco" + }, + { + "drilldown" : "Roger Bell_West", + "name" : "Roger Bell_West", + "y" : 4 + }, + { + "drilldown" : "Stephen G. Lynn", + "name" : "Stephen G. Lynn", + "y" : 3 + }, + { + "drilldown" : "Steven Wilson", + "name" : "Steven Wilson", + "y" : 1 + }, + { + "y" : 4, + "name" : "Thomas Kohler", + "drilldown" : "Thomas Kohler" + }, + { + "y" : 3, + "drilldown" : "Ulrich Rieke", + "name" : "Ulrich Rieke" + }, + { + "y" : 3, + "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan" + } + ], + "colorByPoint" : 1, + "name" : "The Weekly Challenge - 218" + } + ], + "xAxis" : { + "type" : "category" + }, "drilldown" : { "series" : [ { - "name" : "Avery Adams", + "id" : "Avery Adams", "data" : [ [ "Perl", @@ -13,31 +129,51 @@ 2 ] ], - "id" : "Avery Adams" + "name" : "Avery Adams" }, { - "id" : "David Ferrone", "data" : [ [ "Perl", 2 ] ], + "id" : "David Ferrone", "name" : "David Ferrone" }, { + "name" : "E. Choroba", "data" : [ [ "Perl", 2 ] ], + "id" : "E. Choroba" + }, + { + "id" : "Jorg Sommrey", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Jorg Sommrey" + }, + { "name" : "Lubos Kolouch", + "data" : [ + [ + "Perl", + 2 + ] + ], "id" : "Lubos Kolouch" }, { - "id" : "Mark Anderson", "name" : "Mark Anderson", + "id" : "Mark Anderson", "data" : [ [ "Raku", @@ -56,7 +192,16 @@ "id" : "Niels van Dijke" }, { - "id" : "Peter Campbell Smith", + "id" : "Paulo Custodio", + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Paulo Custodio" + }, + { "name" : "Peter Campbell Smith", "data" : [ [ @@ -67,10 +212,10 @@ "Blog", 1 ] - ] + ], + "id" : "Peter Campbell Smith" }, { - "name" : "Robert DiCicco", "data" : [ [ "Perl", @@ -78,14 +223,15 @@ ], [ "Raku", - 1 + 2 ] ], - "id" : "Robert DiCicco" + "id" : "Robert DiCicco", + "name" : "Robert DiCicco" }, { - "id" : "Roger Bell_West", "name" : "Roger Bell_West", + "id" : "Roger Bell_West", "data" : [ [ "Perl", @@ -98,6 +244,7 @@ ] }, { + "id" : "Stephen G. Lynn", "data" : [ [ "Perl", @@ -108,8 +255,7 @@ 1 ] ], - "name" : "Stephen G. Lynn", - "id" : "Stephen G. Lynn" + "name" : "Stephen G. Lynn" }, { "data" : [ @@ -118,8 +264,8 @@ 1 ] ], - "name" : "Steven Wilson", - "id" : "Steven Wilson" + "id" : "Steven Wilson", + "name" : "Steven Wilson" }, { "data" : [ @@ -132,10 +278,11 @@ 2 ] ], - "name" : "Thomas Kohler", - "id" : "Thomas Kohler" + "id" : "Thomas Kohler", + "name" : "Thomas Kohler" }, { + "id" : "Ulrich Rieke", "data" : [ [ "Perl", @@ -146,10 +293,10 @@ 1 ] ], - "name" : "Ulrich Rieke", - "id" : "Ulrich Rieke" + "name" : "Ulrich Rieke" }, { + "id" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -160,116 +307,14 @@ 1 ] ], - "name" : "W. Luis Mochan", - "id" : "W. Luis Mochan" + "name" : "W. Luis Mochan" } ] }, - "legend" : { - "enabled" : 0 - }, "subtitle" : { - "text" : "[Champions: 13] Last updated at 2023-05-26 07:54:47 GMT" - }, - "tooltip" : { - "followPointer" : 1, - "pointFormat" : "{point.name}: {point.y:f}
", - "headerFormat" : "{series.name}
" - }, - "title" : { - "text" : "The Weekly Challenge - 218" - }, - "xAxis" : { - "type" : "category" + "text" : "[Champions: 16] Last updated at 2023-05-27 00:09:13 GMT" }, "chart" : { "type" : "column" - }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - } - } - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "series" : [ - { - "data" : [ - { - "drilldown" : "Avery Adams", - "y" : 3, - "name" : "Avery Adams" - }, - { - "name" : "David Ferrone", - "drilldown" : "David Ferrone", - "y" : 2 - }, - { - "y" : 2, - "drilldown" : "Lubos Kolouch", - "name" : "Lubos Kolouch" - }, - { - "name" : "Mark Anderson", - "y" : 2, - "drilldown" : "Mark Anderson" - }, - { - "drilldown" : "Niels van Dijke", - "y" : 2, - "name" : "Niels van Dijke" - }, - { - "name" : "Peter Campbell Smith", - "y" : 3, - "drilldown" : "Peter Campbell Smith" - }, - { - "name" : "Robert DiCicco", - "y" : 2, - "drilldown" : "Robert DiCicco" - }, - { - "name" : "Roger Bell_West", - "drilldown" : "Roger Bell_West", - "y" : 4 - }, - { - "y" : 3, - "drilldown" : "Stephen G. Lynn", - "name" : "Stephen G. Lynn" - }, - { - "drilldown" : "Steven Wilson", - "y" : 1, - "name" : "Steven Wilson" - }, - { - "y" : 4, - "drilldown" : "Thomas Kohler", - "name" : "Thomas Kohler" - }, - { - "y" : 3, - "drilldown" : "Ulrich Rieke", - "name" : "Ulrich Rieke" - }, - { - "drilldown" : "W. Luis Mochan", - "y" : 3, - "name" : "W. Luis Mochan" - } - ], - "name" : "The Weekly Challenge - 218", - "colorByPoint" : 1 - } - ] + } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index dc58f946fb..efa7f8f9b4 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,17 +1,20 @@ { + "legend" : { + "enabled" : "false" + }, "series" : [ { "dataLabels" : { - "y" : 10, - "format" : "{point.y:.0f}", "align" : "right", - "rotation" : -90, + "color" : "#FFFFFF", + "y" : 10, "enabled" : "true", "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" }, - "color" : "#FFFFFF" + "format" : "{point.y:.0f}", + "rotation" : -90 }, "data" : [ [ @@ -20,44 +23,41 @@ ], [ "Perl", - 11122 + 11128 ], [ "Raku", - 6425 + 6426 ] ], "name" : "Contributions" } ], + "title" : { + "text" : "The Weekly Challenge Contributions [2019 - 2023]" + }, "yAxis" : { "min" : 0, "title" : { "text" : null } }, - "title" : { - "text" : "The Weekly Challenge Contributions [2019 - 2023]" - }, "tooltip" : { "pointFormat" : "{point.y:.0f}" }, + "subtitle" : { + "text" : "Last updated at 2023-05-27 00:09:13 GMT" + }, "chart" : { "type" : "column" }, "xAxis" : { - "type" : "category", "labels" : { "style" : { "fontFamily" : "Verdana, sans-serif", "fontSize" : "13px" } - } - }, - "subtitle" : { - "text" : "Last updated at 2023-05-26 07:54:47 GMT" - }, - "legend" : { - "enabled" : "false" + }, + "type" : "category" } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index ce0b5c0872..52595c82f5 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,3974 +1,12 @@ { - "drilldown" : { - "series" : [ - { - "id" : "001", - "name" : "001", - "data" : [ - [ - "Perl", - 105 - ], - [ - "Raku", - 47 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "id" : "002", - "data" : [ - [ - "Perl", - 83 - ], - [ - "Raku", - 36 - ], - [ - "Blog", - 10 - ] - ], - "name" : "002" - }, - { - "id" : "003", - "name" : "003", - "data" : [ - [ - "Perl", - 48 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 9 - ] - ] - }, - { - "id" : "004", - "name" : "004", - "data" : [ - [ - "Perl", - 60 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "name" : "005", - "data" : [ - [ - "Perl", - 42 - ], - [ - "Raku", - 26 - ], - [ - "Blog", - 12 - ] - ], - "id" : "005" - }, - { - "data" : [ - [ - "Perl", - 36 - ], - [ - "Raku", - 18 - ], - [ - "Blog", - 7 - ] - ], - "name" : "006", - "id" : "006" - }, - { - "name" : "007", - "data" : [ - [ - "Perl", - 36 - ], - [ - "Raku", - 23 - ], - [ - "Blog", - 10 - ] - ], - "id" : "007" - }, - { - "name" : "008", - "data" : [ - [ - "Perl", - 48 - ], - [ - "Raku", - 22 - ], - [ - "Blog", - 12 - ] - ], - "id" : "008" - }, - { - "id" : "009", - "data" : [ - [ - "Perl", - 46 - ], - [ - "Raku", - 21 - ], - [ - "Blog", - 13 - ] - ], - "name" : "009" - }, - { - "id" : "010", - "name" : "010", - "data" : [ - [ - "Perl", - 39 - ], - [ - "Raku", - 19 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 51 - ], - [ - "Raku", - 28 - ], - [ - "Blog", - 10 - ] - ], - "name" : "011", - "id" : "011" - }, - { - "name" : "012", - "data" : [ - [ - "Perl", - 51 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 11 - ] - ], - "id" : "012" - }, - { - "data" : [ - [ - "Perl", - 49 - ], - [ - "Raku", - 25 - ], - [ - "Blog", - 13 - ] - ], - "name" : "013", - "id" : "013" - }, - { - "name" : "014", - "data" : [ - [ - "Perl", - 56 - ], - [ - "Raku", - 31 - ], - [ - "Blog", - 15 - ] - ], - "id" : "014" - }, - { - "name" : "015", - "data" : [ - [ - "Perl", - 58 - ], - [ - "Raku", - 28 - ], - [ - "Blog", - 15 - ] - ], - "id" : "015" - }, - { - "name" : "016", - "data" : [ - [ - "Perl", - 38 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 13 - ] - ], - "id" : "016" - }, - { - "name" : "017", - "data" : [ - [ - "Perl", - 47 - ], - [ - "Raku", - 27 - ], - [ - "Blog", - 12 - ] - ], - "id" : "017" - }, - { - "data" : [ - [ - "Perl", - 38 - ], - [ - "Raku", - 31 - ], - [ - "Blog", - 14 - ] - ], - "name" : "018", - "id" : "018" - }, - { - "data" : [ - [ - "Perl", - 58 - ], - [ - "Raku", - 34 - ], - [ - "Blog", - 13 - ] - ], - "name" : "019", - "id" : "019" - }, - { - "data" : [ - [ - "Perl", - 53 - ], - [ - "Raku", - 37 - ], - [ - "Blog", - 13 - ] - ], - "name" : "020", - "id" : "020" - }, - { - "id" : "021", - "data" : [ - [ - "Perl", - 40 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 10 - ] - ], - "name" : "021" - }, - { - "data" : [ - [ - "Perl", - 39 - ], - [ - "Raku", - 23 - ], - [ - "Blog", - 10 - ] - ], - "name" : "022", - "id" : "022" - }, - { - "data" : [ - [ - "Perl", - 57 - ], - [ - "Raku", - 32 - ], - [ - "Blog", - 12 - ] - ], - "name" : "023", - "id" : "023" - }, - { - "id" : "024", - "data" : [ - [ - "Perl", - 40 - ], - [ - "Raku", - 26 - ], - [ - "Blog", - 11 - ] - ], - "name" : "024" - }, - { - "data" : [ - [ - "Perl", - 31 - ], - [ - "Raku", - 19 - ], - [ - "Blog", - 12 - ] - ], - "name" : "025", - "id" : "025" - }, - { - "id" : "026", - "name" : "026", - "data" : [ - [ - "Perl", - 37 - ], - [ - "Raku", - 29 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "id" : "027", - "name" : "027", - "data" : [ - [ - "Perl", - 33 - ], - [ - "Raku", - 22 - ], - [ - "Blog", - 9 - ] - ] - }, - { - "id" : "028", - "name" : "028", - "data" : [ - [ - "Perl", - 47 - ], - [ - "Raku", - 26 - ], - [ - "Blog", - 9 - ] - ] - }, - { - "id" : "029", - "name" : "029", - "data" : [ - [ - "Perl", - 44 - ], - [ - "Raku", - 27 - ], - [ - "Blog", - 12 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 78 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 10 - ] - ], - "name" : "030", - "id" : "030" - }, - { - "name" : "031", - "data" : [ - [ - "Perl", - 54 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 9 - ] - ], - "id" : "031" - }, - { - "id" : "032", - "data" : [ - [ - "Perl", - 61 - ], - [ - "Raku", - 27 - ], - [ - "Blog", - 10 - ] - ], - "name" : "032" - }, - { - "data" : [ - [ - "Perl", - 66 - ], - [ - "Raku", - 38 - ], - [ - "Blog", - 10 - ] - ], - "name" : "033", - "id" : "033" - }, - { - "id" : "034", - "data" : [ - [ - "Perl", - 36 - ], - [ - "Raku", - 23 - ], - [ - "Blog", - 11 - ] - ], - "name" : "034" - }, - { - "id" : "035", - "name" : "035", - "data" : [ - [ - "Perl", - 37 - ], - [ - "Raku", - 22 - ], - [ - "Blog", - 9 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 37 - ], - [ - "Raku", - 22 - ], - [ - "Blog", - 11 - ] - ], - "name" : "036", - "id" : "036" - }, - { - "data" : [ - [ - "Perl", - 37 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 9 - ] - ], - "name" : "037", - "id" : "037" - }, - { - "name" : "038", - "data" : [ - [ - "Perl", - 38 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 12 - ] - ], - "id" : "038" - }, - { - "id" : "039", - "data" : [ - [ - "Perl", - 35 - ], - [ - "Raku", - 21 - ], - [ - "Blog", - 12 - ] - ], - "name" : "039" - }, - { - "name" : "040", - "data" : [ - [ - "Perl", - 43 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 10 - ] - ], - "id" : "040" - }, - { - "id" : "041", - "name" : "041", - "data" : [ - [ - "Perl", - 41 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 9 - ] - ] - }, - { - "name" : "042", - "data" : [ - [ - "Perl", - 53 - ], - [ - "Raku", - 34 - ], - [ - "Blog", - 11 - ] - ], - "id" : "042" - }, - { - "id" : "043", - "name" : "043", - "data" : [ - [ - "Perl", - 37 - ], - [ - "Raku", - 24 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "id" : "044", - "data" : [ - [ - "Perl", - 46 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 11 - ] - ], - "name" : "044" - }, - { - "id" : "045", - "name" : "045", - "data" : [ - [ - "Perl", - 56 - ], - [ - "Raku", - 35 - ], - [ - "Blog", - 11 - ] - ] - }, - { - "name" : "046", - "data" : [ - [ - "Perl", - 50 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 10 - ] - ], - "id" : "046" - }, - { - "name" : "047", - "data" : [ - [ - "Perl", - 47 - ], - [ - "Raku", - 31 - ], - [ - "Blog", - 10 - ] - ], - "id" : "047" - }, - { - "data" : [ - [ - "Perl", - 63 - ], - [ - "Raku", - 37 - ], - [ - "Blog", - 12 - ] - ], - "name" : "048", - "id" : "048" - }, - { - "id" : "049", - "data" : [ - [ - "Perl", - 54 - ], - [ - "Raku", - 27 - ], - [ - "Blog", - 12 - ] - ], - "name" : "049" - }, - { - "name" : "050", - "data" : [ - [ - "Perl", - 56 - ], - [ - "Raku", - 36 - ], - [ - "Blog", - 12 - ] - ], - "id" : "050" - }, - { - "name" : "051", - "data" : [ - [ - "Perl", - 52 - ], - [ - "Raku", - 32 - ], - [ - "Blog", - 11 - ] - ], - "id" : "051" - }, - { - "name" : "052", - "data" : [ - [ - "Perl", - 47 - ], - [ - "Raku", - 32 - ], - [ - "Blog", - 14 - ] - ], - "id" : "052" - }, - { - "id" : "053", - "name" : "053", - "data" : [ - [ - "Perl", - 49 - ], - [ - "Raku", - 41 - ], - [ - "Blog", - 15 - ] - ] - }, - { - "id" : "054", - "name" : "054", - "data" : [ - [ - "Perl", - 49 - ], - [ - "Raku", - 40 - ], - [ - "Blog", - 18 - ] - ] - }, - { - "name" : "055", - "data" : [ - [ - "Perl", - 45 - ], - [ - "Raku", - 33 - ], - [ - "Blog", - 14 - ] - ], - "id" : "055" - }, - { - "data" : [ - [ - "Perl", - 53 - ], - [ - "Raku", - 34 - ], - [ - "Blog", - 17 - ] - ], - "name" : "056", - "id" : "056" - }, - { - "data" : [ - [ - "Perl", - 45 - ], - [ - "Raku", - 26 - ], - [ - "Blog", - 15 - ] - ], - "name" : "057", - "id" : "057" - }, - { - "id" : "058", - "name" : "058", - "data" : [ - [ - "Perl", - 35 - ], - [ - "Raku", - 23 - ], - [ - "Blog", - 13 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 43 - ], - [ - "Raku", - 34 - ], - [ - "Blog", - 16 - ] - ], - "name" : "059", - "id" : "059" - }, - { - "id" : "060", - "name" : "060", - "data" : [ - [ - "Perl", - 43 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 16 - ] - ] - }, - { - "id" : "061", - "name" : "061", - "data" : [ - [ - "Perl", - 41 - ], - [ - "Raku", - 30 - ], - [ - "Blog", - 14 - ] - ] - }, - { - "data" : [ - [ - "Perl", - 32 - ], - [ - "Raku", - 19 - ], - [ - "Blog", - 11 - ] - ], - "name" : "062", - "id" : "062" - }, - { - "id" : "063", - "name" : "063", - "data" : [ - [