import sys
sys.dont_write_bytecode = True

from sqlalchemy import create_engine
import sqlalchemy
from sqlalchemy import Column, ForeignKey, Integer, String, Boolean, Float, LargeBinary
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship,sessionmaker
from sqlalchemy import create_engine

from config import DB_NAME, UNAME, PASSWORD

BASE = declarative_base()

class Post(BASE):
  __tablename__ = 'posts'
  author = Column(String)
  created_utc = Column(Integer)
  subreddit = Column(String)
  id = Column(String,primary_key=True)
  num_comments = Column(Integer)
  score = Column(Integer)
  ups = Column(Integer)
  downs = Column(Integer)
  gilded = Column(Integer)
  is_self = Column(Boolean)
  title = Column(String)
  domain = Column(String)
  url = Column(String)

  title_polarity = Column(Float) #calc
  title_subjectivity = Column(Float) #calc
  title_othref = Column(Float)
  title_time = Column(Float)
  title_inhib = Column(Float)
  title_space = Column(Float)
  title_posemo = Column(Float)
  title_self = Column(Float)
  title_social = Column(Float)
  title_humans = Column(Float)
  title_sports = Column(Float)
  title_other = Column(Float)
  title_music = Column(Float)
  title_swear = Column(Float)
  title_discrep = Column(Float)
  title_nonfl = Column(Float)
  title_you = Column(Float)
  title_cause = Column(Float)
  title_sexual = Column(Float)
  title_achieve = Column(Float)
  title_relig = Column(Float)
  title_cogmech = Column(Float)
  title_we = Column(Float)
  title_senses = Column(Float)
  title_eating = Column(Float)
  title_optim = Column(Float)
  title_incl = Column(Float)
  title_leisure = Column(Float)
  title_job = Column(Float)
  title_hear = Column(Float)
  title_preps = Column(Float)
  title_affect = Column(Float)
  title_excl = Column(Float)
  title_home = Column(Float)
  title_friends = Column(Float)
  title_present = Column(Float)
  title_body = Column(Float)
  title_school = Column(Float)
  title_comm = Column(Float)
  title_physcal = Column(Float)
  title_i = Column(Float)
  title_groom = Column(Float)
  title_tentat = Column(Float)
  title_similes = Column(Float)
  title_up = Column(Float)
  title_motion = Column(Float)
  title_negate = Column(Float)
  title_future = Column(Float)
  title_death = Column(Float)
  title_article = Column(Float)
  title_fillers = Column(Float)
  title_family = Column(Float)
  title_pronoun = Column(Float)
  title_metaph = Column(Float)
  title_feel = Column(Float)
  title_certain = Column(Float)
  title_insight = Column(Float)
  title_assent = Column(Float)
  title_number = Column(Float)
  title_sad = Column(Float)
  title_past = Column(Float)
  title_down = Column(Float)
  title_see = Column(Float)
  title_tv = Column(Float)
  title_sleep = Column(Float)
  title_money = Column(Float)
  title_anger = Column(Float)
  title_posfeel = Column(Float)
  title_anx = Column(Float)
  title_negemo = Column(Float)
  title_occup = Column(Float)

  selftext = Column(String) #clean
  selftext_polarity =  Column(Float) #calc
  selftext_subjectivity = Column(Float) #calc
  selftext_othref = Column(Float)
  selftext_time = Column(Float)
  selftext_inhib = Column(Float)
  selftext_space = Column(Float)
  selftext_posemo = Column(Float)
  selftext_self = Column(Float)
  selftext_social = Column(Float)
  selftext_humans = Column(Float)
  selftext_sports = Column(Float)
  selftext_other = Column(Float)
  selftext_music = Column(Float)
  selftext_swear = Column(Float)
  selftext_discrep = Column(Float)
  selftext_nonfl = Column(Float)
  selftext_you = Column(Float)
  selftext_cause = Column(Float)
  selftext_sexual = Column(Float)
  selftext_achieve = Column(Float)
  selftext_relig = Column(Float)
  selftext_cogmech = Column(Float)
  selftext_we = Column(Float)
  selftext_senses = Column(Float)
  selftext_eating = Column(Float)
  selftext_optim = Column(Float)
  selftext_incl = Column(Float)
  selftext_leisure = Column(Float)
  selftext_job = Column(Float)
  selftext_hear = Column(Float)
  selftext_preps = Column(Float)
  selftext_affect = Column(Float)
  selftext_excl = Column(Float)
  selftext_home = Column(Float)
  selftext_friends = Column(Float)
  selftext_present = Column(Float)
  selftext_body = Column(Float)
  selftext_school = Column(Float)
  selftext_comm = Column(Float)
  selftext_physcal = Column(Float)
  selftext_i = Column(Float)
  selftext_groom = Column(Float)
  selftext_tentat = Column(Float)
  selftext_similes = Column(Float)
  selftext_up = Column(Float)
  selftext_motion = Column(Float)
  selftext_negate = Column(Float)
  selftext_future = Column(Float)
  selftext_death = Column(Float)
  selftext_article = Column(Float)
  selftext_fillers = Column(Float)
  selftext_family = Column(Float)
  selftext_pronoun = Column(Float)
  selftext_metaph = Column(Float)
  selftext_feel = Column(Float)
  selftext_certain = Column(Float)
  selftext_insight = Column(Float)
  selftext_assent = Column(Float)
  selftext_number = Column(Float)
  selftext_sad = Column(Float)
  selftext_past = Column(Float)
  selftext_down = Column(Float)
  selftext_see = Column(Float)
  selftext_tv = Column(Float)
  selftext_sleep = Column(Float)
  selftext_money = Column(Float)
  selftext_anger = Column(Float)
  selftext_posfeel = Column(Float)
  selftext_anx = Column(Float)
  selftext_negemo = Column(Float)
  selftext_occup = Column(Float)

