<commit_before>from flask import Flask
import subprocess

app = Flask(__name__)

@app.route('/')
def hello_world():
    return '<h1>Hello and welcome to Sammy!</h1>'

@app.route('/pwd')
def test():
    process = subprocess.Popen("pwd", stdout=subprocess.PIPE)
    return process.communicate()[0]
    
@app.route('/cpu')
def get_cpu_info():
    process = subprocess.Popen("./Bash/getCPUInfo.sh", stdout=subprocess.PIPE)
    return process.communicate()[0]

@app.route('/mem')
def get_mem_info():
    process = subprocess.Popen("./Bash/getMemInfo.sh", stdout=subprocess.PIPE)
    return process.communicate()[0]<commit_msg>added /sysinfo to sammy.py<commit_after>from flask import Flask
import subprocess

app = Flask(__name__)

@app.route('/')
def hello_world():
    return '<h1>Hello and welcome to Sammy!</h1>'

@app.route('/pwd')
def test():
    process = subprocess.Popen("pwd", stdout=subprocess.PIPE)
    return process.communicate()[0]
    
@app.route('/cpu')
def get_cpu_info():
    process = subprocess.Popen("./Bash/getCPUInfo.sh", stdout=subprocess.PIPE)
    return process.communicate()[0]

@app.route('/mem')
def get_mem_info():
    process = subprocess.Popen("./Bash/getMemInfo.sh", stdout=subprocess.PIPE)
    return process.communicate()[0]

@app.route('/sysinfo')
def get_sys_info():
    process = subprocess.Popen("./Bash/getSystemInfo.sh", stdout=subprocess.PIPE)
    return process.communicate()[0]
{'fraction_non_alphanumeric': 0.1679604798870854, 'fraction_numerical': 0.0077628793225123505, 'mean_word_length': 4.7408906882591095, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3759204', 'n_tokens_mistral': 503, 'n_tokens_neox': 498, 'n_words': 92}