@@ -0,0 +1,1377 @@
+# Nothing new here, simply code from tweets and CS50%0A%0Afrom flask import Flask, redirect, render_template, request, url_for%0A%0Aimport helpers%0Aimport os%0Aimport sys%0Afrom analyzer import Analyzer%0A%0Aapp = Flask(__name__)%0A%0A@app.route(%22/%22)%0Adef index():%0A    return render_template(%22index.html%22)%0A%0A@app.route(%22/search%22)%0Adef search():%0A%0A    # validate screen_name%0A    screen_name = request.args.get(%22screen_name%22, %22%22)%0A    if not screen_name:%0A        return redirect(url_for(%22index%22))%0A%0A    # get screen_name's tweets%0A    tweets = helpers.get_user_timeline(screen_name, 100)%0A    if tweets is None:%0A        return redirect(url_for(%22index%22))%0A    %0A    # absolute paths to lists%0A    positives = os.path.join(sys.path%5B0%5D, %22positive-words.txt%22)%0A    negatives = os.path.join(sys.path%5B0%5D, %22negative-words.txt%22)%0A%0A    # instantiate analyzer%0A    analyzer = Analyzer(positives, negatives)%0A    %0A    # analyze tweets for sentiment and calculate percentages%0A    positive, negative, neutral = 0.0, 0.0, 100.0%0A    %0A    for tweet in tweets:%0A        score = analyzer.analyze(tweet)%0A        if score %3E 0.0:%0A            positive += 1%0A            neutral -= 1%0A        elif score %3C 0.0:%0A            negative += 1%0A            neutral -= 1%0A%0A    # generate chart%0A    chart = helpers.chart(positive, negative, neutral)%0A%0A    # render results%0A    return render_template(%22search.html%22, chart=chart, screen_name=screen_name)%0A

Create application.py