<commit_before># Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# 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.

"""SQLAlchemy storage backend."""

from cloudpulse.common import exception
from cloudpulse.common import utils
from cloudpulse.db import api
from cloudpulse.db.sqlalchemy import models
from cloudpulse.openstack.common._i18n import _
from cloudpulse.openstack.common import log
from oslo_config import cfg
from oslo_db import exception as db_exc
from oslo_db.sqlalchemy import session as db_session
from oslo_db.sqlalchemy import utils as db_utils
from oslo_utils import timeutils
import sqlalchemy.orm.exc

CONF = cfg.CONF


DB_OPTS = [
    cfg.IntOpt('max_db_entries',
               default=5,
               help='The max number of db entries to keep')
]
db_group = cfg.OptGroup(name='database')
CONF.register_opts(DB_OPTS, db_group)


LOG = log.getLogger(__name__)


_FACADE = None


def _create_facade_lazily():
    global _FACADE
    if _FACADE is None:<commit_msg>Removing duplicate entry of max_db_entries from cloudpulse<commit_after># Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# 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.

"""SQLAlchemy storage backend."""

from cloudpulse.common import exception
from cloudpulse.common import utils
from cloudpulse.db import api
from cloudpulse.db.sqlalchemy import models
from cloudpulse.openstack.common._i18n import _
from cloudpulse.openstack.common import log
from oslo_config import cfg
from oslo_db import exception as db_exc
from oslo_db.sqlalchemy import session as db_session
from oslo_db.sqlalchemy import utils as db_utils
from oslo_utils import timeutils
import sqlalchemy.orm.exc

CONF = cfg.CONF


LOG = log.getLogger(__name__)


_FACADE = None


def _create_facade_lazily():
    global _FACADE
    if _FACADE is None:
{'fraction_non_alphanumeric': 0.06283280085197018, 'fraction_numerical': 0.007454739084132056, 'mean_word_length': 4.5363457760314345, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4987782', 'n_tokens_mistral': 839, 'n_tokens_neox': 792, 'n_words': 326}