<commit_before>from __future__ import absolute_import, division, print_function, unicode_literals

from dateutil.parser import parse
import sys

from amaascore.assets.asset import Asset

# This extremely ugly hack is due to the whole Python 2 vs 3 debacle.
type_check = str if sys.version_info >= (3, 0, 0) else (str, unicode)


class ForeignExchangeBase(Asset):
    """ This class should never be instantiated """

    def __init__(self, asset_id, asset_status, description, major, country_codes, display_name,
                 asset_manager_id=0, *args, **kwargs):
        self.asset_class = 'ForeignExchange'
        self.country_codes = country_codes
        self.major = major
        super(ForeignExchangeBase, self).__init__(asset_manager_id=asset_manager_id, asset_id=asset_id, fungible=True,
                                                  display_name=display_name or asset_id, roll_price=False,
                                                  asset_status=asset_status, description=description,
                                                  *args, **kwargs)

    def base_currency(self):
        return self.asset_id[0:3]

    def counter_currency(self):
        return self.asset_id[3:6]

    def get_country_codes(self):
        return self.country_codes

    def get_currencies(self):
        return [self.base_currency(), self.counter_currency()]
<commit_msg>added default value for display_name so scripting file will not throw exception<commit_after>from __future__ import absolute_import, division, print_function, unicode_literals

from dateutil.parser import parse
import sys

from amaascore.assets.asset import Asset

# This extremely ugly hack is due to the whole Python 2 vs 3 debacle.
type_check = str if sys.version_info >= (3, 0, 0) else (str, unicode)


class ForeignExchangeBase(Asset):
    """ This class should never be instantiated """

    def __init__(self, asset_id, asset_status, description, major, country_codes, display_name=None,
                 asset_manager_id=0, *args, **kwargs):
        self.asset_class = 'ForeignExchange'
        self.country_codes = country_codes
        self.major = major
        super(ForeignExchangeBase, self).__init__(asset_manager_id=asset_manager_id, asset_id=asset_id, fungible=True,
                                                  display_name=display_name or asset_id, roll_price=False,
                                                  asset_status=asset_status, description=description,
                                                  *args, **kwargs)

    def base_currency(self):
        return self.asset_id[0:3]

    def counter_currency(self):
        return self.asset_id[3:6]

    def get_country_codes(self):
        return self.country_codes

    def get_currencies(self):
        return [self.base_currency(), self.counter_currency()]

{'fraction_non_alphanumeric': 0.07724867724867725, 'fraction_numerical': 0.007054673721340388, 'mean_word_length': 2.654639175257732, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2746879', 'n_tokens_mistral': 771, 'n_tokens_neox': 736, 'n_words': 201}