
"""simple docstring"""
import gc
import random
import tempfile
import unittest

import numpy as np
import torch
from transformers import CLIPTextConfig, CLIPTextModel, CLIPTokenizer

from diffusers import AutoencoderKL, DDIMScheduler, LMSDiscreteScheduler, PNDMScheduler, UNetaDConditionModel
from diffusers.pipelines.stable_diffusion_safe import StableDiffusionPipelineSafe as StableDiffusionPipeline
from diffusers.utils import floats_tensor, nightly, torch_device
from diffusers.utils.testing_utils import require_torch_gpu
class       lowerCAmelCase_		(				unittest.TestCase ):



							'''simple docstring'''





							def    A__						( self				)       ->  str:
													# clean up the VRAM after each test
													super().tearDown()
													gc.collect()
													torch.cuda.empty_cache()




							@property
							def    A__						( self				)       ->  List[Any]:
													__lowerCAmelCase     =  1
													__lowerCAmelCase     =  3
													__lowerCAmelCase     =  (32, 32)

													__lowerCAmelCase     =  floats_tensor((batch_size, num_channels) + sizes    ,				rng=random.Random(0				)				).to(snake_case_				)
													return image




							@property
							def    A__						( self				)       ->  List[str]:
													torch.manual_seed(0				)
													__lowerCAmelCase     =  UNetaDConditionModel(
													    block_out_channels=(32, 64)    ,				layers_per_block=2    ,				sample_size=32    ,				in_channels=4    ,				out_channels=4    ,				down_block_types=("""DownBlock2D""", """CrossAttnDownBlock2D""")    ,				up_block_types=("""CrossAttnUpBlock2D""", """UpBlock2D""")    ,				cross_attention_dim=32    ,				)
													return model




							@property
							def    A__						( self				)       ->  str:
													torch.manual_seed(0				)
													__lowerCAmelCase     =  AutoencoderKL(
													    block_out_channels=[32, 64]    ,				in_channels=3    ,				out_channels=3    ,				down_block_types=["""DownEncoderBlock2D""", """DownEncoderBlock2D"""]    ,				up_block_types=["""UpDecoderBlock2D""", """UpDecoderBlock2D"""]    ,				latent_channels=4    ,				)
													return model




							@property
							def    A__						( self				)       ->  Dict:
													torch.manual_seed(0				)
													__lowerCAmelCase     =  CLIPTextConfig(
													    bos_token_id=0    ,				eos_token_id=2    ,				hidden_size=32    ,				intermediate_size=37    ,				layer_norm_eps=1e-0_5    ,				num_attention_heads=4    ,				num_hidden_layers=5    ,				pad_token_id=1    ,				vocab_size=1_000    ,				)
													return CLIPTextModel(snake_case_				)




							@property
							def    A__						( self				)       ->  Union[str, Any]:
													def extract(*snake_case_    ,				**snake_case_				):
																			class       lowerCAmelCase_		:



																										'''simple docstring'''





																										def __init__( self				)       ->  int:
																																__lowerCAmelCase     =  torch.ones([0]				)




																										def    A__						( self    ,				snake_case_				)       ->  int:
																																self.pixel_values.to(snake_case_				)
																																return self
																			return Out()

													return extract




							def    A__						( self				)       ->  Any:
													__lowerCAmelCase     =  """cpu"""  # ensure determinism for the device-dependent torch.Generator
													__lowerCAmelCase     =  self.dummy_cond_unet
													__lowerCAmelCase     =  DDIMScheduler(
													    beta_start=0.00_085    ,				beta_end=0.012    ,				beta_schedule="""scaled_linear"""    ,				clip_sample=snake_case_    ,				set_alpha_to_one=snake_case_    ,				)

													__lowerCAmelCase     =  self.dummy_vae
													__lowerCAmelCase     =  self.dummy_text_encoder
													__lowerCAmelCase     =  CLIPTokenizer.from_pretrained("""hf-internal-testing/tiny-random-clip"""				)

													# make sure here that pndm scheduler skips prk
													__lowerCAmelCase     =  StableDiffusionPipeline(
													    unet=snake_case_    ,				scheduler=snake_case_    ,				vae=snake_case_    ,				text_encoder=snake_case_    ,				tokenizer=snake_case_    ,				safety_checker=snake_case_    ,				feature_extractor=self.dummy_extractor    ,				)
													__lowerCAmelCase     =  sd_pipe.to(snake_case_				)
													sd_pipe.set_progress_bar_config(disable=snake_case_				)

													__lowerCAmelCase     =  """A painting of a squirrel eating a burger"""

													__lowerCAmelCase     =  torch.Generator(device=snake_case_				).manual_seed(0				)
													__lowerCAmelCase     =  sd_pipe([prompt]    ,				generator=snake_case_    ,				guidance_scale=6.0    ,				num_inference_steps=2    ,				output_type="""np"""				)
													__lowerCAmelCase     =  output.images

													__lowerCAmelCase     =  torch.Generator(device=snake_case_				).manual_seed(0				)
													__lowerCAmelCase     =  sd_pipe(
													    [prompt]    ,				generator=snake_case_    ,				guidance_scale=6.0    ,				num_inference_steps=2    ,				output_type="""np"""    ,				return_dict=snake_case_    ,				)[0]

													__lowerCAmelCase     =  image[0, -3:, -3:, -1]
													__lowerCAmelCase     =  image_from_tuple[0, -3:, -3:, -1]

													assert image.shape == (1, 64, 64, 3)
													__lowerCAmelCase     =  np.array([0.5_756, 0.6_118, 0.5_005, 0.5_041, 0.5_471, 0.4_726, 0.4_976, 0.4_865, 0.4_864]				)

													assert np.abs(image_slice.flatten() - expected_slice				).max() < 1e-2
													assert np.abs(image_from_tuple_slice.flatten() - expected_slice				).max() < 1e-2




							def    A__						( self				)       ->  Union[str, Any]:
													__lowerCAmelCase     =  """cpu"""  # ensure determinism for the device-dependent torch.Generator
													__lowerCAmelCase     =  self.dummy_cond_unet
													__lowerCAmelCase     =  PNDMScheduler(skip_prk_steps=snake_case_				)
													__lowerCAmelCase     =  self.dummy_vae
													__lowerCAmelCase     =  self.dummy_text_encoder
													__lowerCAmelCase     =  CLIPTokenizer.from_pretrained("""hf-internal-testing/tiny-random-clip"""				)

													# make sure here that pndm scheduler skips prk
													__lowerCAmelCase     =  StableDiffusionPipeline(
													    unet=snake_case_    ,				scheduler=snake_case_    ,				vae=snake_case_    ,				text_encoder=snake_case_    ,				tokenizer=snake_case_    ,				safety_checker=snake_case_    ,				feature_extractor=self.dummy_extractor    ,				)
													__lowerCAmelCase     =  sd_pipe.to(snake_case_				)
													sd_pipe.set_progress_bar_config(disable=snake_case_				)

													__lowerCAmelCase     =  """A painting of a squirrel eating a burger"""
													__lowerCAmelCase     =  torch.Generator(device=snake_case_				).manual_seed(0				)
													__lowerCAmelCase     =  sd_pipe([prompt]    ,				generator=snake_case_    ,				guidance_scale=6.0    ,				num_inference_steps=2    ,				output_type="""np"""				)

													__lowerCAmelCase     =  output.images

													__lowerCAmelCase     =  torch.Generator(device=snake_case_				).manual_seed(0				)
													__lowerCAmelCase     =  sd_pipe(
													    [prompt]    ,				generator=snake_case_    ,				guidance_scale=6.0    ,				num_inference_steps=2    ,				output_type="""np"""    ,				return_dict=snake_case_    ,				)[0]

													__lowerCAmelCase     =  image[0, -3:, -3:, -1]
													__lowerCAmelCase     =  image_from_tuple[0, -3:, -3:, -1]

													assert image.shape == (1, 64, 64, 3)
													__lowerCAmelCase     =  np.array([0.5_125, 0.5_716, 0.4_828, 0.5_060, 0.5_650, 0.4_768, 0.5_185, 0.4_895, 0.4_993]				)

													assert np.abs(image_slice.flatten() - expected_slice				).max() < 1e-2
													assert np.abs(image_from_tuple_slice.flatten() - expected_slice				).max() < 1e-2




							def    A__						( self				)       ->  Optional[int]:
													__lowerCAmelCase     =  StableDiffusionPipeline.from_pretrained(
													    """hf-internal-testing/tiny-stable-diffusion-lms-pipe"""    ,				safety_checker=snake_case_				)
													assert isinstance(snake_case_    ,				snake_case_				)
													assert isinstance(pipe.scheduler    ,				snake_case_				)
													assert pipe.safety_checker is None

													__lowerCAmelCase     =  pipe("""example prompt"""    ,				num_inference_steps=2				).images[0]
													assert image is not None

													# check that there's no error when saving a pipeline with one of the models being None
													with tempfile.TemporaryDirectory() as tmpdirname:
																			pipe.save_pretrained(snake_case_				)
																			__lowerCAmelCase     =  StableDiffusionPipeline.from_pretrained(snake_case_				)

													# sanity check that the pipeline still works
													assert pipe.safety_checker is None
													__lowerCAmelCase     =  pipe("""example prompt"""    ,				num_inference_steps=2				).images[0]
													assert image is not None




							@unittest.skipIf(torch_device != """cuda"""    ,				"""This test requires a GPU"""				)
							def    A__						( self				)       ->  List[str]:
													__lowerCAmelCase     =  self.dummy_cond_unet
													__lowerCAmelCase     =  PNDMScheduler(skip_prk_steps=snake_case_				)
													__lowerCAmelCase     =  self.dummy_vae
													__lowerCAmelCase     =  self.dummy_text_encoder
													__lowerCAmelCase     =  CLIPTokenizer.from_pretrained("""hf-internal-testing/tiny-random-clip"""				)

													# put models in fp16
													__lowerCAmelCase     =  unet.half()
													__lowerCAmelCase     =  vae.half()
													__lowerCAmelCase     =  bert.half()

													# make sure here that pndm scheduler skips prk
													__lowerCAmelCase     =  StableDiffusionPipeline(
													    unet=snake_case_    ,				scheduler=snake_case_    ,				vae=snake_case_    ,				text_encoder=snake_case_    ,				tokenizer=snake_case_    ,				safety_checker=snake_case_    ,				feature_extractor=self.dummy_extractor    ,				)
													__lowerCAmelCase     =  sd_pipe.to(snake_case_				)
													sd_pipe.set_progress_bar_config(disable=snake_case_				)

													__lowerCAmelCase     =  """A painting of a squirrel eating a burger"""
													__lowerCAmelCase     =  sd_pipe([prompt]    ,				num_inference_steps=2    ,				output_type="""np"""				).images

													assert image.shape == (1, 64, 64, 3)
