<commit_before>from sqlalchemy import *
from .base import Base

class Game(Base):
    __tablename__ = 'games'

    date = Column(Date, primary_key=True)
    visitor = Column(String(3), primary_key=True)
    home = Column(String(3), primary_key=True)
    game_number = Column(String(1), primary_key=True)
    visitor_score = Column(Integer)
    home_score = Column(Integer)

    def __repr__(self):
       return "<Game(home='%s', away='%s')>" % (
                self.home, self.visitor)<commit_msg>finishing game model<commit_after>from sqlalchemy import *
from .base import Base

import datetime

class Game(Base):
    __tablename__ = 'games'

    date                = Column(Date, primary_key=True, nullable=False, default=datetime.date(0, 1, 1))

    game_number         = Column(String(1), primary_key=True, nullable=False)
    day                 = Column(String(3), nullable=False)
    
    visitor             = Column(String(3), primary_key=True, nullable=False)
    visitor_lg          = Column(String(2), nullable=False)
    visitor_game_number = Column(Integer, nullable=False, default=0)
    home                = Column(String(3), primary_key=True, nullable=False)
    home_lg             = Column(String(2), nullable=False)
    home_game_number    = Column(Integer, nullable=False, default=0)

    visitor_score     = Column(Integer, nullable=False, default=0)
    home_score        = Column(Integer, nullable=False, default=0)
    
    outs              = Column(Integer, nullable=False, default=0)
    
    daynight          = Column(String(1), nullable=False)
    
    completion        = Column(String(255), nullable=False)
    forfeit           = Column(String(1), nullable=False)
    protest           = Column(String(2), nullable=False)
    
    park              = Column(String(5), nullable=False)
    attendance        = Column(Integer, nullable=False, default=0)
    
    game_minutes      = Column(Integer, nullable=False, default=0)
    
    visitor_linescore = Column(String(255), nullable=False)
    home_linescore    = Column(String(255), nullable=False)
    
    visitor_ab            = Column(Integer, nullable=False, default=0)
    visitor_h             = Column(Integer, nullable=False, default=0)
    visitor_2b            = Column(Integer, nullable=False, default=0)
    visitor_3b            = Column(Integer, nullable=False, default=0)
    visitor_hr            = Column(Integer, nullable=False, default=0)
    visitor_rbi           = Column(Integer, nullable=False, default=0)
    visitor_sh            = Column(Integer, nullable=False, default=0)
    visitor_sf            = Column(Integer, nullable=False, default=0)
    visitor_hbp           = Column(Integer, nullable=False, default=0)
    visitor_bb            = Column(Integer, nullable=False, default=0)
    visitor_ibb           = Column(Integer, nullable=False, default=0)
    visitor_so            = Column(Integer, nullable=False, default=0)
    visitor_sb            = Column(Integer, nullable=False, default=0)
    visitor_cs            = Column(Integer, nullable=False, default=0)
    visitor_gidp          = Column(Integer, nullable=False, default=0)
    visitor_ci            = Column(Integer, nullable=False, default=0)
    visitor_lob           = Column(Integer, nullable=False, default=0)
    visitor_pitchers_used = Column(Integer, nullable=False, default=0)
    visitor_individual_er = Column(Integer, nullable=False, default=0)
    visitor_team_er       = Column(Integer, nullable=False, default=0)
    visitor_wp            = Column(Integer, nullable=False, default=0)
    visitor_balks         = Column(Integer, nullable=False, default=0)
    visitor_putouts       = Column(Integer, nullable=False, default=0)
    visitor_assists       = Column(Integer, nullable=False, default=0)
    visitor_errors        = Column(Integer, nullable=False, default=0)
    visitor_passed_balls  = Column(Integer, nullable=False, default=0)
    visitor_double_plays  = Column(Integer, nullable=False, default=0)
    visitor_triple_plays  = Column(Integer, nullable=False, default=0)
    
    home_ab            = Column(Integer, nullable=False, default=0)
    home_h             = Column(Integer, nullable=False, default=0)
    home_2b            = Column(Integer, nullable=False, default=0)
    home_3b            = Column(Integer, nullable=False, default=0)
    home_hr            = Column(Integer, nullable=False, default=0)
    home_rbi           = Column(Integer, nullable=False, default=0)
    home_sh            = Column(Integer, nullable=False, default=0)
    home_sf            = Column(Integer, nullable=False, default=0)
    home_hbp           = Column(Integer, nullable=False, default=0)
    home_bb            = Column(Integer, nullable=False, default=0)
    home_ibb           = Column(Integer, nullable=False, default=0)
    home_so            = Column(Integer, nullable=False, default=0)
    home_sb            = Column(Integer, nullable=False, default=0)
    home_cs            = Column(Integer, nullable=False, default=0)
    home_gidp          = Column(Integer, nullable=False, default=0)
    home_ci            = Column(Integer, nullable=False, default=0)
    home_lob           = Column(Integer, nullable=False, default=0)
    home_pitchers_used = Column(Integer, nullable=False, default=0)
    home_individual_er = Column(Integer, nullable=False, default=0)
    home_team_er       = Column(Integer, nullable=False, default=0)
    home_wp            = Column(Integer, nullable=False, default=0)
    home_balks         = Column(Integer, nullable=False, default=0)
    home_putouts       = Column(Integer, nullable=False, default=0)
    home_assists       = Column(Integer, nullable=False, default=0)
    home_errors        = Column(Integer, nullable=False, default=0)
    home_passed_balls  = Column(Integer, nullable=False, default=0)
    home_double_plays  = Column(Integer, nullable=False, default=0)
    home_triple_plays  = Column(Integer, nullable=False, default=0)

    hp_ump_id    = Column(String(8), nullable=False)
    hp_ump_name  = Column(String(255), nullable=False)
    1b_ump_id    = Column(String(8), nullable=False)
    1b_ump_name  = Column(String(255), nullable=False)
    2b_ump_id    = Column(String(8), nullable=False)
    2b_ump_name  = Column(String(255), nullable=False)
    3b_ump_id    = Column(String(8), nullable=False)
    3b_ump_name  = Column(String(255), nullable=False)
    lf_ump_id    = Column(String(8), nullable=False)
    lf_ump_name  = Column(String(255), nullable=False)
    rf_ump_id    = Column(String(8), nullable=False)
    rf_ump_name  = Column(String(255), nullable=False)
    
    visitor_manager_id            = Column(String(8), nullable=False)
    visitor_manager_name          = Column(String(255), nullable=False)
    home_manager_id               = Column(String(8), nullable=False)
    home_manager_name             = Column(String(255), nullable=False)
    
    visitor_starting_pitcher_id   = Column(String(8), nullable=False)
    visitor_starting_pitcher_name = Column(String(255), nullable=False)
    home_starting_pitcher_id      = Column(String(8), nullable=False)
    home_starting_pitcher_name    = Column(String(255), nullable=False)

    winning_pitcher_id            = Column(String(8), nullable=False)
    winning_pitcher_name          = Column(String(255), nullable=False)
    losing_pitcher_id             = Column(String(8), nullable=False)
    losing_pitcher_name           = Column(String(255), nullable=False)
    saving_pitcher_id             = Column(String(8), nullable=False)
    saving_pitcher_name           = Column(String(255), nullable=False)
    
    gwrbi_batter_id               = Column(String(8), nullable=False)
    gwrbi_batter_name             = Column(String(255), nullable=False)
    
    visitor_batter_1_id    = Column(String(8), nullable=False)
    visitor_batter_1_name  = Column(String(255), nullable=False)
    visitor_batter_1_pos   = Column(Integer, nullable=False, default=0)
    visitor_batter_2_id    = Column(String(8), nullable=False)
    visitor_batter_2_name  = Column(String(255), nullable=False)
    visitor_batter_2_pos   = Column(Integer, nullable=False, default=0)
    visitor_batter_3_id    = Column(String(8), nullable=False)
    visitor_batter_3_name  = Column(String(255), nullable=False)
    visitor_batter_3_pos   = Column(Integer, nullable=False, default=0)
    visitor_batter_4_id    = Column(String(8), nullable=False)
    visitor_batter_4_name  = Column(String(255), nullable=False)
    visitor_batter_4_pos   = Column(Integer, nullable=False, default=0)
    visitor_batter_5_id    = Column(String(8), nullable=False)
    visitor_batter_5_name  = Column(String(255), nullable=False)
    visitor_batter_5_pos   = Column(Integer, nullable=False, default=0)
    visitor_batter_6_id    = Column(String(8), nullable=False)
    visitor_batter_6_name  = Column(String(255), nullable=False)
    visitor_batter_6_pos   = Column(Integer, nullable=False, default=0)
    visitor_batter_7_id    = Column(String(8), nullable=False)
    visitor_batter_7_name  = Column(String(255), nullable=False)
    visitor_batter_7_pos   = Column(Integer, nullable=False, default=0)
    visitor_batter_8_id    = Column(String(8), nullable=False)
    visitor_batter_8_name  = Column(String(255), nullable=False)
    visitor_batter_8_pos   = Column(Integer, nullable=False, default=0)
    visitor_batter_9_id    = Column(String(8), nullable=False)
    visitor_batter_9_name  = Column(String(255), nullable=False)
    visitor_batter_9_pos   = Column(Integer, nullable=False, default=0)
    
    home_batter_1_id    = Column(String(8), nullable=False)
    home_batter_1_name  = Column(String(255), nullable=False)
    home_batter_1_pos   = Column(Integer, nullable=False, default=0)
    home_batter_2_id    = Column(String(8), nullable=False)
    home_batter_2_name  = Column(String(255), nullable=False)
    home_batter_2_pos   = Column(Integer, nullable=False, default=0)
    home_batter_3_id    = Column(String(8), nullable=False)
    home_batter_3_name  = Column(String(255), nullable=False)
    home_batter_3_pos   = Column(Integer, nullable=False, default=0)
    home_batter_4_id    = Column(String(8), nullable=False)
    home_batter_4_name  = Column(String(255), nullable=False)
    home_batter_4_pos   = Column(Integer, nullable=False, default=0)
    home_batter_5_id    = Column(String(8), nullable=False)
    home_batter_5_name  = Column(String(255), nullable=False)
    home_batter_5_pos   = Column(Integer, nullable=False, default=0)
    home_batter_6_id    = Column(String(8), nullable=False)
    home_batter_6_name  = Column(String(255), nullable=False)
    home_batter_6_pos   = Column(Integer, nullable=False, default=0)
    home_batter_7_id    = Column(String(8), nullable=False)
    home_batter_7_name  = Column(String(255), nullable=False)
    home_batter_7_pos   = Column(Integer, nullable=False, default=0)
    home_batter_8_id    = Column(String(8), nullable=False)
    home_batter_8_name  = Column(String(255), nullable=False)
    home_batter_8_pos   = Column(Integer, nullable=False, default=0)
    home_batter_9_id    = Column(String(8), nullable=False)
    home_batter_9_name  = Column(String(255), nullable=False)
    home_batter_9_pos   = Column(Integer, nullable=False, default=0)
    
    additional_info     = Column(String(255), nullable=False)
    acquisition         = Column(String(1), nullable=False)

    def __repr__(self):
       return "<Game(home='%s', away='%s')>" % (
                self.home, self.visitor)
       
{'fraction_non_alphanumeric': 0.10736514522821576, 'fraction_numerical': 0.026106500691562933, 'mean_word_length': 3.522673964034402, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7560234', 'n_tokens_mistral': 3883, 'n_tokens_neox': 3823, 'n_words': 626}