<commit_before>import os
import serial
from flask import Flask, jsonify
from __init__ import KNOCK_PORT, BAUD_RATE

app = Flask(__name__)


@app.route('/')
def webstatus():
	return "Knock work"


@app.route('/knocker', requests=['POST'])
def knocker():
	if request.method == 'POST':		
		ser = serial.Serial()
		ser.port = KNOCK_PORT
		ser.baudrate = BAUD_RATE
		ser.open()
		threshold = 10
		x = []
		if ser.isOpen():<commit_msg>removed stuff from init and put it in the main file<commit_after>import os
import serial
from flask import Flask, jsonify, request
KNOCK_PORT = '/dev/ttyUSB0'
BAUD_RATE = 19200
#from __init__ import KNOCK_PORT, BAUD_RATE

app = Flask(__name__)


@app.route('/')
def webstatus():
	return "Knock work"


@app.route('/knocker', requests=['POST'])
def knocker():
	if request.method == 'POST':
		ser = serial.Serial()
		ser.port = KNOCK_PORT
		ser.baudrate = BAUD_RATE
		ser.open()
		threshold = 10
		x = []
		if ser.isOpen():
{'fraction_non_alphanumeric': 0.1368421052631579, 'fraction_numerical': 0.010526315789473684, 'mean_word_length': 4.283333333333333, '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': '761062', 'n_tokens_mistral': 374, 'n_tokens_neox': 342, 'n_words': 96}