<commit_before>#!/usr/bin/env python
from importlib import import_module
import os
from flask import Flask, render_template, Response, send_from_directory
import socket

from allsky import single_image_raspistill, single_image_stream, check_image_status

app = Flask(__name__)

@app.route('/')
def index():
    """All sky streaming home page."""
    return render_template('index.html', name=socket.gethostname())

#background process happening without any refreshing
@app.route('/snap')
def background_process_test():
    single_image_raspistill(filename='static/snap.jpg')
    return ("nothing")

@app.route('/status')
def background_process_test():
    if 'pid' in request.args:
        pid = int(request.args['pid'])
        return check_image_status(pid=pid)
    else:
        return json.dumps({'status':'failed'}

if __name__ == '__main__':
    app.run(host='0.0.0.0', threaded=True, port=8000)
<commit_msg>Fix import<commit_after>#!/usr/bin/env python
from importlib import import_module
import os
from flask import Flask, render_template, Response, send_from_directory
import socket

from allsky import single_image_raspistill, check_image_status

app = Flask(__name__)

@app.route('/')
def index():
    """All sky streaming home page."""
    return render_template('index.html', name=socket.gethostname())

#background process happening without any refreshing
@app.route('/snap')
def background_process_test():
    single_image_raspistill(filename='static/snap.jpg')
    return ("nothing")

@app.route('/status')
def background_process_test():
    if 'pid' in request.args:
        pid = int(request.args['pid'])
        return check_image_status(pid=pid)
    else:
        return json.dumps({'status':'failed'}

if __name__ == '__main__':
    app.run(host='0.0.0.0', threaded=True, port=8000)

{'fraction_non_alphanumeric': 0.13026607538802662, 'fraction_numerical': 0.008869179600886918, 'mean_word_length': 4.996677740863787, 'pattern_counts': {'":': 0, '<': 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': '4635875', 'n_tokens_mistral': 572, 'n_tokens_neox': 557, 'n_words': 136}