
'''simple docstring'''

import os

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

from .logging import get_logger


lowerCAmelCase_			:			Optional[int]			   =     2 << 20  # 2mb
lowerCAmelCase_			:			int			   =     get_logger(__name__)







class 	__lowerCAmelCase    (  lowerCamelCase__				):



     def     snake_case_ (self	):
          _UpperCAmelCase					:  Dict         =    self._options.get_all_options().get("""runner"""	)
          return runner in [None, "DirectRunner", "PortableRunner"]







def __A  (    lowerCAmelCase_ ,       lowerCAmelCase_ ,       lowerCAmelCase_=False       ):
     _UpperCAmelCase					:  Union[str, Any]         =    FileSystems
     if fs.exists(lowerCAmelCase_       ):
          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(lowerCAmelCase_       ) as remote_file:
          with open(lowerCAmelCase_ ,       """rb"""       ) as local_file:
               _UpperCAmelCase					:  Union[str, Any]         =    local_file.read(lowerCAmelCase_       )
               while chunk:
                    remote_file.write(lowerCAmelCase_       )
                    _UpperCAmelCase					:  List[Any]         =    local_file.read(lowerCAmelCase_       )







def __A  (    lowerCAmelCase_ ,       lowerCAmelCase_ ,       lowerCAmelCase_=False       ):
     _UpperCAmelCase					:  List[Any]         =    FileSystems
     if os.path.exists(lowerCAmelCase_       ):
          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(lowerCAmelCase_       ) as remote_file:
          with open(lowerCAmelCase_ ,       """wb"""       ) as local_file:
               _UpperCAmelCase					:  Any         =    remote_file.read(lowerCAmelCase_       )
               while chunk:
                    local_file.write(lowerCAmelCase_       )
                    _UpperCAmelCase					:  str         =    remote_file.read(lowerCAmelCase_       )






def        __lowerCAmelCase    (SCREAMING_SNAKE_CASE = 1000					)->  int:




      """simple docstring"""

      snake_case_       =      0
      snake_case_       =      (n - 1) // 3
      total += ((terms) * (6 + (terms - 1) * 3)) // 2  # total of an A.P.
      snake_case_       =      (n - 1) // 5
      total += ((terms) * (10 + (terms - 1) * 5)) // 2
      snake_case_       =      (n - 1) // 15
      total -= ((terms) * (30 + (terms - 1) * 15)) // 2
      return total


if __name__ == "__main__":
   print(f'''{solution() = }''')