



'''simple docstring'''





def 	UpperCAmelCase__      (      UpperCAmelCase__ :Optional[int] ,					UpperCAmelCase__ :int					):






 '''simple docstring'''

 a						=		[0 for i in range(r + 1					)]
 # nc0 = 1
 a						=		1
 for i in range(1 ,					n + 1					):
  # to compute current row from previous row.
  a						=		min(UpperCAmelCase__ ,					UpperCAmelCase__					)
  while j > 0:
   c[j] += c[j - 1]
   j -= 1
 return c[r]




print(binomial_coefficient(n=10, r=5))






import copy
import os

import cva
import numpy as np
from matplotlib import pyplot as plt



class 		_lowercase		:

   def __init__(      self			:       List[str]							)       ->				List[str]:


    """simple docstring"""






    a						=		""
    a						=		""
    a						=		[]
    a						=		0
    a						=		256
    a						=		0
    a						=		0
    a						=		0
    a						=		0

   def 		A							(      self			:       Optional[Any]							,   __lowerCAmelCase			:       Any							)       ->				int:


    """simple docstring"""






    a						=		cva.imread(__lowerCAmelCase							,   0							)
    a						=		copy.deepcopy(self.img							)
    a		,  a		,  a						=		plt.hist(self.img.ravel()							,   256							,   [0, 256]							,   label="x"							)
    a						=		np.sum(__lowerCAmelCase							)
    for i in range(len(__lowerCAmelCase							)							):
     a						=		x[i] / self.k
     self.sk += prk
     a						=		(self.L - 1) * self.sk
     if self.rem != 0:
      a						=		int(last % last							)
     a						=		int(last + 1 if self.rem >= 0.5 else last							)
     self.last_list.append(__lowerCAmelCase							)
     a						=		int(np.ma.count(self.img							) / self.img[1].size							)
     a						=		self.img[1].size
    for i in range(self.number_of_cols							):
     for j in range(self.number_of_rows							):
      a						=		self.img[j][i]
      if num != self.last_list[num]:
       a						=		self.last_list[num]
    cva.imwrite("output_data/output.jpg"							,   self.img							)

   def 		A							(      self			:       Any							)       ->				int:


    """simple docstring"""






    plt.hist(self.img.ravel()							,   256							,   [0, 256]							)




   def 		A							(      self			:       Any							)       ->				int:


    """simple docstring"""






    cva.imshow("Output-Image"							,   self.img							)
    cva.imshow("Input-Image"							,   self.original_image							)
    cva.waitKey(5000							)
    cva.destroyAllWindows()


if __name__ == "__main__":
     A_		:     List[Any]        =     os.path.join(os.path.basename(__file__), '''image_data/input.jpg''')
     A_		:     int        =     ConstantStretch()
     stretcher.stretch(file_path)
     stretcher.plot_histogram()
     stretcher.show_image()

