<commit_before># base.py - base classes for views of SQLAlchemy objects
#
# Copyright 2011 <NAME> <<EMAIL>>.
# Copyright 2012, 2013, 2014, 2015, 2016 <NAME>
#           <<EMAIL>> and contributors.
#
# This file is part of Flask-Restless.
#
# Flask-Restless is distributed under both the GNU Affero General Public
# License version 3 and under the 3-clause BSD license. For more
# information, see LICENSE.AGPL and LICENSE.BSD.
"""Base classes for fetching, creating, updating, and deleting
SQLAlchemy resources and relationships.

The main class in this module, :class:`APIBase`, is a
:class:`~flask.MethodView` subclass that is also an abstract base class
for JSON API requests on a SQLAlchemy backend.

"""
from __future__ import division

from collections import defaultdict
from functools import partial
from functools import wraps
from itertools import chain
import math
import re
# In Python 3...
try:
    from urllib.parse import parse_qs
    from urllib.parse import urlencode
    from urllib.parse import urlparse
    from urllib.parse import urlunparse
# In Python 2...
except ImportError:
    from urllib import urlencode
    from urlparse import parse_qs
    from urlparse import urlparse
    from urlparse import urlunparse

from flask import current_app
from flask import json
from flask import request
from flask.views import MethodView
from sqlalchemy.exc import SQLAlchemyError
from sqlalchemy.orm.exc import MultipleResultsFound
from sqlalchemy.orm.exc import NoResultFound
from sqlalchemy.orm.query import Query
from sqlalchemy.inspection import inspect as sa_inspect<commit_msg>Removes unused import.<commit_after># base.py - base classes for views of SQLAlchemy objects
#
# Copyright 2011 <NAME> <<EMAIL>>.
# Copyright 2012, 2013, 2014, 2015, 2016 <NAME>
#           <<EMAIL>> and contributors.
#
# This file is part of Flask-Restless.
#
# Flask-Restless is distributed under both the GNU Affero General Public
# License version 3 and under the 3-clause BSD license. For more
# information, see LICENSE.AGPL and LICENSE.BSD.
"""Base classes for fetching, creating, updating, and deleting
SQLAlchemy resources and relationships.

The main class in this module, :class:`APIBase`, is a
:class:`~flask.MethodView` subclass that is also an abstract base class
for JSON API requests on a SQLAlchemy backend.

"""
from __future__ import division

from collections import defaultdict
from functools import partial
from functools import wraps
from itertools import chain
import math
import re
# In Python 3...
try:
    from urllib.parse import parse_qs
    from urllib.parse import urlencode
    from urllib.parse import urlparse
    from urllib.parse import urlunparse
# In Python 2...
except ImportError:
    from urllib import urlencode
    from urlparse import parse_qs
    from urlparse import urlparse
    from urlparse import urlunparse

from flask import current_app
from flask import json
from flask import request
from flask.views import MethodView
from sqlalchemy.exc import SQLAlchemyError
from sqlalchemy.orm.exc import MultipleResultsFound
from sqlalchemy.orm.exc import NoResultFound
from sqlalchemy.orm.query import Query
{'fraction_non_alphanumeric': 0.056525881232137185, 'fraction_numerical': 0.01778342330898698, 'mean_word_length': 4.478260869565218, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '491150', 'n_tokens_mistral': 940, 'n_tokens_neox': 852, 'n_words': 387}