<commit_before>'''
' Test app for flask socketio for python 2.7
' @author tim.tan
'
' ctrl {
'   id
'   act
'   error
' }
'
' data {
'   id
'   payload
'   error
' }
'
' Server is wrapped in a class per flask
' (my understanding of) guideline
'''

from uuid import uuid4
from flask import Flask, send_from_directory
from flask_socketio import SocketIO

# shell session implementation
from BashSession import BashSession

# flask
app = Flask(__name__)
io = SocketIO(app)
<commit_msg>Always use threading as async mode for simplicity (#6)<commit_after>'''
' Test app for flask socketio for python 2.7
' @author tim.tan
'
' ctrl {
'   id
'   act
'   error
' }
'
' data {
'   id
'   payload
'   error
' }
'
' Server is wrapped in a class per flask
' (my understanding of) guideline
'''

from uuid import uuid4
from flask import Flask, send_from_directory
from flask_socketio import SocketIO

# shell session implementation
from BashSession import BashSession

# flask
app = Flask(__name__)
io = SocketIO(app, async_mode='threading')

{'fraction_non_alphanumeric': 0.0923226433430515, 'fraction_numerical': 0.006802721088435374, 'mean_word_length': 3.951923076923077, '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': '2223438', 'n_tokens_mistral': 353, 'n_tokens_neox': 335, 'n_words': 121}