<commit_before>import os
import logging
import unittest
import posixpath
from shutil import rmtree
from glob import glob

import requests

logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)


class MosaicoServerTestCase(unittest.TestCase):

    def __init__(self, *args, **kwargs):
        super(MosaicoServerTestCase, self).__init__(*args, **kwargs)
        self.base_url = os.environ.get("BASE_URL", "http://127.0.0.1:9006")
        self.upload_dir = os.environ.get("UPLOAD_DIR", "/home/tubaman/sandboxes/mosaico/uploads")
        self.photo = os.environ.get("PHOTO", "/home/tubaman/Pictures/smartprompt_play_store.png")

    def clear_uploads(self):
        to_remove = glob(os.path.join(self.upload_dir, '*.png'))
        to_remove += glob(os.path.join(self.upload_dir, '*.jpg'))
        to_remove += glob(os.path.join(self.upload_dir, 'thumbnail', '*'))
        [os.remove(f) for f in to_remove]

<commit_msg>more stuff to environment vars<commit_after>import os
import logging
import unittest
import posixpath
from shutil import rmtree
from glob import glob

import requests

logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)


class MosaicoServerTestCase(unittest.TestCase):

    def __init__(self, *args, **kwargs):
        super(MosaicoServerTestCase, self).__init__(*args, **kwargs)
        self.base_url = os.environ.get("BASE_URL", "http://127.0.0.1:9006")
        self.upload_dir = os.environ.get("UPLOAD_DIR", None)
        self.photo = os.environ.get("PHOTO", None)

    def clear_uploads(self):
        to_remove = glob(os.path.join(self.upload_dir, '*.png'))
        to_remove += glob(os.path.join(self.upload_dir, '*.jpg'))
        to_remove += glob(os.path.join(self.upload_dir, 'thumbnail', '*'))
        [os.remove(f) for f in to_remove]


{'fraction_non_alphanumeric': 0.1415041782729805, 'fraction_numerical': 0.011142061281337047, 'mean_word_length': 3.9750692520775623, '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': '3965877', 'n_tokens_mistral': 620, 'n_tokens_neox': 602, 'n_words': 114}