<commit_before>import datetime
import time
from xml.etree import ElementTree

data_converters = {
   'integer': int,
}

class DataSet(list):
    """docstring for DataSet"""

    def __init__(self, raw_xml):
        list.__init__(self)
        self.raw_xml = raw_xml
        xml_tree = ElementTree.fromstring(self.raw_xml)
        self.id = xml_tree.find('{http://www.w3.org/2005/Atom}id').text
        self.title = xml_tree.find('{http://www.w3.org/2005/Atom}title').text
        self.totalResults = int(xml_tree.find('{http://a9.com/-/spec/opensearchrss/1.0/}totalResults').text)
        self.startIndex = int(xml_tree.find('{http://a9.com/-/spec/opensearchrss/1.0/}startIndex').text)
        self.itemsPerPage = int(xml_tree.find('{http://a9.com/-/spec/opensearchrss/1.0/}itemsPerPage').text)

        endDate = xml_tree.find('{http://schemas.google.com/analytics/2009}endDate').text
        self.endDate = datetime.date.fromtimestamp(time.mktime(time.strptime(endDate, '%Y-%m-%d')))
        startDate = xml_tree.find('{http://schemas.google.com/analytics/2009}startDate').text
        self.startDate = datetime.date.fromtimestamp(time.mktime(time.strptime(startDate, '%Y-%m-%d')))

        aggregates = xml_tree.find('{http://schemas.google.com/analytics/2009}aggregates')
        aggregate_metrics = aggregates.findall('{http://schemas.google.com/analytics/2009}metric')
        self.aggregates = []
        for m in aggregate_metrics:
            metric = Metric(**m.attrib)
            setattr(self, metric.name, metric)
            self.aggregates.append(metric)

        dataSource = xml_tree.find('{http://schemas.google.com/analytics/2009}dataSource')
        self.tableId = dataSource.find('{http://schemas.google.com/analytics/2009}tableId').text
        self.tableName = dataSource.find('{http://schemas.google.com/analytics/2009}tableName').text<commit_msg>Updated URLs used in XML<commit_after>import datetime
import time
from xml.etree import ElementTree

data_converters = {
   'integer': int,
}

class DataSet(list):
    """docstring for DataSet"""

    def __init__(self, raw_xml):
        list.__init__(self)
        self.raw_xml = raw_xml
        xml_tree = ElementTree.fromstring(self.raw_xml)
        self.id = xml_tree.find('{http://www.w3.org/2005/Atom}id').text
        self.title = xml_tree.find('{http://www.w3.org/2005/Atom}title').text
        self.totalResults = int(xml_tree.find('{http://a9.com/-/spec/opensearch/1.1/}totalResults').text)
        self.startIndex = int(xml_tree.find('{http://a9.com/-/spec/opensearch/1.1/}startIndex').text)
        self.itemsPerPage = int(xml_tree.find('{http://a9.com/-/spec/opensearch/1.1/}itemsPerPage').text)

        endDate = xml_tree.find('{http://schemas.google.com/analytics/2009}endDate').text
        self.endDate = datetime.date.fromtimestamp(time.mktime(time.strptime(endDate, '%Y-%m-%d')))
        startDate = xml_tree.find('{http://schemas.google.com/analytics/2009}startDate').text
        self.startDate = datetime.date.fromtimestamp(time.mktime(time.strptime(startDate, '%Y-%m-%d')))

        aggregates = xml_tree.find('{http://schemas.google.com/analytics/2009}aggregates')
        aggregate_metrics = aggregates.findall('{http://schemas.google.com/analytics/2009}metric')
        self.aggregates = []
        for m in aggregate_metrics:
            metric = Metric(**m.attrib)
            setattr(self, metric.name, metric)
            self.aggregates.append(metric)

        dataSource = xml_tree.find('{http://schemas.google.com/analytics/2009}dataSource')
        self.tableId = dataSource.find('{http://schemas.google.com/analytics/2009}tableId').text
        self.tableName = dataSource.find('{http://schemas.google.com/analytics/2009}tableName').text
{'fraction_non_alphanumeric': 0.16452991452991453, 'fraction_numerical': 0.025106837606837608, 'mean_word_length': 3.359720605355064, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 30}, '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': '4710527', 'n_tokens_mistral': 1329, 'n_tokens_neox': 1231, 'n_words': 133}