<commit_before>import os.path
from StorageSystem import StorageSystem


_storage_system_azure_supported = False


try:
    from azure.storage import *
    _storage_system_azure_supported = True
except ImportError:
    _storage_system_azure_supported = False

from storage_system import StorageSystem


def is_available():
    return _storage_system_azure_supported


class AzureStorageSystem(StorageSystem):
   
    def __init__(self, account_name, account_key, container_prefix, debug_mode=False):
        StorageSystem.__init__(self, "Azure", debug_mode)
        self.account_name = account_name
        self.account_key = account_key
        if container_prefix is not None and len(container_prefix) > 0:
            self.set_container_prefix(container_prefix)

    def __enter__(self):
        if self.is_debug_mode():
            print "attempting to connect to Azure"

        self.blob_service = BlobService(account_name=self.account_name, account_key=self.account_key)
        self.set_authenticated(True)
        self.set_list_containers(self.list_account_containers())
        return self

    def __exit__(self, type, value, traceback):<commit_msg>Removed old import of StorageSystem<commit_after>import os.path
from StorageSystem import StorageSystem


_storage_system_azure_supported = False


try:
    from azure.storage import *
    _storage_system_azure_supported = True
except ImportError:
    _storage_system_azure_supported = False


def is_available():
    return _storage_system_azure_supported


class AzureStorageSystem(StorageSystem):
   
    def __init__(self, account_name, account_key, container_prefix, debug_mode=False):
        StorageSystem.__init__(self, "Azure", debug_mode)
        self.account_name = account_name
        self.account_key = account_key
        if container_prefix is not None and len(container_prefix) > 0:
            self.set_container_prefix(container_prefix)

    def __enter__(self):
        if self.is_debug_mode():
            print "attempting to connect to Azure"

        self.blob_service = BlobService(account_name=self.account_name, account_key=self.account_key)
        self.set_authenticated(True)
        self.set_list_containers(self.list_account_containers())
        return self

    def __exit__(self, type, value, traceback):
{'fraction_non_alphanumeric': 0.06614447345517842, 'fraction_numerical': 0.0008703220191470844, 'mean_word_length': 3.9547413793103448, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3411501', 'n_tokens_mistral': 660, 'n_tokens_neox': 639, 'n_words': 143}