





"""simple docstring"""






def     __A      (			a_						:str   ,       a_						:str)		->		float:

				def get_matched_characters(a_						:str   ,       a_						:str) -> str:
								__a :						Union[str, Any]			       =  []
								__a :						Dict			       =  min(len(_stra)   ,       len(_stra)) // 2
								for i, l in enumerate(_stra):
												__a :						Dict			       =  int(max(0   ,       i - limit))
												__a :						List[Any]			       =  int(min(i + limit + 1   ,       len(_stra)))
												if l in _stra[left:right]:
																matched.append(a_)
																__a :						Tuple			       =  F"""{_stra[0:_stra.index(a_)]} {_stra[_stra.index(a_) + 1:]}"""

								return "".join(a_)

				# matching characters
				__a :						str			       =  get_matched_characters(a_   ,       a_)
				__a :						Optional[int]			       =  get_matched_characters(a_   ,       a_)
				__a :						Optional[int]			       =  len(a_)

				# transposition
				__a :						str			       =  (
				    len([(ca, ca) for ca, ca in zip(a_   ,       a_) if ca != ca]) // 2
				)

				if not match_count:
								__a :						str			       =  0.0
				else:
								__a :						List[str]			       =  (
								    1
								    / 3
								    * (
								        match_count / len(a_)
								        + match_count / len(a_)
								        + (match_count - transpositions) / match_count
								    )
								)

				# common prefix up to 4 characters
				__a :						Optional[int]			       =  0
				for ca, ca in zip(stra[:4]   ,       stra[:4]):
								if ca == ca:
												prefix_len += 1
								else:
												break

				return jaro + 0.1 * prefix_len * (1 - jaro)


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		print(jaro_winkler('''hello''', '''world'''))






"""simple docstring"""






from math import log

from scipy.constants import Boltzmann, physical_constants

A 			=  300  # TEMPERATURE (unit = K)

def     __A      (			a_						:float   ,       a_						:float   ,       a_						:float   ,       )		->		float:

				if donor_conc <= 0:
								raise ValueError('''Donor concentration should be positive''')
				elif acceptor_conc <= 0:
								raise ValueError('''Acceptor concentration should be positive''')
				elif intrinsic_conc <= 0:
								raise ValueError('''Intrinsic concentration should be positive''')
				elif donor_conc <= intrinsic_conc:
								raise ValueError(
								    '''Donor concentration should be greater than intrinsic concentration''')
				elif acceptor_conc <= intrinsic_conc:
								raise ValueError(
								    '''Acceptor concentration should be greater than intrinsic concentration''')
				else:
								return (
								    Boltzmann
								    * T
								    * log((donor_conc * acceptor_conc) / intrinsic_conc**2)
								    / physical_constants["electron volt"][0]
								)


if __name__ == "__main__":
		import doctest

		doctest.testmod()