


"""simple docstring"""
import os
from typing import Optional

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





class        __A     (lowercase__):





							'''simple docstring'''

							__lowercase:		List[Any]							      =    """"""
							__lowercase:		str							      =    (
							    None  # protocol passed in prefix to the url. ex: "gzip", for gzip://file.txt::http://foo.bar/file.txt.gz
							)
							__lowercase:		str							      =    None  # compression type in fsspec. ex: "gzip"
							__lowercase:		str							      =    None  # extension of the filename to strip. ex: "".gz" to get file.txt from file.txt.gz



							def __init__(				self							:      Any		,       UpperCAmelCase_							:      str = ""		,       UpperCAmelCase_							:      Optional[str] = None		,       UpperCAmelCase_							:      Optional[dict] = None		,       **UpperCAmelCase_							:      int       )					->Optional[int]:



														"""simple docstring"""



														super().__init__(self		,       **__lowercase       )
														# always open as "rb" since fsspec can then use the TextIOWrapper to make it work for "r" mode
														snake_case_           =		fsspec.open(
														    __lowercase		,       mode="""rb"""		,       protocol=__lowercase		,       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 {})		,       )
														snake_case_           =		os.path.basename(self.file.path.split("""::"""       )[0]       )
														snake_case_           =		(
														    self.compressed_name[: self.compressed_name.rindex("""."""       )]
														    if """.""" in self.compressed_name
														    else self.compressed_name
														)
														snake_case_           =		None



							@classmethod
							def 		lowerCAmelCase       (				cls							:      Any		,       UpperCAmelCase_							:      List[str]       )					->Any:



														"""simple docstring"""



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



							def 		lowerCAmelCase       (				self							:      List[str]       )					->Dict:



														"""simple docstring"""



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



							def 		lowerCAmelCase       (				self							:      Union[str, Any]		,       UpperCAmelCase_							:      str       )					->int:



														"""simple docstring"""



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



							def 		lowerCAmelCase       (				self							:      Optional[int]		,       UpperCAmelCase_							:      str		,       UpperCAmelCase_							:      str = "rb"		,       UpperCAmelCase_							:      int=None		,       UpperCAmelCase_							:      str=True		,       UpperCAmelCase_							:      Tuple=None		,       **UpperCAmelCase_							:      Dict		,       )					->Optional[Any]:



														"""simple docstring"""



														snake_case_           =		self._strip_protocol(__lowercase       )
														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        __A     (lowercase__):





							'''simple docstring'''

							__lowercase:		Any							      =    """bz2"""
							__lowercase:		Dict							      =    """bz2"""
							__lowercase:		Optional[int]							      =    """.bz2"""





class        __A     (lowercase__):





							'''simple docstring'''

							__lowercase:		int							      =    """gzip"""
							__lowercase:		List[str]							      =    """gzip"""
							__lowercase:		Optional[Any]							      =    """.gz"""





class        __A     (lowercase__):





							'''simple docstring'''

							__lowercase:		Any							      =    """lz4"""
							__lowercase:		Union[str, Any]							      =    """lz4"""
							__lowercase:		List[str]							      =    """.lz4"""





class        __A     (lowercase__):





							'''simple docstring'''

							__lowercase:		Optional[int]							      =    """xz"""
							__lowercase:		Any							      =    """xz"""
							__lowercase:		str							      =    """.xz"""





class        __A     (lowercase__):





							'''simple docstring'''

							__lowercase:		List[Any]							      =    """zstd"""
							__lowercase:		List[str]							      =    """zstd"""
							__lowercase:		Any							      =    """.zst"""



							def __init__(				self							:      Tuple		,       UpperCAmelCase_							:      str		,       UpperCAmelCase_							:      str = "rb"		,       UpperCAmelCase_							:      Optional[str] = None		,       UpperCAmelCase_							:      Optional[dict] = None		,       UpperCAmelCase_							:      int = DEFAULT_BLOCK_SIZE		,       **UpperCAmelCase_							:      int		,       )					->Any:



														"""simple docstring"""



														super().__init__(
														    fo=__lowercase		,       mode=__lowercase		,       target_protocol=__lowercase		,       target_options=__lowercase		,       block_size=__lowercase		,       **__lowercase		,       )
														# 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
														snake_case_           =		self.file.__enter__





														class        __A     :





																					'''simple docstring'''

																					def __init__(				self							:      Optional[Any]		,       UpperCAmelCase_							:      List[str]       )					->Dict:



																												"""simple docstring"""



																												snake_case_           =		file_



																					def __enter__(				self							:      Optional[Any]       )					->Any:



																												"""simple docstring"""



																												self._file.__enter__()
																												return self



																					def __exit__(				self							:      Optional[Any]		,       *UpperCAmelCase_							:      str		,       **UpperCAmelCase_							:      Any       )					->Dict:



																												"""simple docstring"""



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



																					def __iter__(				self							:      Dict       )					->List[Any]:



																												"""simple docstring"""



																												return iter(self._file       )



																					def 		lowerCAmelCase       (				self							:      Any       )					->Dict:



																												"""simple docstring"""



																												return next(self._file       )



																					def __getattr__(				self							:      Union[str, Any]		,       UpperCAmelCase_							:      Tuple       )					->int:



																												"""simple docstring"""



																												return getattr(self._file		,       __lowercase       )

														def fixed_enter(*UpperCAmelCase_							:      Union[str, Any]		,       **UpperCAmelCase_							:      Dict       ):
																					return WrappedFile(_enter(*__lowercase		,       **__lowercase       )       )

														snake_case_           =		fixed_enter







"""simple docstring"""
from __future__ import annotations







def 						_a				(      _SCREAMING_SNAKE_CASE				, _SCREAMING_SNAKE_CASE				)    ->				list[int]:
							snake_case_           =		0
							snake_case_           =		len(_SCREAMING_SNAKE_CASE				) - 1

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

							return []


if __name__ == "__main__":
				import doctest

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



