<commit_before>from intelmq.lib.bot import Bot, sys
from intelmq.lib.message import Event
from intelmq.bots import utils

from azure.storage import BlobService

import parsedatetime
import time
import gzip
import StringIO


class DCUCollectorBot(Bot):
    # This IntelMQ collector is for getting a blob
    # from an azure account (Microsoft dcu).
    # It opens the account and
    # reads all containers, which aren't ignored.

    def process(self):
        account_name = getattr(self.parameters, "azure_account_name")
        account_key = getattr(self.parameters, "azure_account_key")

        ts_format = getattr(self.parameters, "timestamp_format", "%Y-%m-%d")
        dt_str = getattr(self.parameters, "date", None)

        # parsing the configured date string before usage
        if dt_str:
            cal = parsedatetime.Calendar()<commit_msg>Change comment to docstring in dcu-collector<commit_after>from intelmq.lib.bot import Bot, sys
from intelmq.lib.message import Event
from intelmq.bots import utils

from azure.storage import BlobService

import parsedatetime
import time
import gzip
import StringIO


class DCUCollectorBot(Bot):
    """ 
      This IntelMQ collector is for getting a blob
      from an azure account (Microsoft dcu).
      It opens the account and
      reads all containers, which aren't ignored.
    """

    def process(self):
        account_name = getattr(self.parameters, "azure_account_name")
        account_key = getattr(self.parameters, "azure_account_key")

        ts_format = getattr(self.parameters, "timestamp_format", "%Y-%m-%d")
        dt_str = getattr(self.parameters, "date", None)

        # parsing the configured date string before usage
        if dt_str:
            cal = parsedatetime.Calendar()
{'fraction_non_alphanumeric': 0.08002270147559591, 'fraction_numerical': 0.0, 'mean_word_length': 3.3855721393034828, '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': '5382548', 'n_tokens_mistral': 508, 'n_tokens_neox': 492, 'n_words': 162}