
'''simple docstring'''


from datetime import datetime

import matplotlib.pyplot as plt
import torch







def      SCREAMING_SNAKE_CASE				(				lowercase_    :      Union[str, Any]						):







						for param in module.parameters():
												lowercase        =							False







def      SCREAMING_SNAKE_CASE				(				):
						lowercase        =							"""cuda""" if torch.cuda.is_available() else """cpu"""
						if torch.backends.mps.is_available() and torch.backends.mps.is_built():
												lowercase        =							"""mps"""
						if device == "mps":
												print(
												    """WARNING: MPS currently doesn't seem to work, and messes up backpropagation without any visible torch"""
												    """ errors. I recommend using CUDA on a colab notebook or CPU instead if you're facing inexplicable issues"""
												    """ with generations."""						)
						return device







def      SCREAMING_SNAKE_CASE				(				lowercase_    :      Any						):
						lowercase        =							plt.imshow(__UpperCAmelCase						)
						fig.axes.get_xaxis().set_visible(__UpperCAmelCase						)
						fig.axes.get_yaxis().set_visible(__UpperCAmelCase						)
						plt.show()







def      SCREAMING_SNAKE_CASE				(				):
						lowercase        =							datetime.now()
						lowercase        =							current_time.strftime("""%H:%M:%S"""						)
						return timestamp







'''simple docstring'''


import requests







def      SCREAMING_SNAKE_CASE				(				lowercase_    :      str ,  lowercase_    :      str						):
						lowercase        =							{"""Content-Type""": """application/json"""}
						lowercase        =							requests.post(lowercase_ ,  json={"""text""": message_body} ,  headers=lowercase_						)
						if response.status_code != 200:
												lowercase        =							(
												    """Request to slack returned an error """
												    F"""{response.status_code}, the response is:\n{response.text}"""
												)
												raise ValueError(lowercase_						)


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>''')