class Comment(BASE):
  __tablename__ = 'comments'
  author = Column(String)
  created_utc = Column(Integer)
  subreddit = Column(String)
  parent_id = Column(String)
  link_id = Column(String)
  id = Column(String , primary_key = True)
  score = Column(Integer)
  controversiality = Column(Integer)
  downs = Column(Integer)
  ups = Column(Integer)
  gilded = Column(Integer)
  body = Column(String)
  body_polarity = Column(Float)
  body_subjectivity = Column(Float)
  body_othref = Column(Float)
  body_time = Column(Float)
  body_inhib = Column(Float)
  body_space = Column(Float)
  body_posemo = Column(Float)
  body_self = Column(Float)
  body_social = Column(Float)
  body_humans = Column(Float)
  body_sports = Column(Float)
  body_other = Column(Float)
  body_music = Column(Float)
  body_swear = Column(Float)
  body_discrep = Column(Float)
  body_nonfl = Column(Float)
  body_you = Column(Float)
  body_cause = Column(Float)
  body_sexual = Column(Float)
  body_achieve = Column(Float)
  body_relig = Column(Float)
  body_cogmech = Column(Float)
  body_we = Column(Float)
  body_senses = Column(Float)
  body_eating = Column(Float)
  body_optim = Column(Float)
  body_incl = Column(Float)
  body_leisure = Column(Float)
  body_job = Column(Float)
  body_hear = Column(Float)
  body_preps = Column(Float)
  body_affect = Column(Float)
  body_excl = Column(Float)
  body_home = Column(Float)
  body_friends = Column(Float)
  body_present = Column(Float)
  body_body = Column(Float)
  body_school = Column(Float)
  body_comm = Column(Float)
  body_physcal = Column(Float)
  body_i = Column(Float)
  body_groom = Column(Float)
  body_tentat = Column(Float)
  body_similes = Column(Float)
  body_up = Column(Float)
  body_motion = Column(Float)
  body_negate = Column(Float)
  body_future = Column(Float)
  body_death = Column(Float)
  body_article = Column(Float)
  body_fillers = Column(Float)
  body_family = Column(Float)
  body_pronoun = Column(Float)
  body_metaph = Column(Float)
  body_feel = Column(Float)
  body_certain = Column(Float)
  body_insight = Column(Float)
  body_assent = Column(Float)
  body_number = Column(Float)
  body_sad = Column(Float)
  body_past = Column(Float)
  body_down = Column(Float)
  body_see = Column(Float)
  body_tv = Column(Float)
  body_sleep = Column(Float)
  body_money = Column(Float)
  body_anger = Column(Float)
  body_posfeel = Column(Float)
  body_anx = Column(Float)
  body_negemo = Column(Float)
  body_occup = Column(Float)

class Author(BASE):
  __tablename__ = 'authors'
  author = Column(String , primary_key = True)
  subreddits = Column(String)
  comments = Column(String)
  posts = Column(String)
  total_comments = Column(Integer)
  total_polarity = Column(Integer)
  total_subjectivity = Column(Float)
  avg_polarity = Column(Float)
  avg_subjectivity = Column(Float)

class CommentTree(BASE):
  __tablename__ = 'comment_trees'
  id = Column(String, primary_key = True)
  children = Column(String)

class PredictiveModels(BASE):
  __tablename__ = 'models'
  subreddit_name = Column(String,primary_key = True)
  negemo_response = Column(LargeBinary)
  posemo_response = Column(LargeBinary)
  anx_response = Column(LargeBinary)
  anger_response = Column(LargeBinary)
  sad_response = Column(LargeBinary)
  swear_response = Column(LargeBinary)
  assent_response = Column(LargeBinary)
  total_responses = Column(LargeBinary)

  negemo_bootstrap = Column(LargeBinary)
  posemo_bootstrap = Column(LargeBinary)
  anx_bootstrap = Column(LargeBinary)
  anger_bootstrap = Column(LargeBinary)
  sad_bootstrap = Column(LargeBinary)
  swear_bootstrap = Column(LargeBinary)
  assent_bootstrap = Column(LargeBinary)
  total_bootstraps = Column(LargeBinary)



def create_modU_db():
  #Connect
  engine = create_engine('postgresql://%s:%s@localhost/%s'%(UNAME,PASSWORD,DB_NAME))
  BASE.metadata.create_all(engine)

if __name__ == '__main__':
  create_modU_db()
5a0961eca636443268a10d64e0128f66a47e1229
<mask token>


class Comment(BASE):
    __tablename__ = 'comments'
    author = Column(String)
    created_utc = Column(Integer)
    subreddit = Column(String)
    parent_id = Column(String)
    link_id = Column(String)
    id = Column(String, primary_key=True)
    score = Column(Integer)
    controversiality = Column(Integer)
    downs = Column(Integer)
    ups = Column(Integer)
    gilded = Column(Integer)
    body = Column(String)
    body_polarity = Column(Float)
    body_subjectivity = Column(Float)
    body_othref = Column(Float)
    body_time = Column(Float)
    body_inhib = Column(Float)
    body_space = Column(Float)
    body_posemo = Column(Float)
    body_self = Column(Float)
    body_social = Column(Float)
    body_humans = Column(Float)
    body_sports = Column(Float)
    body_other = Column(Float)
    body_music = Column(Float)
    body_swear = Column(Float)
    body_discrep = Column(Float)
    body_nonfl = Column(Float)
    body_you = Column(Float)
    body_cause = Column(Float)
    body_sexual = Column(Float)
    body_achieve = Column(Float)
    body_relig = Column(Float)
    body_cogmech = Column(Float)
    body_we = Column(Float)
    body_senses = Column(Float)
    body_eating = Column(Float)
    body_optim = Column(Float)
    body_incl = Column(Float)
    body_leisure = Column(Float)
    body_job = Column(Float)
    body_hear = Column(Float)
    body_preps = Column(Float)
    body_affect = Column(Float)
    body_excl = Column(Float)
    body_home = Column(Float)
    body_friends = Column(Float)
    body_present = Column(Float)
    body_body = Column(Float)
    body_school = Column(Float)
    body_comm = Column(Float)
    body_physcal = Column(Float)
    body_i = Column(Float)
    body_groom = Column(Float)
    body_tentat = Column(Float)
    body_similes = Column(Float)
    body_up = Column(Float)
    body_motion = Column(Float)
    body_negate = Column(Float)
    body_future = Column(Float)
    body_death = Column(Float)
    body_article = Column(Float)
    body_fillers = Column(Float)
    body_family = Column(Float)
    body_pronoun = Column(Float)
    body_metaph = Column(Float)
    body_feel = Column(Float)
    body_certain = Column(Float)
    body_insight = Column(Float)
    body_assent = Column(Float)
    body_number = Column(Float)
    body_sad = Column(Float)
    body_past = Column(Float)
    body_down = Column(Float)
    body_see = Column(Float)
    body_tv = Column(Float)
    body_sleep = Column(Float)
    body_money = Column(Float)
    body_anger = Column(Float)
    body_posfeel = Column(Float)
    body_anx = Column(Float)
    body_negemo = Column(Float)
    body_occup = Column(Float)


class Author(BASE):
    __tablename__ = 'authors'
    author = Column(String, primary_key=True)
    subreddits = Column(String)
    comments = Column(String)
    posts = Column(String)
    total_comments = Column(Integer)
    total_polarity = Column(Integer)
    total_subjectivity = Column(Float)
    avg_polarity = Column(Float)
    avg_subjectivity = Column(Float)


class CommentTree(BASE):
    __tablename__ = 'comment_trees'
    id = Column(String, primary_key=True)
    children = Column(String)


