





"""simple docstring"""




import os
from typing import Optional

import fsspec
from fsspec.archive import AbstractArchiveFileSystem
from fsspec.utils import DEFAULT_BLOCK_SIZE





class  lowerCAmelCase							(       lowercase_ ):
  __lowerCamelCase		=      ''
  __lowerCamelCase		=      (
      None  # protocol passed in prefix to the url. ex: "gzip", for gzip://file.txt::http://foo.bar/file.txt.gz
  )
  __lowerCamelCase		=      None  # compression type in fsspec. ex: "gzip"
  __lowerCamelCase		=      None  # extension of the filename to strip. ex: "".gz" to get file.txt from file.txt.gz







  def __init__(      self  :int   ,							_lowercase  :Tuple = ""   ,							_lowercase  :Union[str, Any] = None   ,							_lowercase  :Optional[Any] = None   ,							**_lowercase  :Tuple ):






     '''simple docstring'''





     super().__init__(self   ,							**_SCREAMING_SNAKE_CASE )
     # always open as "rb" since fsspec can then use the TextIOWrapper to make it work for "r" mode
     lowercase__			       =  fsspec.open(
         _SCREAMING_SNAKE_CASE   ,							mode="rb"   ,							protocol=_SCREAMING_SNAKE_CASE   ,							compression=self.compression   ,							client_kwargs={
             "requote_redirect_url": False,  # see https://github.com/huggingface/datasets/pull/5459
             "trust_env": True,  # Enable reading proxy env variables.
             **(target_options or {}).pop("client_kwargs"   ,							{} ),  # To avoid issues if it was already passed.
         }   ,							**(target_options or {})   ,							)
     lowercase__			       =  os.path.basename(self.file.path.split("::" )[0] )
     lowercase__			       =  (
         self.compressed_name[: self.compressed_name.rindex("." )]
         if '''.''' in self.compressed_name
         else self.compressed_name
     )
     lowercase__			       =  None







  @classmethod
  def   UpperCAmelCase					(      cls  :Optional[int]   ,							_lowercase  :str ):






     '''simple docstring'''





     return super()._strip_protocol(_SCREAMING_SNAKE_CASE ).lstrip("/" )







  def   UpperCAmelCase					(      self  :Dict ):






     '''simple docstring'''





     if self.dir_cache is None:
        lowercase__			       =  {**self.file.fs.info(self.file.path ), '''name''': self.uncompressed_name}
        lowercase__			       =  {f['''name''']: f}







  def   UpperCAmelCase					(      self  :List[str]   ,							_lowercase  :Any ):






     '''simple docstring'''





     return self.file.open().read()







  def   UpperCAmelCase					(      self  :List[str]   ,							_lowercase  :List[Any]   ,							_lowercase  :List[Any] = "rb"   ,							_lowercase  :Tuple=None   ,							_lowercase  :List[Any]=True   ,							_lowercase  :Dict=None   ,							**_lowercase  :Any   ,							):






     '''simple docstring'''





     lowercase__			       =  self._strip_protocol(_SCREAMING_SNAKE_CASE )
     if mode != "rb":
        raise ValueError(f'''Tried to read with mode {mode} on file {self.file.path} opened with mode \'rb\'''' )
     return self.file.open()





class  lowerCAmelCase							(       lowercase_ ):
  __lowerCamelCase		=      'bz2'
  __lowerCamelCase		=      'bz2'
  __lowerCamelCase		=      '.bz2'





class  lowerCAmelCase							(       lowercase_ ):
  __lowerCamelCase		=      'gzip'
  __lowerCamelCase		=      'gzip'
  __lowerCamelCase		=      '.gz'





class  lowerCAmelCase							(       lowercase_ ):
  __lowerCamelCase		=      'lz4'
  __lowerCamelCase		=      'lz4'
  __lowerCamelCase		=      '.lz4'





class  lowerCAmelCase							(       lowercase_ ):
  __lowerCamelCase		=      'xz'
  __lowerCamelCase		=      'xz'
  __lowerCamelCase		=      '.xz'





class  lowerCAmelCase							(       lowercase_ ):
  __lowerCamelCase		=      'zstd'
  __lowerCamelCase		=      'zstd'
  __lowerCamelCase		=      '.zst'







  def __init__(      self  :List[Any]   ,							_lowercase  :Any   ,							_lowercase  :Optional[int] = "rb"   ,							_lowercase  :int = None   ,							_lowercase  :Tuple = None   ,							_lowercase  :List[Any] = DEFAULT_BLOCK_SIZE   ,							**_lowercase  :List[str]   ,							):






     '''simple docstring'''





     super().__init__(
         fo=_SCREAMING_SNAKE_CASE   ,							mode=_SCREAMING_SNAKE_CASE   ,							target_protocol=_SCREAMING_SNAKE_CASE   ,							target_options=_SCREAMING_SNAKE_CASE   ,							block_size=_SCREAMING_SNAKE_CASE   ,							**_SCREAMING_SNAKE_CASE   ,							)
     # We need to wrap the zstd decompressor to avoid this error in fsspec==2021.7.0 and zstandard==0.15.2:
     #
     # File "/Users/user/.virtualenvs/hf-datasets/lib/python3.7/site-packages/fsspec/core.py", line 145, in open
     #     out.close = close
     # AttributeError: 'zstd.ZstdDecompressionReader' object attribute 'close' is read-only
     #
     # see https://github.com/intake/filesystem_spec/issues/725
     lowercase__			       =  self.file.__enter__





     class  lowerCAmelCase							:







       def __init__(      self  :Tuple   ,							_lowercase  :List[str] ):






          '''simple docstring'''





          lowercase__			       =  file_







       def __enter__(      self  :Dict ):






          '''simple docstring'''





          self._file.__enter__()
          return self







       def __exit__(      self  :Optional[int]   ,							*_lowercase  :Optional[Any]   ,							**_lowercase  :Optional[int] ):






          '''simple docstring'''





          self._file.__exit__(*_SCREAMING_SNAKE_CASE   ,							**_SCREAMING_SNAKE_CASE )







       def __iter__(      self  :str ):






          '''simple docstring'''





          return iter(self._file )







       def   UpperCAmelCase					(      self  :int ):






          '''simple docstring'''





          return next(self._file )







       def __getattr__(      self  :List[Any]   ,							_lowercase  :int ):






          '''simple docstring'''





          return getattr(self._file   ,							_SCREAMING_SNAKE_CASE )

     def fixed_enter(*_lowercase  :str   ,							**_lowercase  :int ):
        return WrappedFile(_enter(*_SCREAMING_SNAKE_CASE   ,							**_SCREAMING_SNAKE_CASE ) )

     lowercase__			       =  fixed_enter













from __future__ import annotations


def _A       (   __magic_name__  , __magic_name__	):
   lowercase__			       =  0
   lowercase__			       =  len(__magic_name__	) - 1

   while i < j:
      if nums[i] + nums[j] == target:
         return [i, j]
      elif nums[i] + nums[j] < target:
         lowercase__			       =  i + 1
      else:
         lowercase__			       =  j - 1

   return []


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  print(F"""{two_pointer([2, 7, 11, 15], 9) = }""")






