<commit_before># Fake log files generator


import random
import json
import logging
import argparse
import asyncio
import datetime
from asyncio import coroutine
import numpy


class fake_log_gen(object):

	def __init__(self, log, config, mode):
		self.log = log
		self.mode = mode
		# Dict that contains config info
		self.config = config

	def run(self):
		loop = asyncio.get_event_loop()
		loop.run_until_complete(
			asyncio.wait([
				self.heartbeat_lines()] 
			)
		)
		loop.close()


class fake_access_gen(fake_log_gen):

	def __init__(self, log, config, mode):
		self.log = log
		self.mode = mode
		# Dict that contains config info
		self.config = config

		self.access_min = self.config["access"]["interval"]["min"]
		self.access_max = self.config["access"]["interval"]["max"]
		self.user_ids = self.config["access"]["user_id"]
		self.methods = self.config["access"]["method"]
		self.methods_dist = self.config["access"]["method_dist"]
		self.resources = self.config["access"]["resource"]
		self.codes = self.config["access"]["code"]
		self.codes_dist = self.config["access"]["code_dist"]
		self.versions = self.config["access"]["version"]

	def run(self):
		loop = asyncio.get_event_loop()
		loop.run_until_complete(
			asyncio.wait([
				#self.heartbeat_lines(),
				self.access_lines()]
			)
		)
		loop.close()
<commit_msg>Some updates.<commit_after># Fake log files generator


import random
import json
import logging
import argparse
import asyncio
import datetime
from asyncio import coroutine
import numpy


class fake_log_gen(object):

	def __init__(self, log, config, mode):
		self.log = log
		self.mode = mode
		# Dict that contains config info
		self.config = config

	def run(self):
		loop = asyncio.get_event_loop()
		loop.run_until_complete(
			asyncio.wait([
				self.heartbeat_lines()] 
			)
		)
		loop.close()


class fake_access_gen(fake_log_gen):

	def __init__(self, log, config, mode):
		self.log = log
		self.mode = mode
		# Dict that contains config info
		self.config = config

		self.access_min = self.config["access"]["interval"]["min"]
		self.access_max = self.config["access"]["interval"]["max"]
		self.user_ids = self.config["access"]["user_id"]
		self.methods = self.config["access"]["method"]
		self.methods_dist = self.config["access"]["method_dist"]
		self.resources = self.config["access"]["resource"]
		self.codes = self.config["access"]["code"]
		self.codes_dist = self.config["access"]["code_dist"]
		self.versions = self.config["access"]["version"]

	def run(self):
		loop = asyncio.get_event_loop()
		loop.run_until_complete(
			asyncio.wait([
				self.heartbeat_lines(),
				self.access_lines()]	
			)
		)
		loop.close()

{'fraction_non_alphanumeric': 0.14232209737827714, 'fraction_numerical': 0.0, 'mean_word_length': 4.473360655737705, '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': '1189272', 'n_tokens_mistral': 966, 'n_tokens_neox': 915, 'n_words': 189}