<commit_before>import subprocess
import datetime
from flask import Flask, render_template, redirect, url_for, request
from blink import blink
from usa_weather import usa_weather
from settings import rfcodes, led_pins, codesend, bus_stops

app = Flask(__name__)


def rf_send(num, state):
    if num == '0':
        for outlet in rfcodes.keys():
            code = rfcodes[outlet][state]
            subprocess.call([codesend['exec'], code, '-p', codesend['pin'], '-l', codesend['length']])
    else:
        code = rfcodes[num][state]
        subprocess.call([codesend['exec'], code, '-p', codesend['pin'], '-l', codesend['length']])


@app.route('/')
def index():
    high, low = usa_weather()
    summerlea = get_bus_schedule(bus_stops['id'][0], bus_stops['name'][0])
    index_data = {'high': int(high), 'low': int(low), 'summerlea': summerlea['message']}
    return render_template('index.html', **index_data)<commit_msg>Fix bus schedule message in home page of web server<commit_after>import subprocess
import datetime
from flask import Flask, render_template, redirect, url_for, request
from blink import blink
from usa_weather import usa_weather
from pgh_bus_time import get_bus_schedule
from settings import rfcodes, led_pins, codesend, bus_stops

app = Flask(__name__)


def rf_send(num, state):
    if num == '0':
        for outlet in rfcodes.keys():
            code = rfcodes[outlet][state]
            subprocess.call([codesend['exec'], code, '-p', codesend['pin'], '-l', codesend['length']])
    else:
        code = rfcodes[num][state]
        subprocess.call([codesend['exec'], code, '-p', codesend['pin'], '-l', codesend['length']])


@app.route('/')
def index():
    high, low = usa_weather()
    summerlea = get_bus_schedule(bus_stops['id'][0], bus_stops['name'][0])
    index_data = {'high': int(high), 'low': int(low), 'summerlea': summerlea['message']}
    return render_template('index.html', **index_data)
{'fraction_non_alphanumeric': 0.15854922279792746, 'fraction_numerical': 0.0031088082901554403, 'mean_word_length': 4.517142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1158250', 'n_tokens_mistral': 640, 'n_tokens_neox': 624, 'n_words': 162}