@nightly
@require_torch_gpu
class       lowerCAmelCase_		(				unittest.TestCase ):



							'''simple docstring'''





							def    A__						( self				)       ->  Any:
													# clean up the VRAM after each test
													super().tearDown()
													gc.collect()
													torch.cuda.empty_cache()




							def    A__						( self				)       ->  Union[str, Any]:
													__lowerCAmelCase     =  StableDiffusionPipeline.from_pretrained("""runwayml/stable-diffusion-v1-5"""    ,				safety_checker=snake_case_				)
													__lowerCAmelCase     =  LMSDiscreteScheduler.from_config(sd_pipe.scheduler.config				)
													__lowerCAmelCase     =  sd_pipe.to(snake_case_				)
													sd_pipe.set_progress_bar_config(disable=snake_case_				)

													__lowerCAmelCase     =  (
													    """portrait of girl with smokey eyes makeup in abandoned hotel, grange clothes, redshift, wide high angle"""
													    """ coloured polaroid photograph with flash, kodak film, hyper real, stunning moody cinematography, with"""
													    """ anamorphic lenses, by maripol, fallen angels by wong kar - wai, style of suspiria and neon demon and"""
													    """ children from bahnhof zoo, detailed """
													)
													__lowerCAmelCase     =  4_003_660_346
													__lowerCAmelCase     =  7

													# without safety guidance (sld_guidance_scale = 0)
													__lowerCAmelCase     =  torch.manual_seed(snake_case_				)
													__lowerCAmelCase     =  sd_pipe(
													    [prompt]    ,				generator=snake_case_    ,				guidance_scale=snake_case_    ,				num_inference_steps=50    ,				output_type="""np"""    ,				width=512    ,				height=512    ,				sld_guidance_scale=0    ,				)

													__lowerCAmelCase     =  output.images
													__lowerCAmelCase     =  image[0, -3:, -3:, -1]
													__lowerCAmelCase     =  [0.2_278, 0.2_231, 0.2_249, 0.2_333, 0.2_303, 0.1_885, 0.2_273, 0.2_144, 0.2_176]

													assert image.shape == (1, 512, 512, 3)

													assert np.abs(image_slice.flatten() - expected_slice				).max() < 1e-2

													# without safety guidance (strong configuration)
													__lowerCAmelCase     =  torch.manual_seed(snake_case_				)
													__lowerCAmelCase     =  sd_pipe(
													    [prompt]    ,				generator=snake_case_    ,				guidance_scale=snake_case_    ,				num_inference_steps=50    ,				output_type="""np"""    ,				width=512    ,				height=512    ,				sld_guidance_scale=2_000    ,				sld_warmup_steps=7    ,				sld_threshold=0.025    ,				sld_momentum_scale=0.5    ,				sld_mom_beta=0.7    ,				)

													__lowerCAmelCase     =  output.images
													__lowerCAmelCase     =  image[0, -3:, -3:, -1]
													__lowerCAmelCase     =  [0.2_383, 0.2_276, 0.236, 0.2_192, 0.2_186, 0.2_053, 0.1_971, 0.1_901, 0.1_719]

													assert image.shape == (1, 512, 512, 3)

													assert np.abs(image_slice.flatten() - expected_slice				).max() < 1e-2




							def    A__						( self				)       ->  Any:
													__lowerCAmelCase     =  StableDiffusionPipeline.from_pretrained("""runwayml/stable-diffusion-v1-5"""    ,				safety_checker=snake_case_				)
													__lowerCAmelCase     =  LMSDiscreteScheduler.from_config(sd_pipe.scheduler.config				)
													__lowerCAmelCase     =  sd_pipe.to(snake_case_				)
													sd_pipe.set_progress_bar_config(disable=snake_case_				)

													__lowerCAmelCase     =  """padme amidala taking a bath artwork, safe for work, no nudity"""
													__lowerCAmelCase     =  2_734_971_755
													__lowerCAmelCase     =  7

													__lowerCAmelCase     =  torch.manual_seed(snake_case_				)
													__lowerCAmelCase     =  sd_pipe(
													    [prompt]    ,				generator=snake_case_    ,				guidance_scale=snake_case_    ,				num_inference_steps=50    ,				output_type="""np"""    ,				width=512    ,				height=512    ,				sld_guidance_scale=0    ,				)

													__lowerCAmelCase     =  output.images
													__lowerCAmelCase     =  image[0, -3:, -3:, -1]
													__lowerCAmelCase     =  [0.3_502, 0.3_622, 0.3_396, 0.3_642, 0.3_478, 0.3_318, 0.35, 0.3_348, 0.3_297]

													assert image.shape == (1, 512, 512, 3)

													assert np.abs(image_slice.flatten() - expected_slice				).max() < 1e-2

													__lowerCAmelCase     =  torch.manual_seed(snake_case_				)
													__lowerCAmelCase     =  sd_pipe(
													    [prompt]    ,				generator=snake_case_    ,				guidance_scale=snake_case_    ,				num_inference_steps=50    ,				output_type="""np"""    ,				width=512    ,				height=512    ,				sld_guidance_scale=2_000    ,				sld_warmup_steps=7    ,				sld_threshold=0.025    ,				sld_momentum_scale=0.5    ,				sld_mom_beta=0.7    ,				)

													__lowerCAmelCase     =  output.images
													__lowerCAmelCase     =  image[0, -3:, -3:, -1]
													__lowerCAmelCase     =  [0.5_531, 0.5_206, 0.4_895, 0.5_156, 0.5_182, 0.4_751, 0.4_802, 0.4_803, 0.4_443]

													assert image.shape == (1, 512, 512, 3)

													assert np.abs(image_slice.flatten() - expected_slice				).max() < 1e-2




							def    A__						( self				)       ->  List[Any]:
													__lowerCAmelCase     =  StableDiffusionPipeline.from_pretrained("""runwayml/stable-diffusion-v1-5"""				)
													__lowerCAmelCase     =  sd_pipe.to(snake_case_				)
													sd_pipe.set_progress_bar_config(disable=snake_case_				)

													__lowerCAmelCase     =  (
													    """the four horsewomen of the apocalypse, painting by tom of finland, gaston bussiere, craig mullins, j. c."""
													    """ leyendecker"""
													)
													__lowerCAmelCase     =  1_044_355_234
													__lowerCAmelCase     =  12

													__lowerCAmelCase     =  torch.manual_seed(snake_case_				)
													__lowerCAmelCase     =  sd_pipe(
													    [prompt]    ,				generator=snake_case_    ,				guidance_scale=snake_case_    ,				num_inference_steps=50    ,				output_type="""np"""    ,				width=512    ,				height=512    ,				sld_guidance_scale=0    ,				)

													__lowerCAmelCase     =  output.images
													__lowerCAmelCase     =  image[0, -3:, -3:, -1]
													__lowerCAmelCase     =  np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]				)

													assert image.shape == (1, 512, 512, 3)

													assert np.abs(image_slice.flatten() - expected_slice				).max() < 1e-7

													__lowerCAmelCase     =  torch.manual_seed(snake_case_				)
													__lowerCAmelCase     =  sd_pipe(
													    [prompt]    ,				generator=snake_case_    ,				guidance_scale=snake_case_    ,				num_inference_steps=50    ,				output_type="""np"""    ,				width=512    ,				height=512    ,				sld_guidance_scale=2_000    ,				sld_warmup_steps=7    ,				sld_threshold=0.025    ,				sld_momentum_scale=0.5    ,				sld_mom_beta=0.7    ,				)

													__lowerCAmelCase     =  output.images
													__lowerCAmelCase     =  image[0, -3:, -3:, -1]
													__lowerCAmelCase     =  np.array([0.5_818, 0.6_285, 0.6_835, 0.6_019, 0.625, 0.6_754, 0.6_096, 0.6_334, 0.6_561]				)
													assert image.shape == (1, 512, 512, 3)

													assert np.abs(image_slice.flatten() - expected_slice				).max() < 1e-2


