<commit_before>import logging

import requests
import requests.exceptions
from analyticsclient.constants import data_format as DF

from analyticsclient.course import Course
from analyticsclient.course_summaries import CourseSummaries
from analyticsclient.exceptions import ClientError, InvalidRequestError, NotFoundError, TimeoutError
from analyticsclient.module import Module
from analyticsclient.programs import Programs
from analyticsclient.status import Status


log = logging.getLogger(__name__)


class Client(object):
    """
    Analytics API client.

    The instance has attributes `status` and `courses` that provide access to instances of
    :class: `~analyticsclient.status` and :class: `~analyticsclient.course`. This is the preferred (and only supported)
    way to get access to those classes and their methods.
    """

    # Date/time formats to be used when sending and parsing data from the API
    DATE_FORMAT = '%Y-%m-%d'
    DATETIME_FORMAT = DATE_FORMAT + 'T%H%M%S'

    METHOD_GET = 'GET'
    METHOD_POST = 'POST'

    def __init__(self, base_url, auth_token=None, timeout=0.25):
        """
        Initialize the client.

        Arguments:
            base_url (str): URL of the API server (e.g. http://analytics.edx.org/api/v0)
            auth_token (str): Authentication token
            timeout (number): Maximum number of seconds during which all requests musts complete
        """
        self.base_url = base_url.rstrip('/')
        self.auth_token = auth_token<commit_msg>Increase timeout to 10s as fails on lagunita at 5s.<commit_after>import logging

import requests
import requests.exceptions
from analyticsclient.constants import data_format as DF

from analyticsclient.course import Course
from analyticsclient.course_summaries import CourseSummaries
from analyticsclient.exceptions import ClientError, InvalidRequestError, NotFoundError, TimeoutError
from analyticsclient.module import Module
from analyticsclient.programs import Programs
from analyticsclient.status import Status


log = logging.getLogger(__name__)


class Client(object):
    """
    Analytics API client.

    The instance has attributes `status` and `courses` that provide access to instances of
    :class: `~analyticsclient.status` and :class: `~analyticsclient.course`. This is the preferred (and only supported)
    way to get access to those classes and their methods.
    """

    # Date/time formats to be used when sending and parsing data from the API
    DATE_FORMAT = '%Y-%m-%d'
    DATETIME_FORMAT = DATE_FORMAT + 'T%H%M%S'

    METHOD_GET = 'GET'
    METHOD_POST = 'POST'

    def __init__(self, base_url, auth_token=None, timeout=10):
        """
        Initialize the client.

        Arguments:
            base_url (str): URL of the API server (e.g. http://analytics.edx.org/api/v0)
            auth_token (str): Authentication token
            timeout (number): Maximum number of seconds during which all requests musts complete
        """
        self.base_url = base_url.rstrip('/')
        self.auth_token = auth_token
{'fraction_non_alphanumeric': 0.07717462393721386, 'fraction_numerical': 0.0032701111837802484, 'mean_word_length': 3.6069277108433737, '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': '5798678', 'n_tokens_mistral': 855, 'n_tokens_neox': 814, 'n_words': 290}