<commit_before>from flask import Flask, render_template, flash
from flask_bootstrap import Bootstrap
from flask_wtf import Form
from wtforms import TextField, SubmitField, validators
from wtforms.validators import Required
from handlers import test_handler

class BasicForm(Form):
    softwarename = TextField('Software Name', description='Software Name.')
    githubproject = TextField('GitHub Project', description='Github Project.')
    submit_button = SubmitField('Submit Form') 

def create_app(configfile=None):
    app = Flask(__name__)
    Bootstrap(app)

    app.config['SECRET_KEY'] = 'devkey'

    @app.route('/')
    def index():
        form = BasicForm()
        form.validate_on_submit()
        flash('critical message', 'critical')
        flash('error message', 'error')
        flash('warning message', 'warning')
        flash('info message', 'info')
        flash('debug message', 'debug')
        flash('different message', 'different')
        flash('uncategorized message')
        return render_template('index.html', form=form)

    @app.route('/about')
    def about():
       return render_template('about.html')

    @app.route('/index/test/')
    @app.route('/index/test/<software>')
    def test(software=None, score=-2):
        handler=test_handler.test_handler()
        score=handler.get_score(software)
        description=handler.get_description()
        return render_template('test.html', software=software, score=score, description=description)

    return app

if __name__ == '__main__':
    create_app().run(debug=True)<commit_msg>Added SlideShare handler<commit_after>from flask import Flask, render_template, flash
from flask_bootstrap import Bootstrap
from flask_wtf import Form
from wtforms import TextField, SubmitField, validators
from wtforms.validators import Required
from handlers import test_handler, slideshare_handler

class BasicForm(Form):
    softwarename = TextField('Software Name', description='Software Name.')
    githubproject = TextField('GitHub Project', description='Github Project.')
    submit_button = SubmitField('Submit Form') 

def create_app(configfile=None):
    app = Flask(__name__)
    Bootstrap(app)

    app.config['SECRET_KEY'] = 'devkey'

    @app.route('/')
    def index():
        form = BasicForm()
        form.validate_on_submit()
        flash('critical message', 'critical')
        flash('error message', 'error')
        flash('warning message', 'warning')
        flash('info message', 'info')
        flash('debug message', 'debug')
        flash('different message', 'different')
        flash('uncategorized message')
        return render_template('index.html', form=form)

    @app.route('/about')
    def about():
       return render_template('about.html')

    @app.route('/index/test/')
    @app.route('/index/test/<software>')
    def test(software=None, score=-2):
        handler=test_handler.test_handler()
        score=handler.get_score(software)
        description=handler.get_description()
        return render_template('test.html', software=software, score=score, description=description)

    @app.route('/index/slideshare/')
    @app.route('/index/slideshare/<software>')
    def slideshare(software=None, score=-2):
        handler=slideshare_handler.slideshare_handler()
        score=handler.get_score(software)
        description=handler.get_description()
        return render_template('test.html', software=software, score=score, description=description)

  

    return app

if __name__ == '__main__':
    create_app().run(debug=True)
{'fraction_non_alphanumeric': 0.12563237774030353, 'fraction_numerical': 0.0008431703204047217, 'mean_word_length': 3.9225449515905946, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '1759416', 'n_tokens_mistral': 1040, 'n_tokens_neox': 988, 'n_words': 221}