class PredictiveModels(BASE):
    __tablename__ = 'models'
    subreddit_name = Column(String, primary_key=True)
    negemo_response = Column(LargeBinary)
    posemo_response = Column(LargeBinary)
    anx_response = Column(LargeBinary)
    anger_response = Column(LargeBinary)
    sad_response = Column(LargeBinary)
    swear_response = Column(LargeBinary)
    assent_response = Column(LargeBinary)
    total_responses = Column(LargeBinary)
    negemo_bootstrap = Column(LargeBinary)
    posemo_bootstrap = Column(LargeBinary)
    anx_bootstrap = Column(LargeBinary)
    anger_bootstrap = Column(LargeBinary)
    sad_bootstrap = Column(LargeBinary)
    swear_bootstrap = Column(LargeBinary)
    assent_bootstrap = Column(LargeBinary)
    total_bootstraps = Column(LargeBinary)


<mask token>

<mask token>


class Post(BASE):
    __tablename__ = 'posts'
    author = Column(String)
    created_utc = Column(Integer)
    subreddit = Column(String)
    id = Column(String, primary_key=True)
    num_comments = Column(Integer)
    score = Column(Integer)
    ups = Column(Integer)
    downs = Column(Integer)
    gilded = Column(Integer)
    is_self = Column(Boolean)
    title = Column(String)
    domain = Column(String)
    url = Column(String)
    title_polarity = Column(Float)
    title_subjectivity = Column(Float)
    title_othref = Column(Float)
    title_time = Column(Float)
    title_inhib = Column(Float)
    title_space = Column(Float)
    title_posemo = Column(Float)
    title_self = Column(Float)
    title_social = Column(Float)
    title_humans = Column(Float)
    title_sports = Column(Float)
    title_other = Column(Float)
    title_music = Column(Float)
    title_swear = Column(Float)
    title_discrep = Column(Float)
    title_nonfl = Column(Float)
    title_you = Column(Float)
    title_cause = Column(Float)
    title_sexual = Column(Float)
    title_achieve = Column(Float)
    title_relig = Column(Float)
    title_cogmech = Column(Float)
    title_we = Column(Float)
    title_senses = Column(Float)
    title_eating = Column(Float)
    title_optim = Column(Float)
    title_incl = Column(Float)
    title_leisure = Column(Float)
    title_job = Column(Float)
    title_hear = Column(Float)
    title_preps = Column(Float)
    title_affect = Column(Float)
    title_excl = Column(Float)
    title_home = Column(Float)
    title_friends = Column(Float)
    title_present = Column(Float)
    title_body = Column(Float)
    title_school = Column(Float)
    title_comm = Column(Float)
    title_physcal = Column(Float)
    title_i = Column(Float)
    title_groom = Column(Float)
    title_tentat = Column(Float)
    title_similes = Column(Float)
    title_up = Column(Float)
    title_motion = Column(Float)
    title_negate = Column(Float)
    title_future = Column(Float)
    title_death = Column(Float)
    title_article = Column(Float)
    title_fillers = Column(Float)
    title_family = Column(Float)
    title_pronoun = Column(Float)
    title_metaph = Column(Float)
    title_feel = Column(Float)
    title_certain = Column(Float)
    title_insight = Column(Float)
    title_assent = Column(Float)
    title_number = Column(Float)
    title_sad = Column(Float)
    title_past = Column(Float)
    title_down = Column(Float)
    title_see = Column(Float)
    title_tv = Column(Float)
    title_sleep = Column(Float)
    title_money = Column(Float)
    title_anger = Column(Float)
    title_posfeel = Column(Float)
    title_anx = Column(Float)
    title_negemo = Column(Float)
    title_occup = Column(Float)
    selftext = Column(String)
    selftext_polarity = Column(Float)
    selftext_subjectivity = Column(Float)
    selftext_othref = Column(Float)
    selftext_time = Column(Float)
    selftext_inhib = Column(Float)
    selftext_space = Column(Float)
    selftext_posemo = Column(Float)
    selftext_self = Column(Float)
    selftext_social = Column(Float)
    selftext_humans = Column(Float)
    selftext_sports = Column(Float)
    selftext_other = Column(Float)
    selftext_music = Column(Float)
    selftext_swear = Column(Float)
    selftext_discrep = Column(Float)
    selftext_nonfl = Column(Float)
    selftext_you = Column(Float)
    selftext_cause = Column(Float)
    selftext_sexual = Column(Float)
    selftext_achieve = Column(Float)
    selftext_relig = Column(Float)
    selftext_cogmech = Column(Float)
    selftext_we = Column(Float)
    selftext_senses = Column(Float)
    selftext_eating = Column(Float)
    selftext_optim = Column(Float)
    selftext_incl = Column(Float)
    selftext_leisure = Column(Float)
    selftext_job = Column(Float)
    selftext_hear = Column(Float)
    selftext_preps = Column(Float)
    selftext_affect = Column(Float)
    selftext_excl = Column(Float)
    selftext_home = Column(Float)
    selftext_friends = Column(Float)
    selftext_present = Column(Float)
    selftext_body = Column(Float)
    selftext_school = Column(Float)
    selftext_comm = Column(Float)
    selftext_physcal = Column(Float)
    selftext_i = Column(Float)
    selftext_groom = Column(Float)
    selftext_tentat = Column(Float)
    selftext_similes = Column(Float)
    selftext_up = Column(Float)
    selftext_motion = Column(Float)
    selftext_negate = Column(Float)
    selftext_future = Column(Float)
    selftext_death = Column(Float)
    selftext_article = Column(Float)
    selftext_fillers = Column(Float)
    selftext_family = Column(Float)
    selftext_pronoun = Column(Float)
    selftext_metaph = Column(Float)
    selftext_feel = Column(Float)
    selftext_certain = Column(Float)
    selftext_insight = Column(Float)
    selftext_assent = Column(Float)
    selftext_number = Column(Float)
    selftext_sad = Column(Float)
    selftext_past = Column(Float)
    selftext_down = Column(Float)
    selftext_see = Column(Float)
    selftext_tv = Column(Float)
    selftext_sleep = Column(Float)
    selftext_money = Column(Float)
    selftext_anger = Column(Float)
    selftext_posfeel = Column(Float)
    selftext_anx = Column(Float)
    selftext_negemo = Column(Float)
    selftext_occup = Column(Float)


