<commit_before>import time
import tornado.process
import json
import os
import signal

STREAM = tornado.process.Subprocess.STREAM
global_id = 0


def next_id():
    global global_id
    global_id += 1
    return global_id


def start(docker_tag):
    command = ["script", "-c" "docker run -t -i " + docker_tag, "/dev/null"]
    return tornado.process.Subprocess(command, preexec_fn=os.setsid, stdin=STREAM,
                                      stdout=STREAM, stderr=STREAM)


class Repl:
    def __init__(self, ioloop, docker_tag):<commit_msg>make container read only and remove networking<commit_after>import time
import tornado.process
import json
import os
import signal

STREAM = tornado.process.Subprocess.STREAM
global_id = 0


def next_id():
    global global_id
    global_id += 1
    return global_id


def start(docker_tag):
    command = ["script", "-c" "docker run --net=none --read-only=true -t -i " + docker_tag, "/dev/null"]
    return tornado.process.Subprocess(command, preexec_fn=os.setsid, stdin=STREAM,
                                      stdout=STREAM, stderr=STREAM)


class Repl:
    def __init__(self, ioloop, docker_tag):
{'fraction_non_alphanumeric': 0.10182767624020887, 'fraction_numerical': 0.0034812880765883376, 'mean_word_length': 3.1666666666666665, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6209937', 'n_tokens_mistral': 381, 'n_tokens_neox': 348, 'n_words': 97}