<commit_before>from __future__ import unicode_literals
from datetime import datetime

from django.db import models
from django.utils.encoding import python_2_unicode_compatible

from .clients import get_client
from .compat import AUTH_USER_MODEL
from .fields import EncryptedField


class ProviderManager(models.Manager):
    "Additional manager methods for Providers."

    def enabled(self):
        "Filter down providers which have key/secret pairs."
        return super(ProviderManager, self).filter(consumer_key__isnull=False, consumer_secret__isnull=False)


@python_2_unicode_compatible
class Provider(models.Model):
    "Configuration for OAuth provider."

    name = models.CharField(max_length=50, unique=True)
    request_token_url = models.URLField(blank=True)
    authorization_url = models.URLField()
    access_token_url = models.URLField()
    profile_url = models.URLField()<commit_msg>Changed Provider model to accept Microsoft Live urls<commit_after>from __future__ import unicode_literals
from datetime import datetime

from django.db import models
from django.utils.encoding import python_2_unicode_compatible

from .clients import get_client
from .compat import AUTH_USER_MODEL
from .fields import EncryptedField


class ProviderManager(models.Manager):
    "Additional manager methods for Providers."

    def enabled(self):
        "Filter down providers which have key/secret pairs."
        return super(ProviderManager, self).filter(consumer_key__isnull=False, consumer_secret__isnull=False)


@python_2_unicode_compatible
class Provider(models.Model):
    "Configuration for OAuth provider."

    name = models.CharField(max_length=50, unique=True)
    request_token_url = models.CharField(blank=True, max_length=255)
    authorization_url = models.CharField(max_length=255)
    access_token_url = models.CharField(max_length=255)
    profile_url = models.CharField(max_length=255)
{'fraction_non_alphanumeric': 0.0695970695970696, 'fraction_numerical': 0.010465724751439037, 'mean_word_length': 5.437710437710438, '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': '7177601', 'n_tokens_mistral': 552, 'n_tokens_neox': 518, 'n_words': 139}