

from __future__ import annotations

from math import pi
from typing import Protocol

import matplotlib.pyplot as plt
import numpy as np

class     __UpperCamelCase     (       __snake_case    ):




	def    __A       (		self						:    Any		,						lowerCAmelCase						:    Optional[Any]				):


		'''simple docstring'''







		return 0.0



def    __lowerCAmelCase   (    A							,  A     ):
	UpperCAmelCase_												=      min([-20, np.min(fft_results[1 : samplerate // 2 - 1]     )]     )
	UpperCAmelCase_												=      max([20, np.max(fft_results[1 : samplerate // 2 - 1]     )]     )
	return lowest, highest



def    __lowerCAmelCase   (    A							,  A     ):
	UpperCAmelCase_												=      512
	UpperCAmelCase_												=      [1] + [0] * (size - 1)
	UpperCAmelCase_												=      [filter_type.process(__lowercase     ) for item in inputs]

	UpperCAmelCase_												=      [0] * (samplerate - size)  # zero-padding
	outputs += filler
	UpperCAmelCase_												=      np.abs(np.fft.fft(__lowercase     )     )
	UpperCAmelCase_												=      20 * np.logaa(__lowercase     )

	# Frequencies on log scale from 24 to nyquist frequency
	plt.xlim(24							,  samplerate / 2 - 1     )
	plt.xlabel("Frequency (Hz)"     )
	plt.xscale("log"     )

	# Display within reasonable bounds
	UpperCAmelCase_												=      get_bounds(__lowercase							,  __lowercase     )
	plt.ylim(max([-80, bounds[0]]     )							,  min([80, bounds[1]]     )     )
	plt.ylabel("Gain (dB)"     )

	plt.plot(__lowercase     )
	plt.show()




def    __lowerCAmelCase   (    A							,  A     ):
	UpperCAmelCase_												=      512
	UpperCAmelCase_												=      [1] + [0] * (size - 1)
	UpperCAmelCase_												=      [filter_type.process(__lowercase     ) for item in inputs]

	UpperCAmelCase_												=      [0] * (samplerate - size)  # zero-padding
	outputs += filler
	UpperCAmelCase_												=      np.angle(np.fft.fft(__lowercase     )     )

	# Frequencies on log scale from 24 to nyquist frequency
	plt.xlim(24							,  samplerate / 2 - 1     )
	plt.xlabel("Frequency (Hz)"     )
	plt.xscale("log"     )

	plt.ylim(-2 * pi							,  2 * pi     )
	plt.ylabel("Phase shift (Radians)"     )
	plt.plot(np.unwrap(__lowercase							,  -2 * pi     )     )
	plt.show()







from collections import defaultdict



def  a__ (__lowercase							:str					,  __lowercase							:str   )		-> bool:
				_A	:				Union[str, Any]   =      first_str.lower().strip()
				_A	:				int   =      second_str.lower().strip()

				# Remove whitespace
				_A	:				int   =      first_str.replace(''' '''					,  ''''''   )
				_A	:				Optional[Any]   =      second_str.replace(''' '''					,  ''''''   )

				# Strings of different lengths are not anagrams
				if len(__lowercase   ) != len(__lowercase   ):
								return False

				# Default values for count should be 0
				_A	:				defaultdict[str, int]   =      defaultdict(__lowercase   )

				# For each character in input strings,
				# increment count in the corresponding
				for i in range(len(__lowercase   )   ):
								count[first_str[i]] += 1
								count[second_str[i]] -= 1

				return all(_count == 0 for _count in count.values()   )


if __name__ == "__main__":
	from doctest import testmod

	testmod()
	_UpperCamelCase			:	Dict								=input('Enter the first string ').strip()
	_UpperCamelCase			:	Union[str, Any]								=input('Enter the second string ').strip()

	_UpperCamelCase			:	Dict								=check_anagrams(input_a, input_b)
	print(f'''{input_a} and {input_b} are {"" if status else "not "}anagrams.''')



