<commit_before>#coding: utf-8

import datetime
import json
import sys

from sqlalchemy import Column, Integer, String, ForeignKey, Float, create_engine, Time
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, relationship
from sqlalchemy.orm.exc import NoResultFound

Base = declarative_base()
engine = create_engine('sqlite:///:memory:', echo=False)
Session = sessionmaker(bind=engine)


class Train(Base):
    __tablename__ = 'trains'
    id = Column(Integer, primary_key=True)
    
    name = Column(String)
    departure = Column(Time)
    start_point = Column(String)
    end_point = Column(String)

    tickets = relationship('Ticket', backref='train')

    def __init__(self, name, departure, start, end):
         self.name = name
         self.departure = departure
         self.start_point = start
         self.end_point = end

    def __repr__(self):
        return '<%s(%r, %r)>' % (self.__class__.__name__, self.name, self.departure)


class Ticket(Base):
    __tablename__ = 'tickets'
    electronic_id = Column(Integer, primary_key=True)

    train_id = Column(Integer, ForeignKey('trains.id'))
    cost = Column(Float)

    def __init__(self, train, electronic_id, cost):
        self.electronic_id = electronic_id
        self.cost = cost
        train.tickets.append(self)
<commit_msg>Убран забытый код сущностей из основного файла.<commit_after>#coding: utf-8

import datetime
import json
import sys

from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.orm.exc import NoResultFound

from entities import Train, Ticket, Base

engine = create_engine('sqlite:///:memory:', echo=False)
Session = sessionmaker(bind=engine)
{'fraction_non_alphanumeric': 0.10028985507246377, 'fraction_numerical': 0.0011594202898550724, 'mean_word_length': 4.152238805970149, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '29651', 'n_tokens_mistral': 542, 'n_tokens_neox': 532, 'n_words': 137}