class Comment(BASE):
    __tablename__ = 'comments'
    author = Column(String)
    created_utc = Column(Integer)
    subreddit = Column(String)
    parent_id = Column(String)
    link_id = Column(String)
    id = Column(String, primary_key=True)
    score = Column(Integer)
    controversiality = Column(Integer)
    downs = Column(Integer)
    ups = Column(Integer)
    gilded = Column(Integer)
    body = Column(String)
    body_polarity = Column(Float)
    body_subjectivity = Column(Float)
    body_othref = Column(Float)
    body_time = Column(Float)
    body_inhib = Column(Float)
    body_space = Column(Float)
    body_posemo = Column(Float)
    body_self = Column(Float)
    body_social = Column(Float)
    body_humans = Column(Float)
    body_sports = Column(Float)
    body_other = Column(Float)
    body_music = Column(Float)
    body_swear = Column(Float)
    body_discrep = Column(Float)
    body_nonfl = Column(Float)
    body_you = Column(Float)
    body_cause = Column(Float)
    body_sexual = Column(Float)
    body_achieve = Column(Float)
    body_relig = Column(Float)
    body_cogmech = Column(Float)
    body_we = Column(Float)
    body_senses = Column(Float)
    body_eating = Column(Float)
    body_optim = Column(Float)
    body_incl = Column(Float)
    body_leisure = Column(Float)
    body_job = Column(Float)
    body_hear = Column(Float)
    body_preps = Column(Float)
    body_affect = Column(Float)
    body_excl = Column(Float)
    body_home = Column(Float)
    body_friends = Column(Float)
    body_present = Column(Float)
    body_body = Column(Float)
    body_school = Column(Float)
    body_comm = Column(Float)
    body_physcal = Column(Float)
    body_i = Column(Float)
    body_groom = Column(Float)
    body_tentat = Column(Float)
    body_similes = Column(Float)
    body_up = Column(Float)
    body_motion = Column(Float)
    body_negate = Column(Float)
    body_future = Column(Float)
    body_death = Column(Float)
    body_article = Column(Float)
    body_fillers = Column(Float)
    body_family = Column(Float)
    body_pronoun = Column(Float)
    body_metaph = Column(Float)
    body_feel = Column(Float)
    body_certain = Column(Float)
    body_insight = Column(Float)
    body_assent = Column(Float)
    body_number = Column(Float)
    body_sad = Column(Float)
    body_past = Column(Float)
    body_down = Column(Float)
    body_see = Column(Float)
    body_tv = Column(Float)
    body_sleep = Column(Float)
    body_money = Column(Float)
    body_anger = Column(Float)
    body_posfeel = Column(Float)
    body_anx = Column(Float)
    body_negemo = Column(Float)
    body_occup = Column(Float)


class Author(BASE):
    __tablename__ = 'authors'
    author = Column(String, primary_key=True)
    subreddits = Column(String)
    comments = Column(String)
    posts = Column(String)
    total_comments = Column(Integer)
    total_polarity = Column(Integer)
    total_subjectivity = Column(Float)
    avg_polarity = Column(Float)
    avg_subjectivity = Column(Float)


class CommentTree(BASE):
    __tablename__ = 'comment_trees'
    id = Column(String, primary_key=True)
    children = Column(String)


class PredictiveModels(BASE):
    __tablename__ = 'models'
    subreddit_name = Column(String, primary_key=True)
    negemo_response = Column(LargeBinary)
    posemo_response = Column(LargeBinary)
    anx_response = Column(LargeBinary)
    anger_response = Column(LargeBinary)
    sad_response = Column(LargeBinary)
    swear_response = Column(LargeBinary)
    assent_response = Column(LargeBinary)
    total_responses = Column(LargeBinary)
    negemo_bootstrap = Column(LargeBinary)
    posemo_bootstrap = Column(LargeBinary)
    anx_bootstrap = Column(LargeBinary)
    anger_bootstrap = Column(LargeBinary)
    sad_bootstrap = Column(LargeBinary)
    swear_bootstrap = Column(LargeBinary)
    assent_bootstrap = Column(LargeBinary)
    total_bootstraps = Column(LargeBinary)


def create_modU_db():
    engine = create_engine('postgresql://%s:%s@localhost/%s' % (UNAME,
        PASSWORD, DB_NAME))
    BASE.metadata.create_all(engine)


if __name__ == '__main__':
    create_modU_db()

<mask token>
sys.dont_write_bytecode = True
<mask token>
BASE = declarative_base()


class Post(BASE):
    __tablename__ = 'posts'
    author = Column(String)
    created_utc = Column(Integer)
    subreddit = Column(String)
    id = Column(String, primary_key=True)
    num_comments = Column(Integer)
    score = Column(Integer)
    ups = Column(Integer)
    downs = Column(Integer)
    gilded = Column(Integer)
    is_self = Column(Boolean)
    title = Column(String)
    domain = Column(String)
    url = Column(String)
    title_polarity = Column(Float)
    title_subjectivity = Column(Float)
    title_othref = Column(Float)
    title_time = Column(Float)
    title_inhib = Column(Float)
    title_space = Column(Float)
    title_posemo = Column(Float)
    title_self = Column(Float)
    title_social = Column(Float)
    title_humans = Column(Float)
    title_sports = Column(Float)
    title_other = Column(Float)
    title_music = Column(Float)
    title_swear = Column(Float)
    title_discrep = Column(Float)
    title_nonfl = Column(Float)
    title_you = Column(Float)
    title_cause = Column(Float)
    title_sexual = Column(Float)
    title_achieve = Column(Float)
    title_relig = Column(Float)
    title_cogmech = Column(Float)
    title_we = Column(Float)
    title_senses = Column(Float)
    title_eating = Column(Float)
    title_optim = Column(Float)
    title_incl = Column(Float)
    title_leisure = Column(Float)
    title_job = Column(Float)
    title_hear = Column(Float)
    title_preps = Column(Float)
    title_affect = Column(Float)
    title_excl = Column(Float)
    title_home = Column(Float)
    title_friends = Column(Float)
    title_present = Column(Float)
    title_body = Column(Float)
    title_school = Column(Float)
    title_comm = Column(Float)
    title_physcal = Column(Float)
    title_i = Column(Float)
    title_groom = Column(Float)
    title_tentat = Column(Float)
    title_similes = Column(Float)
    title_up = Column(Float)
    title_motion = Column(Float)
    title_negate = Column(Float)
    title_future = Column(Float)
    title_death = Column(Float)
    title_article = Column(Float)
    title_fillers = Column(Float)
    title_family = Column(Float)
    title_pronoun = Column(Float)
    title_metaph = Column(Float)
    title_feel = Column(Float)
    title_certain = Column(Float)
    title_insight = Column(Float)
    title_assent = Column(Float)
    title_number = Column(Float)
    title_sad = Column(Float)
    title_past = Column(Float)
    title_down = Column(Float)
    title_see = Column(Float)
    title_tv = Column(Float)
    title_sleep = Column(Float)
    title_money = Column(Float)
    title_anger = Column(Float)
    title_posfeel = Column(Float)
    title_anx = Column(Float)
    title_negemo = Column(Float)
    title_occup = Column(Float)
    selftext = Column(String)
    selftext_polarity = Column(Float)
    selftext_subjectivity = Column(Float)
    selftext_othref = Column(Float)
    selftext_time = Column(Float)
    selftext_inhib = Column(Float)
    selftext_space = Column(Float)
    selftext_posemo = Column(Float)
    selftext_self = Column(Float)
    selftext_social = Column(Float)
    selftext_humans = Column(Float)
    selftext_sports = Column(Float)
    selftext_other = Column(Float)
    selftext_music = Column(Float)
    selftext_swear = Column(Float)
    selftext_discrep = Column(Float)
    selftext_nonfl = Column(Float)
    selftext_you = Column(Float)
    selftext_cause = Column(Float)
    selftext_sexual = Column(Float)
    selftext_achieve = Column(Float)
    selftext_relig = Column(Float)
    selftext_cogmech = Column(Float)
    selftext_we = Column(Float)
    selftext_senses = Column(Float)
    selftext_eating = Column(Float)
    selftext_optim = Column(Float)
    selftext_incl = Column(Float)
    selftext_leisure = Column(Float)
    selftext_job = Column(Float)
    selftext_hear = Column(Float)
    selftext_preps = Column(Float)
    selftext_affect = Column(Float)
    selftext_excl = Column(Float)
    selftext_home = Column(Float)
    selftext_friends = Column(Float)
    selftext_present = Column(Float)
    selftext_body = Column(Float)
    selftext_school = Column(Float)
    selftext_comm = Column(Float)
    selftext_physcal = Column(Float)
    selftext_i = Column(Float)
    selftext_groom = Column(Float)
    selftext_tentat = Column(Float)
    selftext_similes = Column(Float)
    selftext_up = Column(Float)
    selftext_motion = Column(Float)
    selftext_negate = Column(Float)
    selftext_future = Column(Float)
    selftext_death = Column(Float)
    selftext_article = Column(Float)
    selftext_fillers = Column(Float)
    selftext_family = Column(Float)
    selftext_pronoun = Column(Float)
    selftext_metaph = Column(Float)
    selftext_feel = Column(Float)
    selftext_certain = Column(Float)
    selftext_insight = Column(Float)
    selftext_assent = Column(Float)
    selftext_number = Column(Float)
    selftext_sad = Column(Float)
    selftext_past = Column(Float)
    selftext_down = Column(Float)
    selftext_see = Column(Float)
    selftext_tv = Column(Float)
    selftext_sleep = Column(Float)
    selftext_money = Column(Float)
    selftext_anger = Column(Float)
    selftext_posfeel = Column(Float)
    selftext_anx = Column(Float)
    selftext_negemo = Column(Float)
    selftext_occup = Column(Float)


