<commit_before>module data_objects

import PyCall: PyObject, PyDict, pycall, pybuiltin, PyAny
import Base: size, show, showarray, display, showerror
import ..array: YTArray, YTQuantity, in_units, array_or_quan
import ..images: FixedResolutionBuffer

Center = Union(String,Array{Real,3},YTArray)
Length = Union(Real,(Real,String),YTQuantity)

# Dataset

type Dataset
    ds::PyObject
    parameters::PyDict
    domain_center::YTArray
    domain_left_edge::YTArray
    domain_right_edge::YTArray
    domain_width::YTArray
    domain_dimensions::Array{Integer,3}
    dimensionality::Integer
    current_time::YTQuantity
    current_redshift::Real
    max_level::Integer
    function Dataset(ds::PyObject)
        new(ds,
            PyDict(ds["parameters"]::PyObject),
            YTArray(ds["domain_center"]),
            YTArray(ds["domain_left_edge"]),
            YTArray(ds["domain_right_edge"]),
            YTArray(ds["domain_width"]),
            ds[:domain_dimensions],
            ds[:dimensionality][1],
            YTQuantity(ds["current_time"]),
            ds[:current_redshift],
            ds[:max_level][1])
    end<commit_msg>Missed this<commit_after>module data_objects

import PyCall: PyObject, PyDict, pycall, pybuiltin, PyAny
import Base: size, show, showarray, display, showerror
import ..array: YTArray, YTQuantity, in_units, array_or_quan
import ..fixed_resolution: FixedResolutionBuffer

Center = Union(String,Array{Real,3},YTArray)
Length = Union(Real,(Real,String),YTQuantity)

# Dataset

type Dataset
    ds::PyObject
    parameters::PyDict
    domain_center::YTArray
    domain_left_edge::YTArray
    domain_right_edge::YTArray
    domain_width::YTArray
    domain_dimensions::Array{Integer,3}
    dimensionality::Integer
    current_time::YTQuantity
    current_redshift::Real
    max_level::Integer
    function Dataset(ds::PyObject)
        new(ds,
            PyDict(ds["parameters"]::PyObject),
            YTArray(ds["domain_center"]),
            YTArray(ds["domain_left_edge"]),
            YTArray(ds["domain_right_edge"]),
            YTArray(ds["domain_width"]),
            ds[:domain_dimensions],
            ds[:dimensionality][1],
            YTQuantity(ds["current_time"]),
            ds[:current_redshift],
            ds[:max_level][1])
    end
{'fraction_non_alphanumeric': 0.11703056768558952, 'fraction_numerical': 0.0034934497816593887, 'mean_word_length': 3.618951612903226, 'pattern_counts': {'":': 0, '<': 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': '4397937', 'n_tokens_mistral': 720, 'n_tokens_neox': 718, 'n_words': 114}