



from __future__ import annotations

_lowerCamelCase    :		Any		      =    [True] * 1_000_001
_lowerCamelCase    :		Any		      =    2
while i * i <= 1_000_000:
			if seive[i]:
						for j in range(i * i, 1_000_001, i):
									_lowerCamelCase    :		Optional[int]		      =    False
			i += 1

def        __a			(   __lowerCAmelCase   )     ->     bool:
					return seive[n]

def        __a			(   __lowerCAmelCase   )     ->     bool:
					return any(digit in '02468' for digit in str(__lowerCAmelCase   )   )

def        __a			(   __lowerCAmelCase = 100_0000   )     ->     list[int]:
					SCREAMING_SNAKE_CASE							:     Optional[Any]						=				[2]  # result already includes the number 2.
					for num in range(3      ,	limit + 1      ,	2   ):
										if is_prime(__lowerCAmelCase   ) and not contains_an_even_digit(__lowerCAmelCase   ):
															SCREAMING_SNAKE_CASE							:     str						=				str(__lowerCAmelCase   )
															SCREAMING_SNAKE_CASE							:     str						=				[int(str_num[j:] + str_num[:j]   ) for j in range(len(__lowerCAmelCase   )   )]
															if all(is_prime(__lowerCAmelCase   ) for i in list_nums   ):
																				result.append(__lowerCAmelCase   )
					return result

def        __a			(   )     ->     int:
					return len(find_circular_primes()   )


if __name__ == "__main__":
			print(f"""{len(find_circular_primes()) = }""")




from datetime import datetime

import matplotlib.pyplot as plt
import torch

def        __a			(   __lowerCAmelCase   )     ->     int:
					for param in module.parameters():
										SCREAMING_SNAKE_CASE							:     List[Any]						=				False

def        __a			(   )     ->     List[str]:
					SCREAMING_SNAKE_CASE							:     List[Any]						=				'cuda' if torch.cuda.is_available() else 'cpu'
					if torch.backends.mps.is_available() and torch.backends.mps.is_built():
										SCREAMING_SNAKE_CASE							:     List[str]						=				'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        __a			(   __lowerCAmelCase   )     ->     List[Any]:
					SCREAMING_SNAKE_CASE							:     Optional[int]						=				plt.imshow(__lowerCAmelCase   )
					fig.axes.get_xaxis().set_visible(__lowerCAmelCase   )
					fig.axes.get_yaxis().set_visible(__lowerCAmelCase   )
					plt.show()



def        __a			(   )     ->     Optional[Any]:
					SCREAMING_SNAKE_CASE							:     str						=				datetime.now()
					SCREAMING_SNAKE_CASE							:     Optional[int]						=				current_time.strftime('%H:%M:%S'   )
					return timestamp