<commit_before>
from flask.ext.script import Manager, Shell

from telephony_server import telephony_server,db

def _make_context():
    import rootio.telephony.models
    import rootio.radio.models
    return dict(db=db, t_models=rootio.telephony.models, r_models=rootio.radio.models)

manager = Manager(telephony_server)
manager.add_command("sh", Shell(make_context=_make_context))


from rootio.extensions import db
from flask.ext.sqlalchemy import SQLAlchemy
db = SQLAlchemy(telephony_server)
from rootio.telephony.models import *
from rootio.radio.models import *
from rootio.user.models import *

@manager.command
def hello():
    print "hello"

@manager.command
def createdb():
    db.create_all()

@manager.command
def reloaddb():    
    db.drop_all()
    from rootio.telephony.models import PhoneNumber, Message
    db.create_all()



if __name__ == "__main__":
    manager.run()
<commit_msg>Added Users in "sh" command, as well as creating a default admin user.  Supersecure password.<commit_after>
from flask.ext.script import Manager, Shell

from telephony_server import telephony_server,db

def _make_context():
    import rootio.telephony.models
    import rootio.radio.models
    import rootio.user.models
    return dict(db=db, u=rootio.user.models, t=rootio.telephony.models, r=rootio.radio.models)

from config import *
manager = Manager(telephony_server)
manager.add_command("sh", Shell(make_context=_make_context))


from rootio.extensions import db
from flask.ext.sqlalchemy import SQLAlchemy
telephony_server.config['SQLALCHEMY_DATABASE_URI'] = SQLALCHEMY_DATABASE_URI
db = SQLAlchemy(telephony_server)
from rootio.telephony.models import *
from rootio.radio.models import *
from rootio.user.models import *

@manager.command
def hello():
    print "hello"

@manager.command
def createdb():
    db.create_all()
    admin = User(
        name=u'admin',
        email=u'<EMAIL>',
        password=u'<PASSWORD>',
        role_code=ADMIN,
        status_code=ACTIVE,
        user_detail=UserDetail(
            gender_code=MALE,
            age=25,
            url=u'http://example.com',
            location=u'Kampala',
            bio=u'')
        )
    db.session.add(admin)
    db.session.commit()

@manager.command
def reloaddb():    
    db.drop_all()
    from rootio.telephony.models import PhoneNumber, Message
    db.create_all()



if __name__ == "__main__":
    manager.run()

{'fraction_non_alphanumeric': 0.10353430353430354, 'fraction_numerical': 0.0008316008316008316, 'mean_word_length': 3.8803245436105476, 'pattern_counts': {'":': 2, '<': 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': '6755885', 'n_tokens_mistral': 786, 'n_tokens_neox': 767, 'n_words': 169}