import math




def    lowerCAmelCase_ (     __A							)     ->				bool:







      '''simple docstring'''


      return math.sqrt(__A							) * math.sqrt(__A							) == num




def    lowerCAmelCase_ (     __A							)     ->				bool:







      '''simple docstring'''


      UpperCAmelCase__								=  0
      UpperCAmelCase__								=  n
      while left <= right:
            UpperCAmelCase__								=  (left + right) // 2
            if mid**2 == n:
                  return True
            elif mid**2 > n:
                  UpperCAmelCase__								=  mid - 1
            else:
                  UpperCAmelCase__								=  mid + 1
      return False


if __name__ == "__main__":
      import doctest

      doctest.testmod()











from typing import Callable, Optional

from .. import Features
from ..packaged_modules.generator.generator import Generator
from .abc import AbstractDatasetInputStream

class     _SCREAMING_SNAKE_CASE       (			_a      ):





	def __init__(		self				:					List[Any] ,  __lowerCamelCase				:					Callable ,  __lowerCamelCase				:					Optional[Features] = None ,  __lowerCamelCase				:					str = None ,  __lowerCamelCase				:					bool = False ,  __lowerCamelCase				:					bool = False ,  __lowerCamelCase				:					Optional[dict] = None ,  __lowerCamelCase				:					Optional[int] = None ,  **__lowerCamelCase				:					List[Any] ,  ):
		super().__init__(
		    features=__lowerCamelCase ,  cache_dir=__lowerCamelCase ,  keep_in_memory=__lowerCamelCase ,  streaming=__lowerCamelCase ,  num_proc=__lowerCamelCase ,  **__lowerCamelCase ,  )
		UpperCamelCase     :Union[str, Any]          =	Generator(
		    cache_dir=__lowerCamelCase ,  features=__lowerCamelCase ,  generator=__lowerCamelCase ,  gen_kwargs=__lowerCamelCase ,  **__lowerCamelCase ,  )





	def 						_A (		self				:					List[str]	):
		# Build iterable dataset
		if self.streaming:
			UpperCamelCase     :Any          =	self.builder.as_streaming_dataset(split="""train"""	)
		# Build regular (map-style) dataset
		else:
			UpperCamelCase     :Tuple          =	None
			UpperCamelCase     :Dict          =	None
			UpperCamelCase     :Dict          =	None
			UpperCamelCase     :List[str]          =	None

			self.builder.download_and_prepare(
			    download_config=__lowerCamelCase ,  download_mode=__lowerCamelCase ,  verification_mode=__lowerCamelCase ,  base_path=__lowerCamelCase ,  num_proc=self.num_proc ,  )
			UpperCamelCase     :Tuple          =	self.builder.as_dataset(
			    split="""train""" ,  verification_mode=__lowerCamelCase ,  in_memory=self.keep_in_memory	)
		return dataset
