<commit_before>class BalanceSheet(object):
    """
    Implements the balance sheet of a bank.
    """
    def __init__(self):
        # Assets
        self.interbank_loans = dict()
        self.consumer_loans = dict()
        self.cash = 0
        # Liabilities
        self.deposits = 0
        self.interbank_borrowing = dict()
        self.equity = 0

    def assets(self):
        """
        Returns a float of all assets.
        :rtype: float
        """
        return sum(self.interbank_loans.values()) + sum(self.consumer_loans.values()) + self.cash

    def liabilities(self):
        """
        Returns a float of all liabilities.
        :rtype: float
        """
        return self.deposits + sum(self.interbank_borrowing.values()) + self.equity<commit_msg>Updated BalanceSheet in accordanse with Krause et al. (2012)<commit_after>class BalanceSheet(object):
    """
    Implements the balance sheet of a bank.
    """
    def __init__(self, sheet_size):
        """
        All fractions are floats between 0 and 1.
        Interbank loans and borrowing are dicts in real amounts, as in {counterparty: amount}
        """
        self.assets = sheet_size
        self.liabilities = self.assets
        # Assets
        self.interbank_loans = dict()
        self.consumer_loans_fraction = 0
        self.cash_fraction = 0
        # Liabilities
        self.deposits_fraction = 0
        self.interbank_borrowing = dict()
        self.equity_fraction = 0

    @property
    def consumer_loans(self):
        return self.assets * self.consumer_loans_fraction

    @property
    def cash(self):
        return self.assets * self.cash_fraction

    @property
    def deposits(self):
        return self.liabilities * self.deposits_fraction

    @property
    def equity(self):
        return self.liabilities * self.equity_fraction

{'fraction_non_alphanumeric': 0.09051490514905149, 'fraction_numerical': 0.007046070460704607, 'mean_word_length': 2.204861111111111, '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': '7262898', 'n_tokens_mistral': 566, 'n_tokens_neox': 517, 'n_words': 135}