class Comment(BASE):
    __tablename__ = 'comments'
    author = Column(String)
    created_utc = Column(Integer)
    subreddit = Column(String)
    parent_id = Column(String)
    link_id = Column(String)
    id = Column(String, primary_key=True)
    score = Column(Integer)
    controversiality = Column(Integer)
    downs = Column(Integer)
    ups = Column(Integer)
    gilded = Column(Integer)
    body = Column(String)
    body_polarity = Column(Float)
    body_subjectivity = Column(Float)
    body_othref = Column(Float)
    body_time = Column(Float)
    body_inhib = Column(Float)
    body_space = Column(Float)
    body_posemo = Column(Float)
    body_self = Column(Float)
    body_social = Column(Float)
    body_humans = Column(Float)
    body_sports = Column(Float)
    body_other = Column(Float)
    body_music = Column(Float)
    body_swear = Column(Float)
    body_discrep = Column(Float)
    body_nonfl = Column(Float)
    body_you = Column(Float)
    body_cause = Column(Float)
    body_sexual = Column(Float)
    body_achieve = Column(Float)
    body_relig = Column(Float)
    body_cogmech = Column(Float)
    body_we = Column(Float)
    body_senses = Column(Float)
    body_eating = Column(Float)
    body_optim = Column(Float)
    body_incl = Column(Float)
    body_leisure = Column(Float)
    body_job = Column(Float)
    body_hear = Column(Float)
    body_preps = Column(Float)
    body_affect = Column(Float)
    body_excl = Column(Float)
    body_home = Column(Float)
    body_friends = Column(Float)
    body_present = Column(Float)
    body_body = Column(Float)
    body_school = Column(Float)
    body_comm = Column(Float)
    body_physcal = Column(Float)
    body_i = Column(Float)
    body_groom = Column(Float)
    body_tentat = Column(Float)
    body_similes = Column(Float)
    body_up = Column(Float)
    body_motion = Column(Float)
    body_negate = Column(Float)
    body_future = Column(Float)
    body_death = Column(Float)
    body_article = Column(Float)
    body_fillers = Column(Float)
    body_family = Column(Float)
    body_pronoun = Column(Float)
    body_metaph = Column(Float)
    body_feel = Column(Float)
    body_certain = Column(Float)
    body_insight = Column(Float)
    body_assent = Column(Float)
    body_number = Column(Float)
    body_sad = Column(Float)
    body_past = Column(Float)
    body_down = Column(Float)
    body_see = Column(Float)
    body_tv = Column(Float)
    body_sleep = Column(Float)
    body_money = Column(Float)
    body_anger = Column(Float)
    body_posfeel = Column(Float)
    body_anx = Column(Float)
    body_negemo = Column(Float)
    body_occup = Column(Float)


class Author(BASE):
    __tablename__ = 'authors'
    author = Column(String, primary_key=True)
    subreddits = Column(String)
    comments = Column(String)
    posts = Column(String)
    total_comments = Column(Integer)
    total_polarity = Column(Integer)
    total_subjectivity = Column(Float)
    avg_polarity = Column(Float)
    avg_subjectivity = Column(Float)


class CommentTree(BASE):
    __tablename__ = 'comment_trees'
    id = Column(String, primary_key=True)
    children = Column(String)


class PredictiveModels(BASE):
    __tablename__ = 'models'
    subreddit_name = Column(String, primary_key=True)
    negemo_response = Column(LargeBinary)
    posemo_response = Column(LargeBinary)
    anx_response = Column(LargeBinary)
    anger_response = Column(LargeBinary)
    sad_response = Column(LargeBinary)
    swear_response = Column(LargeBinary)
    assent_response = Column(LargeBinary)
    total_responses = Column(LargeBinary)
    negemo_bootstrap = Column(LargeBinary)
    posemo_bootstrap = Column(LargeBinary)
    anx_bootstrap = Column(LargeBinary)
    anger_bootstrap = Column(LargeBinary)
    sad_bootstrap = Column(LargeBinary)
    swear_bootstrap = Column(LargeBinary)
    assent_bootstrap = Column(LargeBinary)
    total_bootstraps = Column(LargeBinary)


def create_modU_db():
    engine = create_engine('postgresql://%s:%s@localhost/%s' % (UNAME,
        PASSWORD, DB_NAME))
    BASE.metadata.create_all(engine)


