


from doctest import testmod
from math import sqrt


def   a						(				SCREAMING_SNAKE_CASE_   :		int							):






       """simple docstring"""





       UpperCamelCase     :						list[int] 						=		[]
       if num < 1:
              return facs
       facs.append(1							)
       if num == 1:
              return facs
       facs.append(SCREAMING_SNAKE_CASE_							)
       for i in range(2				,      int(sqrt(SCREAMING_SNAKE_CASE_							)							) + 1							):
              if num % i == 0:  # If i is a factor of num
                     facs.append(SCREAMING_SNAKE_CASE_							)
                     UpperCamelCase     :						List[Any] 						=		num // i  # num//i is the other factor of num
                     if d != i:  # If d and i are distinct
                            facs.append(SCREAMING_SNAKE_CASE_							)  # we have found another factor
       facs.sort()
       return facs


if __name__ == "__main__":
  testmod(name="factors_of_a_number", verbose=True)





import os

from apache_beam.io.filesystems import FileSystems
from apache_beam.pipeline import Pipeline

from .logging import get_logger


__UpperCAmelCase			:			Optional[Any]			      =					2 << 20  # 2mb
__UpperCAmelCase			:			List[Any]			      =					get_logger(__name__)



class  UpperCAmelCase_						(				_a):
       '''simple docstring'''






       def 			_lowercase (  self    ):




              """simple docstring"""




              UpperCamelCase     :						Optional[Any] 						=		self._options.get_all_options().get('''runner'''    )
              return runner in [None, "DirectRunner", "PortableRunner"]




def   a						(				SCREAMING_SNAKE_CASE_   :		str				,      SCREAMING_SNAKE_CASE_   :		int				,      SCREAMING_SNAKE_CASE_   :		Optional[Any]=False							):






       """simple docstring"""





       UpperCamelCase     :						int 						=		FileSystems
       if fs.exists(SCREAMING_SNAKE_CASE_							):
              if force_upload:
                     logger.info(F"""Remote path already exist: {remote_file_path}. Overwriting it as force_upload=True."""							)
              else:
                     logger.info(F"""Remote path already exist: {remote_file_path}. Skipping it as force_upload=False."""							)
                     return
       with fs.create(SCREAMING_SNAKE_CASE_							) as remote_file:
              with open(SCREAMING_SNAKE_CASE_				,      '''rb'''							) as local_file:
                     UpperCamelCase     :						List[str] 						=		local_file.read(SCREAMING_SNAKE_CASE_							)
                     while chunk:
                            remote_file.write(SCREAMING_SNAKE_CASE_							)
                            UpperCamelCase     :						Any 						=		local_file.read(SCREAMING_SNAKE_CASE_							)


def   a						(				SCREAMING_SNAKE_CASE_   :		str				,      SCREAMING_SNAKE_CASE_   :		Optional[Any]				,      SCREAMING_SNAKE_CASE_   :		List[str]=False							):






       """simple docstring"""





       UpperCamelCase     :						List[Any] 						=		FileSystems
       if os.path.exists(SCREAMING_SNAKE_CASE_							):
              if force_download:
                     logger.info(F"""Local path already exist: {remote_file_path}. Overwriting it as force_upload=True."""							)
              else:
                     logger.info(F"""Local path already exist: {remote_file_path}. Skipping it as force_upload=False."""							)
                     return
       with fs.open(SCREAMING_SNAKE_CASE_							) as remote_file:
              with open(SCREAMING_SNAKE_CASE_				,      '''wb'''							) as local_file:
                     UpperCamelCase     :						List[str] 						=		remote_file.read(SCREAMING_SNAKE_CASE_							)
                     while chunk:
                            local_file.write(SCREAMING_SNAKE_CASE_							)
                            UpperCamelCase     :						str 						=		remote_file.read(SCREAMING_SNAKE_CASE_							)

