<commit_before>#!/usr/bin/env python

import os, sys, subprocess, re, shutil, hashlib

MAKE_PARALLEL_JOBS = 3

make_flags = ['-j'+str(MAKE_PARALLEL_JOBS)]

ansi_grey = '\033[30m'
ansi_red = '\033[31m'
ansi_green = '\033[32m'
ansi_yellow = '\033[33m'
ansi_blue = '\033[34m'
ansi_magenta = '\033[35m'
ansi_cyan = '\033[36m'
ansi_white = '\033[37m'
ansi_end = '\033[0m'

os.environ['PATH'] = '/usr/lib/colorgcc/bin:'+os.environ['PATH']

def say(string):
	sys.stdout.write(string)
	sys.stdout.flush()

def escaped_control_characters(string):
	return re.sub(r"[\x01-\x1F\x7F]", r"\\", string)
<commit_msg>dev-build.py: use a smarter default number of CPUs.<commit_after>#!/usr/bin/env python

import os, sys, subprocess, re, shutil, hashlib

try:
	import multiprocessing
	MAKE_PARALLEL_JOBS = multiprocessing.cpu_count() + 1
except (ImportError,NotImplementedError):
	MAKE_PARALLEL_JOBS = 2

make_flags = ['-j'+str(MAKE_PARALLEL_JOBS)]

ansi_grey = '\033[30m'
ansi_red = '\033[31m'
ansi_green = '\033[32m'
ansi_yellow = '\033[33m'
ansi_blue = '\033[34m'
ansi_magenta = '\033[35m'
ansi_cyan = '\033[36m'
ansi_white = '\033[37m'
ansi_end = '\033[0m'

os.environ['PATH'] = '/usr/lib/colorgcc/bin:'+os.environ['PATH']

def say(string):
	sys.stdout.write(string)
	sys.stdout.flush()

def escaped_control_characters(string):
	return re.sub(r"[\x01-\x1F\x7F]", r"\\", string)

{'fraction_non_alphanumeric': 0.18328445747800587, 'fraction_numerical': 0.07258064516129033, 'mean_word_length': 5.348837209302325, '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': '6382801', 'n_tokens_mistral': 675, 'n_tokens_neox': 606, 'n_words': 101}