
def     UpperCAmelCase_  (						__lowerCAmelCase	,					__lowerCAmelCase	) ->						int:
    return 1 if input_a == input_a else 0


def     UpperCAmelCase_  (						) ->						None:
    assert xnor_gate(0	,					0	) == 1
    assert xnor_gate(0	,					1	) == 0
    assert xnor_gate(1	,					0	) == 0
    assert xnor_gate(1	,					1	) == 1


if __name__ == "__main__":
 print(xnor_gate(0, 0))
 print(xnor_gate(0, 1))
 print(xnor_gate(1, 0))
 print(xnor_gate(1, 1))




import unittest

import numpy as np

from diffusers import OnnxStableDiffusionInpaintPipelineLegacy
from diffusers.utils.testing_utils import (
    is_onnx_available,
    load_image,
    load_numpy,
    nightly,
    require_onnxruntime,
    require_torch_gpu,
)


if is_onnx_available():
 import onnxruntime as ort


@nightly
@require_onnxruntime
@require_torch_gpu
class 						__lowerCAmelCase	(	unittest.TestCase      ):



      """simple docstring"""







      @property
      def 		snake_case_			(      self		:       Union[str, Any]				):
          return (
              "CUDAExecutionProvider",
              {
                  "gpu_mem_limit": "15000000000",  # 15GB
                  "arena_extend_strategy": "kSameAsRequested",
              },
          )




      @property
      def 		snake_case_			(      self		:       Optional[Any]				):
          __lowercase		:			Tuple	    =       ort.SessionOptions()
          __lowercase		:			List[Any]	    =       False
          return options




      def 		snake_case_			(      self		:       Dict				):
          __lowercase		:			int	    =       load_image(
              '''https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main'''
              '''/in_paint/overture-creations-5sI6fQgYIuo.png'''				)
          __lowercase		:			int	    =       load_image(
              '''https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main'''
              '''/in_paint/overture-creations-5sI6fQgYIuo_mask.png'''				)
          __lowercase		:			Optional[Any]	    =       load_numpy(
              '''https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main'''
              '''/in_paint/red_cat_sitting_on_a_park_bench_onnx.npy'''				)

          # using the PNDM scheduler by default
          __lowercase		:			Union[str, Any]	    =       OnnxStableDiffusionInpaintPipelineLegacy.from_pretrained(
              '''CompVis/stable-diffusion-v1-4'''				,       revision='''onnx'''				,       safety_checker=_snake_case				,       feature_extractor=_snake_case				,       provider=self.gpu_provider				,       sess_options=self.gpu_options				,       )
          pipe.set_progress_bar_config(disable=_snake_case				)

          __lowercase		:			Tuple	    =       '''A red cat sitting on a park bench'''

          __lowercase		:			int	    =       np.random.RandomState(0				)
          __lowercase		:			int	    =       pipe(
              prompt=_snake_case				,       image=_snake_case				,       mask_image=_snake_case				,       strength=0.75				,       guidance_scale=7.5				,       num_inference_steps=15				,       generator=_snake_case				,       output_type='''np'''				,       )

          __lowercase		:			Dict	    =       output.images[0]

          assert image.shape == (512, 512, 3)
          assert np.abs(expected_image - image				).max() < 1E-2


