<commit_before>{
  "exercise": "all-your-base",
  "version": "1.1.0",
  "comments": [
    "It's up to each track do decide:",
    "",
    "1. What's the canonical representation of zero?",
    " - []?",
    " - [0]?",
    "",
    "2. What representations of zero are allowed?",
    " - []?",
    " - [0]?",
    " - [0,0]?",
    "",
    "3. Are leading zeroes allowed?",
    "",
    "4. How should invalid input be handled?",
    "",
    "All the undefined cases are marked as null.",
    "",
    "All your numeric-base are belong to [2..]. :)"
  ],
  "cases": [
    {
      "description": "single bit one to decimal",
      "property": "rebase",
      "input_base": 2,
      "input_digits": [1],
      "output_base": 10,
      "expected": [1]
    },
    {
      "description": "binary to single decimal",
      "property": "rebase",
      "input_base": 2,
      "input_digits": [1, 0, 1],
      "output_base": 10,
      "expected": [5]
    },
    {
      "description": "single decimal to binary",
      "property": "rebase",
      "input_base": 10,
      "input_digits": [5],
      "output_base": 2,
      "expected": [1, 0, 1]
    },
    {
      "description": "binary to multiple decimal",
      "property": "rebase",
      "input_base": 2,
      "input_digits": [1, 0, 1, 0, 1, 0],
      "output_base": 10,
      "expected": [4, 2]
    },
    {
      "description": "decimal to binary",
      "property": "rebase",
      "input_base": 10,
      "input_digits": [4, 2],
      "output_base": 2,
      "expected": [1, 0, 1, 0, 1, 0]
    },
    {
      "description": "trinary to hexadecimal",
      "property": "rebase",
      "input_base": 3,
      "input_digits": [1, 1, 2, 0],
      "output_base": 16,
      "expected": [2, 10]
    },
    {
      "description": "hexadecimal to trinary",
      "property": "rebase",
      "input_base": 16,
      "input_digits": [2, 10],
      "output_base": 3,
      "expected": [1, 1, 2, 0]
    },
    {
      "description": "15-bit integer",
      "property": "rebase",
      "input_base": 97,
      "input_digits": [3, 46, 60],
      "output_base": 73,
      "expected": [6, 10, 45]
    },
    {
      "description": "empty list",
      "property": "rebase",
      "input_base": 2,
      "input_digits": [],
      "output_base": 10,
      "expected": null
    },
    {
      "description": "single zero",
      "property": "rebase",
      "input_base": 10,
      "input_digits": [0],
      "output_base": 2,
      "expected": null
    },
    {
      "description": "multiple zeros",
      "property": "rebase",
      "input_base": 10,
      "input_digits": [0, 0, 0],
      "output_base": 2,
      "expected": null
    },
    {
      "description": "leading zeros",
      "property": "rebase",
      "input_base": 7,
      "input_digits": [0, 6, 0],
      "output_base": 10,
      "expected": null
    },
    {
      "description": "first base is one",
      "property": "rebase",
      "input_base": 1,
      "input_digits": [],
      "output_base": 10,
      "expected": null
    },
    {
      "description": "first base is zero",
      "property": "rebase",
      "input_base": 0,
      "input_digits": [],
      "output_base": 10,
      "expected": null
    },
    {
      "description": "first base is negative",
      "property": "rebase",
      "input_base": -2,
      "input_digits": [1],
      "output_base": 10,
      "expected": null
    },
    {
      "description": "negative digit",
      "property": "rebase",
      "input_base": 2,
      "input_digits": [1, -1, 1, 0, 1, 0],
      "output_base": 10,
      "expected": null
    },
    {
      "description": "invalid positive digit",
      "property": "rebase",
      "input_base": 2,
      "input_digits": [1, 2, 1, 0, 1, 0],
      "output_base": 10,
      "expected": null
    },
    {
      "description": "second base is one",
      "property": "rebase",
      "input_base": 2,
      "input_digits": [1, 0, 1, 0, 1, 0],
      "output_base": 1,
      "expected": null
    },
    {
      "description": "second base is zero",
      "property": "rebase",
      "input_base": 10,
      "input_digits": [7],
      "output_base": 0,
      "expected": null
    },
    {
      "description": "second base is negative",
      "property": "rebase",
      "input_base": 2,
      "input_digits": [1],
      "output_base": -7,
      "expected": null
    },
    {
      "description": "both bases are negative",
      "property": "rebase",
      "input_base": -2,
      "input_digits": [1],
      "output_base": -7,
      "expected": null
    }
  ]
}
<commit_msg>all-your-base: Be decisive about zeroes (#1001)<commit_after>{
  "exercise": "all-your-base",
  "version": "1.2.0",
  "comments": [
    "This canonical data makes the following choices:",
    "1. Zero is always represented in outputs as [0] instead of [].",
    "2. In no other instances are leading zeroes present in any outputs.",
    "3. Leading zeroes are accepted in inputs.",
    "4. An empty sequence of input digits is considered zero, rather than an error.",
    "",
    "Tracks that wish to make different decisions for these choices may translate appropriately.",
    "",
    "It's up to each track do decide:",
    "How should invalid input be handled?",
    "",
    "All the undefined cases are marked as null.",
    "",
    "All your numeric-base are belong to [2..]. :)"
  ],
  "cases": [
    {
      "description": "single bit one to decimal",
      "property": "rebase",
      "input_base": 2,
      "input_digits": [1],
      "output_base": 10,
      "expected": [1]
    },
    {
      "description": "binary to single decimal",
      "property": "rebase",
      "input_base": 2,
      "input_digits": [1, 0, 1],
      "output_base": 10,
      "expected": [5]
    },
    {
      "description": "single decimal to binary",
      "property": "rebase",
      "input_base": 10,
      "input_digits": [5],
      "output_base": 2,
      "expected": [1, 0, 1]
    },
    {
      "description": "binary to multiple decimal",
      "property": "rebase",
      "input_base": 2,
      "input_digits": [1, 0, 1, 0, 1, 0],
      "output_base": 10,
      "expected": [4, 2]
    },
    {
      "description": "decimal to binary",
      "property": "rebase",
      "input_base": 10,
      "input_digits": [4, 2],
      "output_base": 2,
      "expected": [1, 0, 1, 0, 1, 0]
    },
    {
      "description": "trinary to hexadecimal",
      "property": "rebase",
      "input_base": 3,
      "input_digits": [1, 1, 2, 0],
      "output_base": 16,
      "expected": [2, 10]
    },
    {
      "description": "hexadecimal to trinary",
      "property": "rebase",
      "input_base": 16,
      "input_digits": [2, 10],
      "output_base": 3,
      "expected": [1, 1, 2, 0]
    },
    {
      "description": "15-bit integer",
      "property": "rebase",
      "input_base": 97,
      "input_digits": [3, 46, 60],
      "output_base": 73,
      "expected": [6, 10, 45]
    },
    {
      "description": "empty list",
      "property": "rebase",
      "input_base": 2,
      "input_digits": [],
      "output_base": 10,
      "expected": [0]
    },
    {
      "description": "single zero",
      "property": "rebase",
      "input_base": 10,
      "input_digits": [0],
      "output_base": 2,
      "expected": [0]
    },
    {
      "description": "multiple zeros",
      "property": "rebase",
      "input_base": 10,
      "input_digits": [0, 0, 0],
      "output_base": 2,
      "expected": [0]
    },
    {
      "description": "leading zeros",
      "property": "rebase",
      "input_base": 7,
      "input_digits": [0, 6, 0],
      "output_base": 10,
      "expected": [4, 2]
    },
    {
      "description": "first base is one",
      "property": "rebase",
      "input_base": 1,
      "input_digits": [],
      "output_base": 10,
      "expected": null
    },
    {
      "description": "first base is zero",
      "property": "rebase",
      "input_base": 0,
      "input_digits": [],
      "output_base": 10,
      "expected": null
    },
    {
      "description": "first base is negative",
      "property": "rebase",
      "input_base": -2,
      "input_digits": [1],
      "output_base": 10,
      "expected": null
    },
    {
      "description": "negative digit",
      "property": "rebase",
      "input_base": 2,
      "input_digits": [1, -1, 1, 0, 1, 0],
      "output_base": 10,
      "expected": null
    },
    {
      "description": "invalid positive digit",
      "property": "rebase",
      "input_base": 2,
      "input_digits": [1, 2, 1, 0, 1, 0],
      "output_base": 10,
      "expected": null
    },
    {
      "description": "second base is one",
      "property": "rebase",
      "input_base": 2,
      "input_digits": [1, 0, 1, 0, 1, 0],
      "output_base": 1,
      "expected": null
    },
    {
      "description": "second base is zero",
      "property": "rebase",
      "input_base": 10,
      "input_digits": [7],
      "output_base": 0,
      "expected": null
    },
    {
      "description": "second base is negative",
      "property": "rebase",
      "input_base": 2,
      "input_digits": [1],
      "output_base": -7,
      "expected": null
    },
    {
      "description": "both bases are negative",
      "property": "rebase",
      "input_base": -2,
      "input_digits": [1],
      "output_base": -7,
      "expected": null
    }
  ]
}

{'fraction_non_alphanumeric': 0.18408385923628195, 'fraction_numerical': 0.033586479837415764, 'mean_word_length': 2.088866864882722, 'pattern_counts': {'":': 260, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3422963', 'n_tokens_mistral': 3460, 'n_tokens_neox': 3218, 'n_words': 851}