


'''simple docstring'''



from __future__ import annotations

import math






def   lowerCamelCase							(_SCREAMING_SNAKE_CASE      :   List[str]   ):

					if num <= 0:
										__a			:       List[str]					    =  F"""{num}: Invalid input, please enter a positive integer."""
										raise ValueError(SCREAMING_SNAKE_CASE_   )

					__a			:       List[str]					    =  [True] * (num + 1)
					__a			:       str					    =  []
					__a			:       Optional[int]					    =  2
					__a			:       Any					    =  int(math.sqrt(SCREAMING_SNAKE_CASE_   )   )

					while start <= end:
										# If start is a prime
										if sieve[start] is True:
															prime.append(SCREAMING_SNAKE_CASE_   )

															# Set multiples of start be False
															for i in range(start * start						,      num + 1						,      SCREAMING_SNAKE_CASE_   ):
																				if sieve[i] is True:
																									__a			:       str					    =  False

										start += 1

					for j in range(end + 1						,      num + 1   ):
										if sieve[j] is True:
															prime.append(SCREAMING_SNAKE_CASE_   )

					return prime


if __name__ == "__main__":
	print(prime_sieve(int(input('Enter a positive integer: ').strip())))







import torch
from transformers import PreTrainedModel, XLMRobertaConfig, XLMRobertaModel
class 	UpperCAmelCase_					(					UpperCamelCase    ):

   '''simple docstring'''




   __A :      Optional[int]     		=		"M-CLIP"






   def __init__(		self						,				__A=1024						,				__A=768						,				**__A ):






     """simple docstring"""





     lowerCamelCase :					str    =				transformerDimSize
     lowerCamelCase :					Any    =				imageDimSize
     super().__init__(**__A )



class 	UpperCAmelCase_					(					UpperCamelCase    ):

   '''simple docstring'''




   __A :      Tuple     		=		MCLIPConfig






   def __init__(		self						,				__A						,				*__A						,				**__A ):






     """simple docstring"""





     super().__init__(__A						,				*__A						,				**__A )
     lowerCamelCase :					Tuple    =				XLMRobertaModel(__A )
     lowerCamelCase :					Optional[Any]    =				torch.nn.Linear(
         in_features=config.transformerDimensions						,				out_features=config.numDims )






   def _snake_case    (		self						,				__A						,				__A ):






     """simple docstring"""





     lowerCamelCase :					Any    =				self.transformer(input_ids=__A						,				attention_mask=__A )[0]
     lowerCamelCase :					int    =				(embs * attention_mask.unsqueeze(2 )).sum(dim=1 ) / attention_mask.sum(dim=1 )[:, None]
     return self.LinearTransformation(__A ), embs



