<commit_before>import os

import numpy as np
import pandas as pd

from webbrowser import open_new_tab
from flask import Flask, render_template, redirect, request, jsonify
from flask import Flask, render_template, request, flash, send_from_directory
from flaskext.mysql import MySQL

from battle import Simulation

app = Flask(__name__)

############################ Data #######################
mysql = MySQL()

app.config['MYSQL_DATABASE_USER'] = 'root'
app.config['MYSQL_DATABASE_PASSWORD'] = '<PASSWORD>'
app.config['MYSQL_DATABASE_DB'] = 'pokemon_schema'
app.config['MYSQL_DATABASE_HOST'] = 'localhost'
mysql.init_app(app)

conn = mysql.connect()
cursor=conn.cursor()

def check_un(username):
    cursor.execute(f"SELECT * FROM pokemon_table WHERE username='{Data.username}'")
    return cursor.fetchone()

def check_un_pw(username, password):<commit_msg>switch db to os.environ<commit_after>import os

import numpy as np
import pandas as pd

from webbrowser import open_new_tab
from flask import Flask, render_template, redirect, request, jsonify
from flask import Flask, render_template, request, flash, send_from_directory
from flaskext.mysql import MySQL

from battle import Simulation

app = Flask(__name__)

############################ Data #######################
mysql = MySQL()

app.config['MYSQL_DATABASE_USER'] = os.environ['MYSQL_USER']
app.config['MYSQL_DATABASE_PASSWORD'] = os.environ['MYSQL_PASSWORD']
app.config['MYSQL_DATABASE_HOST'] = os.environ['MYSQL_HOST']
app.config['MYSQL_DATABASE_DB'] = os.environ['MYSQL_DB']
mysql.init_app(app)

conn = mysql.connect()
cursor=conn.cursor()

def check_un(username):
    cursor.execute(f"SELECT * FROM pokemon_table WHERE username='{Data.username}'")
    return cursor.fetchone()

def check_un_pw(username, password):
{'fraction_non_alphanumeric': 0.15889949466591802, 'fraction_numerical': 0.0, 'mean_word_length': 7.211981566820277, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '4236873', 'n_tokens_mistral': 570, 'n_tokens_neox': 576, 'n_words': 136}