<commit_before># Copyright (c) 2018 DDN. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.


import os
import sys

USE_CONSOLE = 'USE_CONSOLE' in os.environ

SITE_ROOT = os.path.dirname(os.path.realpath(__file__))

os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
sys.path.insert(0, SITE_ROOT)

# From Gunicorn Docs:
# DO NOT scale the number of workers to the number of clients you expect to have.
# Gunicorn should only need 4-12 worker processes to handle hundreds or thousands of requests per second.
#
# Obviously, your particular hardware and application are going to affect the optimal number of workers.
# Our recommendation is to start with the above guess and tune using TTIN and TTOU signals while the application is under load.
# Always remember, there is such a thing as too many workers.
# After a point your worker processes will start thrashing system resources decreasing the throughput of the entire system.
import multiprocessing
workers = max(multiprocessing.cpu_count() * 2 + 1, 8)

worker_class = 'gevent'

import settings
<commit_msg>/s/max/min<commit_after># Copyright (c) 2018 DDN. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.


import os
import sys

USE_CONSOLE = 'USE_CONSOLE' in os.environ

SITE_ROOT = os.path.dirname(os.path.realpath(__file__))

os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
sys.path.insert(0, SITE_ROOT)

# From Gunicorn Docs:
# DO NOT scale the number of workers to the number of clients you expect to have.
# Gunicorn should only need 4-12 worker processes to handle hundreds or thousands of requests per second.
#
# Obviously, your particular hardware and application are going to affect the optimal number of workers.
# Our recommendation is to start with the above guess and tune using TTIN and TTOU signals while the application is under load.
# Always remember, there is such a thing as too many workers.
# After a point your worker processes will start thrashing system resources decreasing the throughput of the entire system.
import multiprocessing
workers = min(multiprocessing.cpu_count() * 2 + 1, 8)

worker_class = 'gevent'

import settings

{'fraction_non_alphanumeric': 0.061531651173085435, 'fraction_numerical': 0.009738822487826471, 'mean_word_length': 4.65, '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': '4355531', 'n_tokens_mistral': 651, 'n_tokens_neox': 622, 'n_words': 306}