<commit_before>from pyramid.view import view_config
from xml.etree import ElementTree
from pyramid.httpexceptions import HTTPFound, HTTPBadGateway, HTTPBadRequest

from ..models import (
    DBSession,
    User,
)

from user import (
    check_user_name
)

from pyramid.security import (
    remember,
    forget,
)

import urlparse
import oauth2 as oauth

# our oauth key and secret (we're the consumer in the oauth protocol)
# consumer key and secret created by <NAME>
CONSUMER_KEY = 'B<KEY>'
CONSUMER_SECRET = '<KEY>'

# OSM oauth URLs
BASE_URL = 'http://www.openstreetmap.org/oauth'
REQUEST_TOKEN_URL = '%s/request_token' % BASE_URL
ACCESS_TOKEN_URL = '%s/access_token' % BASE_URL
AUTHORIZE_URL = '%s/authorize' % BASE_URL
<commit_msg>Using secure connection for oauth login<commit_after>from pyramid.view import view_config
from xml.etree import ElementTree
from pyramid.httpexceptions import HTTPFound, HTTPBadGateway, HTTPBadRequest

from ..models import (
    DBSession,
    User,
)

from user import (
    check_user_name
)

from pyramid.security import (
    remember,
    forget,
)

import urlparse
import oauth2 as oauth

# our oauth key and secret (we're the consumer in the oauth protocol)
# consumer key and secret created by <NAME>
CONSUMER_KEY = 'B<KEY>'
CONSUMER_SECRET = '<KEY>'

# OSM oauth URLs
BASE_URL = 'https://www.openstreetmap.org/oauth'
REQUEST_TOKEN_URL = '%s/request_token' % BASE_URL
ACCESS_TOKEN_URL = '%s/access_token' % BASE_URL
AUTHORIZE_URL = '%s/authorize' % BASE_URL

{'fraction_non_alphanumeric': 0.08770764119601329, 'fraction_numerical': 0.00132890365448505, 'mean_word_length': 4.704545454545454, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '5287802', 'n_tokens_mistral': 525, 'n_tokens_neox': 508, 'n_words': 147}