<commit_before>from __future__ import print_function
from __future__ import absolute_import
from .base import Provider as BaseProvider
import requests
import json

def ProviderParser(subparser):
    subparser.add_argument("--auth-token", help="specify api token used to authenticate")

class Provider(BaseProvider):

    def __init__(self, options, provider_options={}):
        super(Provider, self).__init__(options)
        self.domain_id = None
        self.account_id = None
        self.api_endpoint = provider_options.get('api_endpoint') or 'https://api.sandbox.dnsimple.com/v2'

    def authenticate(self):

        payload = self._get('/accounts')

        if not payload[0]['id']:
            raise Exception('No account id found')

        for account in payload:
            dompayload = self._get('/{0}/domains'.format(account['id']), query_params={'name_like': self.options.get('domain')})
            if len(dompayload) > 0 and dompayload[0]['id']:
                self.account_id = account['id']<commit_msg>Change the default API endpoint to production<commit_after>from __future__ import print_function
from __future__ import absolute_import
from .base import Provider as BaseProvider
import requests
import json

def ProviderParser(subparser):
    subparser.add_argument("--auth-token", help="specify api token used to authenticate")

class Provider(BaseProvider):

    def __init__(self, options, provider_options={}):
        super(Provider, self).__init__(options)
        self.domain_id = None
        self.account_id = None
        self.api_endpoint = provider_options.get('api_endpoint') or 'https://api.dnsimple.com/v2'

    def authenticate(self):

        payload = self._get('/accounts')

        if not payload[0]['id']:
            raise Exception('No account id found')

        for account in payload:
            dompayload = self._get('/{0}/domains'.format(account['id']), query_params={'name_like': self.options.get('domain')})
            if len(dompayload) > 0 and dompayload[0]['id']:
                self.account_id = account['id']
{'fraction_non_alphanumeric': 0.11932367149758454, 'fraction_numerical': 0.004830917874396135, 'mean_word_length': 3.482683982683983, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '4602730', 'n_tokens_mistral': 595, 'n_tokens_neox': 567, 'n_words': 145}