<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2010-2011 OpenStack, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.


import functools
import httplib
import json
import logging
import os
import routes
import sys
import hashlib
from webob import Response
from webob import Request
from webob import descriptors
from webob.exc import (HTTPNotFound,
                       HTTPConflict,
                       HTTPBadRequest)

POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
                                   os.pardir,
                                   os.pardir))
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'keystone', '__init__.py')):
    sys.path.insert(0, POSSIBLE_TOPDIR)

from queryext import exthandler
import keystone.logic.types.fault as fault
from keystone.common import config

def is_xml_response(req):
    if not "Accept" in req.headers:
        return False
    return req.content_type == "application/xml"<commit_msg>Reverting change thats not needed.<commit_after># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2010-2011 OpenStack, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.


import functools
import httplib
import json
import logging
import os
import routes
import sys
import hashlib
from webob import Response
from webob import Request
from webob import descriptors
from webob.exc import (HTTPNotFound,
                       HTTPConflict,
                       HTTPBadRequest)

POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
                                   os.pardir,
                                   os.pardir))
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'keystone', '__init__.py')):
    sys.path.insert(0, POSSIBLE_TOPDIR)

from queryext import exthandler
import keystone.logic.types.fault as fault

def is_xml_response(req):
    if not "Accept" in req.headers:
        return False
    return req.content_type == "application/xml"
{'fraction_non_alphanumeric': 0.07640750670241286, 'fraction_numerical': 0.011394101876675604, 'mean_word_length': 3.222065063649222, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3051431', 'n_tokens_mistral': 876, 'n_tokens_neox': 824, 'n_words': 311}