

def       A_				(   _UpperCAmelCase    ,     _UpperCAmelCase    ,     _UpperCAmelCase=False   ):

						if isinstance(_UpperCAmelCase    ,     _UpperCAmelCase   ) and isinstance(_UpperCAmelCase    ,     _UpperCAmelCase   ):
												SCREAMING_SNAKE_CASE_:			Any  		=	len(set_a.intersection(_UpperCAmelCase   )   )

												if alternative_union:
																		SCREAMING_SNAKE_CASE_:			List[Any]  		=	len(_UpperCAmelCase   ) + len(_UpperCAmelCase   )
												else:
																		SCREAMING_SNAKE_CASE_:			Union[str, Any]  		=	len(set_a.union(_UpperCAmelCase   )   )

												return intersection / union

						if isinstance(_UpperCAmelCase    ,     (list, tuple)   ) and isinstance(_UpperCAmelCase    ,     (list, tuple)   ):
												SCREAMING_SNAKE_CASE_:			str  		=	[element for element in set_a if element in set_b]

												if alternative_union:
																		SCREAMING_SNAKE_CASE_:			Optional[Any]  		=	len(_UpperCAmelCase   ) + len(_UpperCAmelCase   )
																		return len(_UpperCAmelCase   ) / union
												else:
																		SCREAMING_SNAKE_CASE_:			Optional[Any]  		=	set_a + [element for element in set_b if element not in set_a]
																		return len(_UpperCAmelCase   ) / len(_UpperCAmelCase   )

												return len(_UpperCAmelCase   ) / len(_UpperCAmelCase   )
						return None


if __name__ == "__main__":
						lowerCAmelCase							:  Union[str, Any]            =						{"""a""", """b""", """c""", """d""", """e"""}
						lowerCAmelCase							:  List[str]            =						{"""c""", """d""", """e""", """f""", """h""", """i"""}
						print(jaccard_similarity(set_a, set_b))








import os

# Precomputes a list of the 100 first triangular numbers
lowerCAmelCase							:  Optional[int]            =						[int(0.5 * n * (n + 1)) for n in range(1, 101)]







def       A_				(   ):
						SCREAMING_SNAKE_CASE_:			List[str]  		=	os.path.dirname(os.path.realpath(_UpperCAmelCase   )   )
						SCREAMING_SNAKE_CASE_:			Union[str, Any]  		=	os.path.join(_UpperCAmelCase    ,     "words.txt"   )

						SCREAMING_SNAKE_CASE_:			Dict  		=	""
						with open(_UpperCAmelCase   ) as f:
												SCREAMING_SNAKE_CASE_:			int  		=	f.readline()

						SCREAMING_SNAKE_CASE_:			Optional[int]  		=	[word.strip("\""   ) for word in words.strip("\r\n"   ).split(","   )]
						SCREAMING_SNAKE_CASE_:			List[Any]  		=	[
						    word
						    for word in [sum(ord(_UpperCAmelCase   ) - 64 for x in word   ) for word in words]
						    if word in TRIANGULAR_NUMBERS
						]
						return len(_UpperCAmelCase   )


if __name__ == "__main__":
						print(solution())






