





import math






def 				__lowerCamelCase		(						lowerCAmelCase__     ):
       lowerCAmelCase__					     = math.loga(math.sqrt(4 * positive_integer + 1     ) / 2 + 1 / 2     )

       return exponent == int(snake_case_     )






def 				__lowerCamelCase		(						lowerCAmelCase__ = 1 / 1_2_3_4_5     ):
       lowerCAmelCase__					     = 0
       lowerCAmelCase__					     = 0

       lowerCAmelCase__					     = 3
       while True:
              lowerCAmelCase__					     = (integer**2 - 1) / 4
              # if candidate is an integer, then there is a partition for k
              if partition_candidate == int(snake_case_     ):
                     lowerCAmelCase__					     = int(snake_case_     )
                     total_partitions += 1
                     if check_partition_perfect(snake_case_     ):
                            perfect_partitions += 1
              if perfect_partitions > 0:
                     if perfect_partitions / total_partitions < max_proportion:
                            return int(snake_case_     )
              integer += 1


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

from typing import Optional

import pyspark

from .. import Features, NamedSplit
from ..download import DownloadMode
from ..packaged_modules.spark.spark import Spark
from .abc import AbstractDatasetReader
class     a_			(						SCREAMING_SNAKE_CASE						):






 '''simple docstring'''






 def __init__(      self :  str      ,   lowercase__ :  pyspark.sql.DataFrame      ,   lowercase__ :  Optional[NamedSplit] = None      ,   lowercase__ :  Optional[Features] = None      ,   lowercase__ :  bool = True      ,   lowercase__ :  str = None      ,   lowercase__ :  bool = False      ,   lowercase__ :  str = None      ,   lowercase__ :  bool = True      ,   lowercase__ :  str = "arrow"      ,   **lowercase__ :  Any      ,   ):







        '''simple docstring'''



        super().__init__(
            split=lowercase__      ,   features=lowercase__      ,   cache_dir=lowercase__      ,   keep_in_memory=lowercase__      ,   streaming=lowercase__      ,   **lowercase__      ,   )
        lowerCAmelCase__					     = load_from_cache_file
        lowerCAmelCase__					     = file_format
        lowerCAmelCase__					     = Spark(
            df=lowercase__      ,   features=lowercase__      ,   cache_dir=lowercase__      ,   working_dir=lowercase__      ,   **lowercase__      ,   )




 def 		__snake_case						(      self :  Tuple):







        '''simple docstring'''



        if self.streaming:
               return self.builder.as_streaming_dataset(split=self.split)
        lowerCAmelCase__					     = None if self._load_from_cache_file else DownloadMode.FORCE_REDOWNLOAD
        self.builder.download_and_prepare(
            download_mode=lowercase__      ,   file_format=self._file_format      ,   )
        return self.builder.as_dataset(split=self.split)
