<commit_before>
encode(metadata, x) = x

encode(metadata, x::Dict) =
    [(encode(metadata, k), encode(metadata, v)) for (k, v) in x] |> sort

encode(metadata, x::Union(AbstractArray, Tuple)) =
    map(y -> encode(metadata, y), x)

function encode(metadata, x::FloatingPoint)
    precision = get(metadata, "precision", 3)
    round(x, precision)
end

@require SymPy begin
    Homework.encode(metadata, x::SymPy.Sym) = "sym-" * string(x)
end
<commit_msg>round any Real<commit_after>
encode(metadata, x) = x

encode(metadata, x::Dict) =
    [(encode(metadata, k), encode(metadata, v)) for (k, v) in x] |> sort

encode(metadata, x::Union(AbstractArray, Tuple)) =
    map(y -> encode(metadata, y), x)

function encode(metadata, x::Real)
    precision = get(metadata, "precision", 3)
    round(x, precision)
end

@require SymPy begin
    Homework.encode(metadata, x::SymPy.Sym) = "sym-" * string(x)
end

{'fraction_non_alphanumeric': 0.16926503340757237, 'fraction_numerical': 0.0022271714922048997, 'mean_word_length': 4.726114649681529, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '7097883', 'n_tokens_mistral': 324, 'n_tokens_neox': 315, 'n_words': 84}