if __name__ == '__main__':
    create_modU_db()

import sys
sys.dont_write_bytecode = True
from sqlalchemy import create_engine
import sqlalchemy
from sqlalchemy import Column, ForeignKey, Integer, String, Boolean, Float, LargeBinary
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship, sessionmaker
from sqlalchemy import create_engine
from config import DB_NAME, UNAME, PASSWORD
BASE = declarative_base()


class Post(BASE):
    __tablename__ = 'posts'
    author = Column(String)
    created_utc = Column(Integer)
    subreddit = Column(String)
    id = Column(String, primary_key=True)
    num_comments = Column(Integer)
    score = Column(Integer)
    ups = Column(Integer)
    downs = Column(Integer)
    gilded = Column(Integer)
    is_self = Column(Boolean)
    title = Column(String)
    domain = Column(String)
    url = Column(String)
    title_polarity = Column(Float)
    title_subjectivity = Column(Float)
    title_othref = Column(Float)
    title_time = Column(Float)
    title_inhib = Column(Float)
    title_space = Column(Float)
    title_posemo = Column(Float)
    title_self = Column(Float)
    title_social = Column(Float)
    title_humans = Column(Float)
    title_sports = Column(Float)
    title_other = Column(Float)
    title_music = Column(Float)
    title_swear = Column(Float)
    title_discrep = Column(Float)
    title_nonfl = Column(Float)
    title_you = Column(Float)
    title_cause = Column(Float)
    title_sexual = Column(Float)
    title_achieve = Column(Float)
    title_relig = Column(Float)
    title_cogmech = Column(Float)
    title_we = Column(Float)
    title_senses = Column(Float)
    title_eating = Column(Float)
    title_optim = Column(Float)
    title_incl = Column(Float)
    title_leisure = Column(Float)
    title_job = Column(Float)
    title_hear = Column(Float)
    title_preps = Column(Float)
    title_affect = Column(Float)
    title_excl = Column(Float)
    title_home = Column(Float)
    title_friends = Column(Float)
    title_present = Column(Float)
    title_body = Column(Float)
    title_school = Column(Float)
    title_comm = Column(Float)
    title_physcal = Column(Float)
    title_i = Column(Float)
    title_groom = Column(Float)
    title_tentat = Column(Float)
    title_similes = Column(Float)
    title_up = Column(Float)
    title_motion = Column(Float)
    title_negate = Column(Float)
    title_future = Column(Float)
    title_death = Column(Float)
    title_article = Column(Float)
    title_fillers = Column(Float)
    title_family = Column(Float)
    title_pronoun = Column(Float)
    title_metaph = Column(Float)
    title_feel = Column(Float)
    title_certain = Column(Float)
    title_insight = Column(Float)
    title_assent = Column(Float)
    title_number = Column(Float)
    title_sad = Column(Float)
    title_past = Column(Float)
    title_down = Column(Float)
    title_see = Column(Float)
    title_tv = Column(Float)
    title_sleep = Column(Float)
    title_money = Column(Float)
    title_anger = Column(Float)
    title_posfeel = Column(Float)
    title_anx = Column(Float)
    title_negemo = Column(Float)
    title_occup = Column(Float)
    selftext = Column(String)
    selftext_polarity = Column(Float)
    selftext_subjectivity = Column(Float)
    selftext_othref = Column(Float)
    selftext_time = Column(Float)
    selftext_inhib = Column(Float)
    selftext_space = Column(Float)
    selftext_posemo = Column(Float)
    selftext_self = Column(Float)
    selftext_social = Column(Float)
    selftext_humans = Column(Float)
    selftext_sports = Column(Float)
    selftext_other = Column(Float)
    selftext_music = Column(Float)
    selftext_swear = Column(Float)
    selftext_discrep = Column(Float)
    selftext_nonfl = Column(Float)
    selftext_you = Column(Float)
    selftext_cause = Column(Float)
    selftext_sexual = Column(Float)
    selftext_achieve = Column(Float)
    selftext_relig = Column(Float)
    selftext_cogmech = Column(Float)
    selftext_we = Column(Float)
    selftext_senses = Column(Float)
    selftext_eating = Column(Float)
    selftext_optim = Column(Float)
    selftext_incl = Column(Float)
    selftext_leisure = Column(Float)
    selftext_job = Column(Float)
    selftext_hear = Column(Float)
    selftext_preps = Column(Float)
    selftext_affect = Column(Float)
    selftext_excl = Column(Float)
    selftext_home = Column(Float)
    selftext_friends = Column(Float)
    selftext_present = Column(Float)
    selftext_body = Column(Float)
    selftext_school = Column(Float)
    selftext_comm = Column(Float)
    selftext_physcal = Column(Float)
    selftext_i = Column(Float)
    selftext_groom = Column(Float)
    selftext_tentat = Column(Float)
    selftext_similes = Column(Float)
    selftext_up = Column(Float)
    selftext_motion = Column(Float)
    selftext_negate = Column(Float)
    selftext_future = Column(Float)
    selftext_death = Column(Float)
    selftext_article = Column(Float)
    selftext_fillers = Column(Float)
    selftext_family = Column(Float)
    selftext_pronoun = Column(Float)
    selftext_metaph = Column(Float)
    selftext_feel = Column(Float)
    selftext_certain = Column(Float)
    selftext_insight = Column(Float)
    selftext_assent = Column(Float)
    selftext_number = Column(Float)
    selftext_sad = Column(Float)
    selftext_past = Column(Float)
    selftext_down = Column(Float)
    selftext_see = Column(Float)
    selftext_tv = Column(Float)
    selftext_sleep = Column(Float)
    selftext_money = Column(Float)
    selftext_anger = Column(Float)
    selftext_posfeel = Column(Float)
    selftext_anx = Column(Float)
    selftext_negemo = Column(Float)
    selftext_occup = Column(Float)


