




def 			a   (_lowerCAmelCase     ):
							SCREAMING_SNAKE_CASE_   	=    []
							for data in source_data:
														for i, el in enumerate(_lowerCAmelCase     ):
																					if len(_lowerCAmelCase     ) < i + 1:
																												data_lists.append([]     )
																					data_lists[i].append(float(_lowerCAmelCase     )     )
							return data_lists

def 			a   (_lowerCAmelCase  ,    _lowerCAmelCase     ):
							SCREAMING_SNAKE_CASE_   	=    []
							for dlist, weight in zip(_lowerCAmelCase  ,    _lowerCAmelCase     ):
														SCREAMING_SNAKE_CASE_   	=    min(_lowerCAmelCase     )
														SCREAMING_SNAKE_CASE_   	=    max(_lowerCAmelCase     )

														SCREAMING_SNAKE_CASE_   	=    []
														# for weight 0 score is 1 - actual score
														if weight == 0:
																					for item in dlist:
																												try:
																																			score.append(1 - ((item - mind) / (maxd - mind))     )
																												except ZeroDivisionError:
																																			score.append(1     )

														elif weight == 1:
																					for item in dlist:
																												try:
																																			score.append((item - mind) / (maxd - mind)     )
																												except ZeroDivisionError:
																																			score.append(0     )

        # weight not 0 or 1
														else:
																					SCREAMING_SNAKE_CASE_   	=    F"Invalid weight of {weight:f} provided"
																					raise ValueError(_lowerCAmelCase     )

														score_lists.append(_lowerCAmelCase     )

							return score_lists

def 			a   (_lowerCAmelCase     ):
							SCREAMING_SNAKE_CASE_   	=    [0 for i in range(len(score_lists[0]     )     )]

							for slist in score_lists:
														for j, ele in enumerate(_lowerCAmelCase     ):
																					SCREAMING_SNAKE_CASE_   	=    final_scores[j] + ele

							return final_scores






def 			a   (_lowerCAmelCase  ,    _lowerCAmelCase     ):
							SCREAMING_SNAKE_CASE_   	=    get_data(_lowerCAmelCase     )
							SCREAMING_SNAKE_CASE_   	=    calculate_each_score(_lowerCAmelCase  ,    _lowerCAmelCase     )
							SCREAMING_SNAKE_CASE_   	=    generate_final_scores(_lowerCAmelCase     )

							# append scores to source data
							for i, ele in enumerate(_lowerCAmelCase     ):
														source_data[i].append(_lowerCAmelCase     )

							return source_data








import requests

def 			a   (_lowerCAmelCase  ,    _lowerCAmelCase     ):
							SCREAMING_SNAKE_CASE_   	=    {'''Content-Type''': '''application/json'''}
							SCREAMING_SNAKE_CASE_   	=    requests.post(_lowerCAmelCase  ,    json={'''text''': message_body}  ,    headers=_lowerCAmelCase     )
							if response.status_code != 2_0_0:
														SCREAMING_SNAKE_CASE_   	=    (
														    '''Request to slack returned an error '''
														    F"{response.status_code}, the response is:\n{response.text}"
														)
														raise ValueError(_lowerCAmelCase     )


if __name__ == "__main__":
			# Set the slack url to the one provided by Slack when you create the webhook at
			# https://my.slack.com/services/new/incoming-webhook/
			send_slack_message("""<YOUR MESSAGE BODY>""", """<SLACK CHANNEL URL>""")


