


def      _a					( SCREAMING_SNAKE_CASE = "The quick brown fox jumps over the lazy dog"		,							):


		"""simple docstring"""




		lowercase__				= set()

		# Replace all the whitespace in our sentence
		lowercase__				= input_str.replace(''' '''		,							''''''	)
		for alpha in input_str:
				if "a" <= alpha.lower() <= "z":
						frequency.add(alpha.lower()	)
		return len(SCREAMING_SNAKE_CASE	) == 26
def      _a					( SCREAMING_SNAKE_CASE = "The quick brown fox jumps over the lazy dog"		,							):


		"""simple docstring"""




		lowercase__				= [False] * 26
		for char in input_str:
				if char.islower():
						lowercase__				= True
				elif char.isupper():
						lowercase__				= True
		return all(SCREAMING_SNAKE_CASE	)
def      _a					( SCREAMING_SNAKE_CASE = "The quick brown fox jumps over the lazy dog"		,							):


		"""simple docstring"""




		return len({char for char in input_str.lower() if char.isalpha()}	) == 26
def      _a					( ):


		"""simple docstring"""




		from timeit import timeit

		lowercase__				= '''from __main__ import is_pangram, is_pangram_faster, is_pangram_fastest'''
		print(timeit('''is_pangram()'''		,							setup=SCREAMING_SNAKE_CASE	)	)
		print(timeit('''is_pangram_faster()'''		,							setup=SCREAMING_SNAKE_CASE	)	)
		print(timeit('''is_pangram_fastest()'''		,							setup=SCREAMING_SNAKE_CASE	)	)
		# 5.348480500048026, 2.6477354579837993, 1.8470395830227062
		# 5.036091582966037, 2.644472333951853,  1.8869528750656173


if __name__ == "__main__":
			import doctest

			doctest.testmod()
			benchmark()









import gc
import threading
import time

import psutil
import torch

class   lowerCAmelCase				:
 def __init__( self    : str      )     ->      Union[str, Any]:
     lowerCamelCase__       : Optional[Any]   					=						psutil.Process()
     lowerCamelCase__       : Union[str, Any]   					=						False
 def 	A_      ( self    : Optional[int]      )     ->      int:
     lowerCamelCase__       : Optional[Any]   					=						-1

     while True:
         lowerCamelCase__       : Dict   					=						max(self.process.memory_info().rss     ,	self.cpu_memory_peak      )

         # can't sleep or will not catch the peak right (this comment is here on purpose)
         if not self.peak_monitoring:
             break
 def 	A_      ( self    : Tuple      )     ->      Dict:
     lowerCamelCase__       : List[Any]   					=						True
     lowerCamelCase__       : List[str]   					=						threading.Thread(target=self.peak_monitor      )
     lowerCamelCase__       : Union[str, Any]   					=						True
     self.thread.start()







 def 	A_      ( self    : str      )     ->      Dict:
     lowerCamelCase__       : int   					=						False
     self.thread.join()
     return self.cpu_memory_peak


_UpperCAmelCase							:			Dict        =							PeakCPUMemory()


def 			SCREAMING_SNAKE_CASE (			)     ->	Union[str, Any]:
    # Time
    lowerCamelCase__       : List[Any]   					=						{'time': time.time()}

    gc.collect()
    torch.cuda.empty_cache()

    # CPU mem
    lowerCamelCase__       : List[str]   					=						psutil.Process().memory_info().rss
    cpu_peak_tracker.start()

    # GPU mem
    for i in range(torch.cuda.device_count()					):
        lowerCamelCase__       : Union[str, Any]   					=						torch.cuda.memory_allocated(_UpperCAmelCase					)
    torch.cuda.reset_peak_memory_stats()

    return measures


def 			SCREAMING_SNAKE_CASE (			_UpperCAmelCase					)     ->	Tuple:
    # Time
    lowerCamelCase__       : Optional[int]   					=						{'time': time.time() - start_measures['time']}

    gc.collect()
    torch.cuda.empty_cache()

    # CPU mem
    lowerCamelCase__       : Dict   					=						(psutil.Process().memory_info().rss - start_measures['cpu']) / 2**20
    lowerCamelCase__       : int   					=						(cpu_peak_tracker.stop() - start_measures['cpu']) / 2**20

    # GPU mem
    for i in range(torch.cuda.device_count()					):
        lowerCamelCase__       : List[str]   					=						(torch.cuda.memory_allocated(_UpperCAmelCase					) - start_measures[str(_UpperCAmelCase					)]) / 2**20
        lowerCamelCase__       : Optional[Any]   					=						(torch.cuda.max_memory_allocated(_UpperCAmelCase					) - start_measures[str(_UpperCAmelCase					)]) / 2**20

    return measures


def 			SCREAMING_SNAKE_CASE (			_UpperCAmelCase		,      _UpperCAmelCase					)     ->	Dict:
    print(F"""{description}:"""					)
    print(F"""- Time: {measures["time"]:.2f}s"""					)
    for i in range(torch.cuda.device_count()					):
        print(F"""- GPU {i} allocated: {measures[str(_UpperCAmelCase					)]:.2f}MiB"""					)
        lowerCamelCase__       : List[str]   					=						measures[F"""{i}-peak"""]
        print(F"""- GPU {i} peak: {peak:.2f}MiB"""					)
    print(F"""- CPU RAM allocated: {measures["cpu"]:.2f}MiB"""					)
    print(F"""- CPU RAM peak: {measures["cpu-peak"]:.2f}MiB"""					)