class Comment(BASE):
    __tablename__ = 'comments'
    author = Column(String)
    created_utc = Column(Integer)
    subreddit = Column(String)
    parent_id = Column(String)
    link_id = Column(String)
    id = Column(String, primary_key=True)
    score = Column(Integer)
    controversiality = Column(Integer)
    downs = Column(Integer)
    ups = Column(Integer)
    gilded = Column(Integer)
    body = Column(String)
    body_polarity = Column(Float)
    body_subjectivity = Column(Float)
    body_othref = Column(Float)
    body_time = Column(Float)
    body_inhib = Column(Float)
    body_space = Column(Float)
    body_posemo = Column(Float)
    body_self = Column(Float)
    body_social = Column(Float)
    body_humans = Column(Float)
    body_sports = Column(Float)
    body_other = Column(Float)
    body_music = Column(Float)
    body_swear = Column(Float)
    body_discrep = Column(Float)
    body_nonfl = Column(Float)
    body_you = Column(Float)
    body_cause = Column(Float)
    body_sexual = Column(Float)
    body_achieve = Column(Float)
    body_relig = Column(Float)
    body_cogmech = Column(Float)
    body_we = Column(Float)
    body_senses = Column(Float)
    body_eating = Column(Float)
    body_optim = Column(Float)
    body_incl = Column(Float)
    body_leisure = Column(Float)
    body_job = Column(Float)
    body_hear = Column(Float)
    body_preps = Column(Float)
    body_affect = Column(Float)
    body_excl = Column(Float)
    body_home = Column(Float)
    body_friends = Column(Float)
    body_present = Column(Float)
    body_body = Column(Float)
    body_school = Column(Float)
    body_comm = Column(Float)
    body_physcal = Column(Float)
    body_i = Column(Float)
    body_groom = Column(Float)
    body_tentat = Column(Float)
    body_similes = Column(Float)
    body_up = Column(Float)
    body_motion = Column(Float)
    body_negate = Column(Float)
    body_future = Column(Float)
    body_death = Column(Float)
    body_article = Column(Float)
    body_fillers = Column(Float)
    body_family = Column(Float)
    body_pronoun = Column(Float)
    body_metaph = Column(Float)
    body_feel = Column(Float)
    body_certain = Column(Float)
    body_insight = Column(Float)
    body_assent = Column(Float)
    body_number = Column(Float)
    body_sad = Column(Float)
    body_past = Column(Float)
    body_down = Column(Float)
    body_see = Column(Float)
    body_tv = Column(Float)
    body_sleep = Column(Float)
    body_money = Column(Float)
    body_anger = Column(Float)
    body_posfeel = Column(Float)
    body_anx = Column(Float)
    body_negemo = Column(Float)
    body_occup = Column(Float)


class Author(BASE):
    __tablename__ = 'authors'
    author = Column(String, primary_key=True)
    subreddits = Column(String)
    comments = Column(String)
    posts = Column(String)
    total_comments = Column(Integer)
    total_polarity = Column(Integer)
    total_subjectivity = Column(Float)
    avg_polarity = Column(Float)
    avg_subjectivity = Column(Float)


class CommentTree(BASE):
    __tablename__ = 'comment_trees'
    id = Column(String, primary_key=True)
    children = Column(String)


class PredictiveModels(BASE):
    __tablename__ = 'models'
    subreddit_name = Column(String, primary_key=True)
    negemo_response = Column(LargeBinary)
    posemo_response = Column(LargeBinary)
    anx_response = Column(LargeBinary)
    anger_response = Column(LargeBinary)
    sad_response = Column(LargeBinary)
    swear_response = Column(LargeBinary)
    assent_response = Column(LargeBinary)
    total_responses = Column(LargeBinary)
    negemo_bootstrap = Column(LargeBinary)
    posemo_bootstrap = Column(LargeBinary)
    anx_bootstrap = Column(LargeBinary)
    anger_bootstrap = Column(LargeBinary)
    sad_bootstrap = Column(LargeBinary)
    swear_bootstrap = Column(LargeBinary)
    assent_bootstrap = Column(LargeBinary)
    total_bootstraps = Column(LargeBinary)


def create_modU_db():
    engine = create_engine('postgresql://%s:%s@localhost/%s' % (UNAME,
        PASSWORD, DB_NAME))
    BASE.metadata.create_all(engine)


if __name__ == '__main__':
    create_modU_db()

import sys
sys.dont_write_bytecode = True

from sqlalchemy import create_engine
import sqlalchemy
from sqlalchemy import Column, ForeignKey, Integer, String, Boolean, Float, LargeBinary
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship,sessionmaker
from sqlalchemy import create_engine

from config import DB_NAME, UNAME, PASSWORD

BASE = declarative_base()

class Post(BASE):
  __tablename__ = 'posts'
  author = Column(String)
  created_utc = Column(Integer)
  subreddit = Column(String)
  id = Column(String,primary_key=True)
  num_comments = Column(Integer)
  score = Column(Integer)
  ups = Column(Integer)
  downs = Column(Integer)
  gilded = Column(Integer)
  is_self = Column(Boolean)
  title = Column(String)
  domain = Column(String)
  url = Column(String)

  title_polarity = Column(Float) #calc
  title_subjectivity = Column(Float) #calc
  title_othref = Column(Float)
  title_time = Column(Float)
  title_inhib = Column(Float)
  title_space = Column(Float)
  title_posemo = Column(Float)
  title_self = Column(Float)
  title_social = Column(Float)
  title_humans = Column(Float)
  title_sports = Column(Float)
  title_other = Column(Float)
  title_music = Column(Float)
  title_swear = Column(Float)
  title_discrep = Column(Float)
  title_nonfl = Column(Float)
  title_you = Column(Float)
  title_cause = Column(Float)
  title_sexual = Column(Float)
  title_achieve = Column(Float)
  title_relig = Column(Float)
  title_cogmech = Column(Float)
  title_we = Column(Float)
  title_senses = Column(Float)
  title_eating = Column(Float)
  title_optim = Column(Float)
  title_incl = Column(Float)
  title_leisure = Column(Float)
  title_job = Column(Float)
  title_hear = Column(Float)
  title_preps = Column(Float)
  title_affect = Column(Float)
  title_excl = Column(Float)
  title_home = Column(Float)
  title_friends = Column(Float)
  title_present = Column(Float)
  title_body = Column(Float)
  title_school = Column(Float)
  title_comm = Column(Float)
  title_physcal = Column(Float)
  title_i = Column(Float)
  title_groom = Column(Float)
  title_tentat = Column(Float)
  title_similes = Column(Float)
  title_up = Column(Float)
  title_motion = Column(Float)
  title_negate = Column(Float)
  title_future = Column(Float)
  title_death = Column(Float)
  title_article = Column(Float)
  title_fillers = Column(Float)
  title_family = Column(Float)
  title_pronoun = Column(Float)
  title_metaph = Column(Float)
  title_feel = Column(Float)
  title_certain = Column(Float)
  title_insight = Column(Float)
  title_assent = Column(Float)
  title_number = Column(Float)
  title_sad = Column(Float)
  title_past = Column(Float)
  title_down = Column(Float)
  title_see = Column(Float)
  title_tv = Column(Float)
  title_sleep = Column(Float)
  title_money = Column(Float)
  title_anger = Column(Float)
  title_posfeel = Column(Float)
  title_anx = Column(Float)
  title_negemo = Column(Float)
  title_occup = Column(Float)

  selftext = Column(String) #clean
  selftext_polarity =  Column(Float) #calc
  selftext_subjectivity = Column(Float) #calc
  selftext_othref = Column(Float)
  selftext_time = Column(Float)
  selftext_inhib = Column(Float)
  selftext_space = Column(Float)
  selftext_posemo = Column(Float)
  selftext_self = Column(Float)
  selftext_social = Column(Float)
  selftext_humans = Column(Float)
  selftext_sports = Column(Float)
  selftext_other = Column(Float)
  selftext_music = Column(Float)
  selftext_swear = Column(Float)
  selftext_discrep = Column(Float)
  selftext_nonfl = Column(Float)
  selftext_you = Column(Float)
  selftext_cause = Column(Float)
  selftext_sexual = Column(Float)
  selftext_achieve = Column(Float)
  selftext_relig = Column(Float)
  selftext_cogmech = Column(Float)
  selftext_we = Column(Float)
  selftext_senses = Column(Float)
  selftext_eating = Column(Float)
  selftext_optim = Column(Float)
  selftext_incl = Column(Float)
  selftext_leisure = Column(Float)
  selftext_job = Column(Float)
  selftext_hear = Column(Float)
  selftext_preps = Column(Float)
  selftext_affect = Column(Float)
  selftext_excl = Column(Float)
  selftext_home = Column(Float)
  selftext_friends = Column(Float)
  selftext_present = Column(Float)
  selftext_body = Column(Float)
  selftext_school = Column(Float)
  selftext_comm = Column(Float)
  selftext_physcal = Column(Float)
  selftext_i = Column(Float)
  selftext_groom = Column(Float)
  selftext_tentat = Column(Float)
  selftext_similes = Column(Float)
  selftext_up = Column(Float)
  selftext_motion = Column(Float)
  selftext_negate = Column(Float)
  selftext_future = Column(Float)
  selftext_death = Column(Float)
  selftext_article = Column(Float)
  selftext_fillers = Column(Float)
  selftext_family = Column(Float)
  selftext_pronoun = Column(Float)
  selftext_metaph = Column(Float)
  selftext_feel = Column(Float)
  selftext_certain = Column(Float)
  selftext_insight = Column(Float)
  selftext_assent = Column(Float)
  selftext_number = Column(Float)
  selftext_sad = Column(Float)
  selftext_past = Column(Float)
  selftext_down = Column(Float)
  selftext_see = Column(Float)
  selftext_tv = Column(Float)
  selftext_sleep = Column(Float)
  selftext_money = Column(Float)
  selftext_anger = Column(Float)
  selftext_posfeel = Column(Float)
  selftext_anx = Column(Float)
  selftext_negemo = Column(Float)
  selftext_occup = Column(Float)