"""simple docstring"""
from __future__ import annotations

import random

# Maximum size of the population.  Bigger could be faster but is more memory expensive.
SCREAMING_SNAKE_CASE_					     =	200
# Number of elements selected in every generation of evolution. The selection takes
# place from best to worst of that generation and must be smaller than N_POPULATION.
SCREAMING_SNAKE_CASE_					     =	50
# Probability that an element of a generation can mutate, changing one of its genes.
# This will guarantee that all genes will be used during evolution.
SCREAMING_SNAKE_CASE_					     =	0.4
# Just a seed to improve randomness required by the algorithm.
random.seed(random.randint(0, 1_000))

def  lowercase     (_lowerCAmelCase ,    _lowerCAmelCase						):
						__lowerCAmelCase     =  len([g for position, g in enumerate(_lowerCAmelCase						) if g == main_target[position]]						)
						return (item, float(_lowerCAmelCase						))

def  lowercase     (_lowerCAmelCase ,    _lowerCAmelCase						):
						__lowerCAmelCase     =  random.randint(0 ,    len(_lowerCAmelCase						) - 1						)
						__lowerCAmelCase     =  parent_a[:random_slice] + parent_a[random_slice:]
						__lowerCAmelCase     =  parent_a[:random_slice] + parent_a[random_slice:]
						return (child_a, child_a)

