<commit_before># Copyright 2015 NEC Corporation
# All Rights Reserved.
#
# 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 models for inspection data and shared database code."""

import contextlib

from oslo_concurrency import lockutils
from oslo_config import cfg
from oslo_db import options as db_opts
from oslo_db.sqlalchemy import enginefacade
from oslo_db.sqlalchemy import models
from oslo_db.sqlalchemy import types as db_types
from sqlalchemy import (Boolean, Column, DateTime, Enum, ForeignKey,
                        Integer, String, Text)
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import orm

from ironic_inspector import conf  # noqa
from ironic_inspector import introspection_state as istate


class ModelBase(models.ModelBase):
    __table_args__ = {'mysql_engine': "InnoDB",
                      'mysql_charset': "utf8"}


Base = declarative_base(cls=ModelBase)
CONF = cfg.CONF
_DEFAULT_SQL_CONNECTION = 'sqlite:///ironic_inspector.sqlite'
_CTX_MANAGER = None

db_opts.set_defaults(CONF, connection=_DEFAULT_SQL_CONNECTION)

_synchronized = lockutils.synchronized_with_prefix("ironic-inspector-")


class Node(Base):
    __tablename__ = 'nodes'
    uuid = Column(String(36), primary_key=True)
    version_id = Column(String(36), server_default='')
    state = Column(Enum(*istate.States.all()), nullable=False,
                   default=istate.States.finished,
                   server_default=istate.States.finished)
    started_at = Column(DateTime, nullable=True)<commit_msg>Remove unused import statement.<commit_after># Copyright 2015 NEC Corporation
# All Rights Reserved.
#
# 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 models for inspection data and shared database code."""

import contextlib

from oslo_concurrency import lockutils
from oslo_config import cfg
from oslo_db import options as db_opts
from oslo_db.sqlalchemy import enginefacade
from oslo_db.sqlalchemy import models
from oslo_db.sqlalchemy import types as db_types
from sqlalchemy import (Boolean, Column, DateTime, Enum, ForeignKey,
                        Integer, String, Text)
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import orm


from ironic_inspector import introspection_state as istate


class ModelBase(models.ModelBase):
    __table_args__ = {'mysql_engine': "InnoDB",
                      'mysql_charset': "utf8"}


Base = declarative_base(cls=ModelBase)
CONF = cfg.CONF
_DEFAULT_SQL_CONNECTION = 'sqlite:///ironic_inspector.sqlite'
_CTX_MANAGER = None

db_opts.set_defaults(CONF, connection=_DEFAULT_SQL_CONNECTION)

_synchronized = lockutils.synchronized_with_prefix("ironic-inspector-")


class Node(Base):
    __tablename__ = 'nodes'
    uuid = Column(String(36), primary_key=True)
    version_id = Column(String(36), server_default='')
    state = Column(Enum(*istate.States.all()), nullable=False,
                   default=istate.States.finished,
                   server_default=istate.States.finished)
    started_at = Column(DateTime, nullable=True)
{'fraction_non_alphanumeric': 0.077473476437207, 'fraction_numerical': 0.006415001233654083, 'mean_word_length': 4.383798140770252, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3705281', 'n_tokens_mistral': 1187, 'n_tokens_neox': 1134, 'n_words': 381}