<commit_before>#################################################################
##                  SMART TOLLBOOTH PROJECT                    ##
#################################################################

from flask import Flask, jsonify
from sqlalchemy import create_engine
from models import Base, engine, session, Car, CarInParking
from prettytable import PrettyTable
from RFID import Rfid_Th
from car import *
import servo
import time


app = Flask(__name__)

class bcolors:
    REDFAIL = '\033[91m'
    OKGREEN = '\033[92m'
    WARNING = '\033[93m'
    ENDC = '\033[0m'


#+-----------------------------------------------------+#
#|                     Flask's View                    +#
#+-----------------------------------------------------+#
#| # |       PATH       |         Function             |#
#+---+------------------+------------------------------+#
#|  1| /                |  index()                     |#
#+---+------------------+------------------------------+#

@app.route('/')
def index():
    return 'Welcome to Smart Tollbooth'


#+-----------------------------------------------------+#
#|                  Start-Up Statement                 +#
#+-----------------------------------------------------+#
#Close the barrier when start
servo.closeBarrier()
Rfid_Th()
# if __name__ == "__main__":
#     app.run(debug=True, host='0.0.0.0', port=80)<commit_msg>feat: multithread (rfid and flask)<commit_after>#################################################################
##                  SMART TOLLBOOTH PROJECT                    ##
#################################################################

from flask import Flask, jsonify
from sqlalchemy import create_engine
from models import Base, engine, session, Car, CarInParking
from prettytable import PrettyTable
from RFID import Rfid_Th
from car import *
import servo
import time
import thread

app = Flask(__name__)

#+-----------------------------------------------------+#
#|                     Flask's View                    +#
#+-----------------------------------------------------+#
#| # |       PATH       |         Function             |#
#+---+------------------+------------------------------+#
#|  1| /                |  index()                     |#
#+---+------------------+------------------------------+#

@app.route('/')
def index():
    return 'Welcome to Smart Tollbooth'


#+-----------------------------------------------------+#
#|                  Start-Up Statement                 +#
#+-----------------------------------------------------+#
#Close the barrier when start
servo.closeBarrier()
thread.start_new_thread(Rfid_Th)
if __name__ == "__main__":
    app.run(debug=True, host='0.0.0.0', port=80)
{'fraction_non_alphanumeric': 0.4143382352941177, 'fraction_numerical': 0.01213235294117647, 'mean_word_length': 1.1646778042959427, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2504617', 'n_tokens_mistral': 672, 'n_tokens_neox': 607, 'n_words': 149}