def  lowercase     (_lowerCAmelCase ,    _lowerCAmelCase						):
						__lowerCAmelCase     =  list(_lowerCAmelCase						)
						if random.uniform(0 ,    1						) < MUTATION_PROBABILITY:
												__lowerCAmelCase     =  random.choice(_lowerCAmelCase						)
						return "".join(_lowerCAmelCase						)

def  lowercase     (_lowerCAmelCase ,    _lowerCAmelCase ,    _lowerCAmelCase ,    ):
						__lowerCAmelCase     =  []
						# Generate more children proportionally to the fitness score.
						__lowerCAmelCase     =  int(parent_a[1] * 100						) + 1
						__lowerCAmelCase     =  10 if child_n >= 10 else child_n
						for _ in range(_lowerCAmelCase						):
												__lowerCAmelCase     =  population_score[random.randint(0 ,    _lowerCAmelCase						)][0]

												__lowerCAmelCase   ,     __lowerCAmelCase     =  crossover(parent_a[0] ,    _lowerCAmelCase						)
												# Append new string to the population list.
												pop.append(mutate(_lowerCAmelCase ,    _lowerCAmelCase						)						)
												pop.append(mutate(_lowerCAmelCase ,    _lowerCAmelCase						)						)
						return pop

def  lowercase     (_lowerCAmelCase ,    _lowerCAmelCase ,    _lowerCAmelCase = True						):

						# Verify if N_POPULATION is bigger than N_SELECTED
						if N_POPULATION < N_SELECTED:
												__lowerCAmelCase     =  f"""{N_POPULATION} must be bigger than {N_SELECTED}"""
												raise ValueError(_lowerCAmelCase						)
						# Verify that the target contains no genes besides the ones inside genes variable.
						__lowerCAmelCase     =  sorted({c for c in target if c not in genes}						)
						if not_in_genes_list:
												__lowerCAmelCase     =  f"""{not_in_genes_list} is not in genes list, evolution cannot converge"""
												raise ValueError(_lowerCAmelCase						)

						# Generate random starting population.
						__lowerCAmelCase     =  []
						for _ in range(_lowerCAmelCase						):
												population.append("""""".join([random.choice(_lowerCAmelCase						) for i in range(len(_lowerCAmelCase						)						)]						)						)

						# Just some logs to know what the algorithms is doing.
						__lowerCAmelCase   ,     __lowerCAmelCase     =  0, 0

						# This loop will end when we find a perfect match for our target.
						while True:
												generation += 1
												total_population += len(_lowerCAmelCase						)

												# Random population created. Now it's time to evaluate.

												# Adding a bit of concurrency can make everything faster,
												#
												# import concurrent.futures
												# population_score: list[tuple[str, float]] = []
												# with concurrent.futures.ThreadPoolExecutor(
												#                                   max_workers=NUM_WORKERS) as executor:
												#     futures = {executor.submit(evaluate, item) for item in population}
												#     concurrent.futures.wait(futures)
												#     population_score = [item.result() for item in futures]
												#
												# but with a simple algorithm like this, it will probably be slower.
												# We just need to call evaluate for every item inside the population.
												__lowerCAmelCase     =  [evaluate(_lowerCAmelCase ,    _lowerCAmelCase						) for item in population]

												# Check if there is a matching evolution.
												__lowerCAmelCase     =  sorted(_lowerCAmelCase ,    key=lambda _lowerCAmelCase						: x[1] ,    reverse=_lowerCAmelCase						)
												if population_score[0][0] == target:
																		return (generation, total_population, population_score[0][0])

												# Print the best result every 10 generation.
												# Just to know that the algorithm is working.
												if debug and generation % 10 == 0:
																		print(
																		    f"""\nGeneration: {generation}"""
																		    f"""\nTotal Population:{total_population}"""
																		    f"""\nBest score: {population_score[0][1]}"""
																		    f"""\nBest string: {population_score[0][0]}"""						)

												# Flush the old population, keeping some of the best evolutions.
												# Keeping this avoid regression of evolution.
												__lowerCAmelCase     =  population[: int(N_POPULATION / 3						)]
												population.clear()
												population.extend(_lowerCAmelCase						)
												# Normalize population score to be between 0 and 1.
												__lowerCAmelCase     =  [
												    (item, score / len(_lowerCAmelCase						)) for item, score in population_score
												]

												# This is selection
												for i in range(_lowerCAmelCase						):
																		population.extend(select(population_score[int(_lowerCAmelCase						)] ,    _lowerCAmelCase ,    _lowerCAmelCase						)						)
																		# Check if the population has already reached the maximum value and if so,
																		# break the cycle.  If this check is disabled, the algorithm will take
																		# forever to compute large strings, but will also calculate small strings in
																		# a far fewer generations.
																		if len(_lowerCAmelCase						) > N_POPULATION:
																								break


if __name__ == "__main__":
			SCREAMING_SNAKE_CASE_					     =	(
			    '''This is a genetic algorithm to evaluate, combine, evolve, and mutate a string!'''
			)
			SCREAMING_SNAKE_CASE_					     =	list(
			    ''' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm'''
			    '''nopqrstuvwxyz.,;!?+-*#@^\'èéòà€ù=)(&%$£/\\'''
			)
			SCREAMING_SNAKE_CASE_     ,							SCREAMING_SNAKE_CASE_     ,							SCREAMING_SNAKE_CASE_					     =	basic(target_str, genes_list)
			print(
			    F"\nGeneration: {generation}\nTotal Population: {population}\nTarget: {target}"
			)