class Comment(BASE):
  __tablename__ = 'comments'
  author = Column(String)
  created_utc = Column(Integer)
  subreddit = Column(String)
  parent_id = Column(String)
  link_id = Column(String)
  id = Column(String , primary_key = True)
  score = Column(Integer)
  controversiality = Column(Integer)
  downs = Column(Integer)
  ups = Column(Integer)
  gilded = Column(Integer)
  body = Column(String)
  body_polarity = Column(Float)
  body_subjectivity = Column(Float)
  body_othref = Column(Float)
  body_time = Column(Float)
  body_inhib = Column(Float)
  body_space = Column(Float)
  body_posemo = Column(Float)
  body_self = Column(Float)
  body_social = Column(Float)
  body_humans = Column(Float)
  body_sports = Column(Float)
  body_other = Column(Float)
  body_music = Column(Float)
  body_swear = Column(Float)
  body_discrep = Column(Float)
  body_nonfl = Column(Float)
  body_you = Column(Float)
  body_cause = Column(Float)
  body_sexual = Column(Float)
  body_achieve = Column(Float)
  body_relig = Column(Float)
  body_cogmech = Column(Float)
  body_we = Column(Float)
  body_senses = Column(Float)
  body_eating = Column(Float)
  body_optim = Column(Float)
  body_incl = Column(Float)
  body_leisure = Column(Float)
  body_job = Column(Float)
  body_hear = Column(Float)
  body_preps = Column(Float)
  body_affect = Column(Float)
  body_excl = Column(Float)
  body_home = Column(Float)
  body_friends = Column(Float)
  body_present = Column(Float)
  body_body = Column(Float)
  body_school = Column(Float)
  body_comm = Column(Float)
  body_physcal = Column(Float)
  body_i = Column(Float)
  body_groom = Column(Float)
  body_tentat = Column(Float)
  body_similes = Column(Float)
  body_up = Column(Float)
  body_motion = Column(Float)
  body_negate = Column(Float)
  body_future = Column(Float)
  body_death = Column(Float)
  body_article = Column(Float)
  body_fillers = Column(Float)
  body_family = Column(Float)
  body_pronoun = Column(Float)
  body_metaph = Column(Float)
  body_feel = Column(Float)
  body_certain = Column(Float)
  body_insight = Column(Float)
  body_assent = Column(Float)
  body_number = Column(Float)
  body_sad = Column(Float)
  body_past = Column(Float)
  body_down = Column(Float)
  body_see = Column(Float)
  body_tv = Column(Float)
  body_sleep = Column(Float)
  body_money = Column(Float)
  body_anger = Column(Float)
  body_posfeel = Column(Float)
  body_anx = Column(Float)
  body_negemo = Column(Float)
  body_occup = Column(Float)

class Author(BASE):
  __tablename__ = 'authors'
  author = Column(String , primary_key = True)
  subreddits = Column(String)
  comments = Column(String)
  posts = Column(String)
  total_comments = Column(Integer)
  total_polarity = Column(Integer)
  total_subjectivity = Column(Float)
  avg_polarity = Column(Float)
  avg_subjectivity = Column(Float)

class CommentTree(BASE):
  __tablename__ = 'comment_trees'
  id = Column(String, primary_key = True)
  children = Column(String)

class PredictiveModels(BASE):
  __tablename__ = 'models'
  subreddit_name = Column(String,primary_key = True)
  negemo_response = Column(LargeBinary)
  posemo_response = Column(LargeBinary)
  anx_response = Column(LargeBinary)
  anger_response = Column(LargeBinary)
  sad_response = Column(LargeBinary)
  swear_response = Column(LargeBinary)
  assent_response = Column(LargeBinary)
  total_responses = Column(LargeBinary)

  negemo_bootstrap = Column(LargeBinary)
  posemo_bootstrap = Column(LargeBinary)
  anx_bootstrap = Column(LargeBinary)
  anger_bootstrap = Column(LargeBinary)
  sad_bootstrap = Column(LargeBinary)
  swear_bootstrap = Column(LargeBinary)
  assent_bootstrap = Column(LargeBinary)
  total_bootstraps = Column(LargeBinary)



def create_modU_db():
  #Connect
  engine = create_engine('postgresql://%s:%s@localhost/%s'%(UNAME,PASSWORD,DB_NAME))
  BASE.metadata.create_all(engine)

if __name__ == '__main__':
  create_modU_db()