<commit_before>import logging

import networkx as nx
from tardis.plasma.exceptions import PlasmaMissingModule, NotInitializedModule

import tempfile
import fileinput


logger = logging.getLogger(__name__)


class BasePlasma(object):
    outputs_dict = {}
    def __init__(self, plasma_properties, **kwargs):
        self.outputs_dict = {}
        self.input_properties = []
        self.plasma_properties = self._init_properties(plasma_properties,
                                                       **kwargs)
        
        self._build_graph()
        self.write_to_tex('Plasma_Graph', 'Plasma_Formulae')
        self.update(**kwargs)

    def __getattr__(self, item):
        if item in self.outputs_dict:
            return self.get_value(item)
        else:
            super(BasePlasma, self).__getattribute__(item)

    def __setattr__(self, key, value):
        if key != 'module_dict' and key in self.outputs_dict:
            raise AttributeError('Plasma inputs can only be updated using '
                                 'the \'update\' method')
        else:
            super(BasePlasma, self).__setattr__(key, value)

    def __dir__(self):
        attrs = [item for item in self.__dict__
                 if not item.startswith('_')]
        attrs += [item for item in self.__class__.__dict__
                 if not item.startswith('_')]
        attrs += self.module_dict.keys()
<commit_msg>Removed latex file generation for now.<commit_after>import logging

import networkx as nx
from tardis.plasma.exceptions import PlasmaMissingModule, NotInitializedModule

import tempfile
import fileinput


logger = logging.getLogger(__name__)


class BasePlasma(object):
    outputs_dict = {}
    def __init__(self, plasma_properties, **kwargs):
        self.outputs_dict = {}
        self.input_properties = []
        self.plasma_properties = self._init_properties(plasma_properties,
                                                       **kwargs)
        
        self._build_graph()
#        self.write_to_tex('Plasma_Graph', 'Plasma_Formulae')
        self.update(**kwargs)

    def __getattr__(self, item):
        if item in self.outputs_dict:
            return self.get_value(item)
        else:
            super(BasePlasma, self).__getattribute__(item)

    def __setattr__(self, key, value):
        if key != 'module_dict' and key in self.outputs_dict:
            raise AttributeError('Plasma inputs can only be updated using '
                                 'the \'update\' method')
        else:
            super(BasePlasma, self).__setattr__(key, value)

    def __dir__(self):
        attrs = [item for item in self.__dict__
                 if not item.startswith('_')]
        attrs += [item for item in self.__class__.__dict__
                 if not item.startswith('_')]
        attrs += self.module_dict.keys()

{'fraction_non_alphanumeric': 0.0912280701754386, 'fraction_numerical': 0.0, 'mean_word_length': 2.1997755331088666, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '621693', 'n_tokens_mistral': 781, 'n_tokens_neox': 765, 'n_words': 191}