






"""simple docstring"""
def 				lowercase__		(					lowerCamelCase,						lowerCamelCase       ):
				return int((input_a, input_a).count(0       ) == 0       )





def 				lowercase__		(					):
				assert and_gate(0,						0       ) == 0
				assert and_gate(0,						1       ) == 0
				assert and_gate(1,						0       ) == 0
				assert and_gate(1,						1       ) == 1


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









"""simple docstring"""
import platform
from argparse import ArgumentParser

import huggingface_hub

from .. import __version__ as version
from ..utils import is_accelerate_available, is_torch_available, is_transformers_available, is_xformers_available
from . import BaseDiffusersCLICommand





def 				lowercase__		(					lowerCamelCase       ):
				return EnvironmentCommand()






class _lowerCAmelCase						(    __UpperCAmelCase       ):







						@staticmethod
						def 			A      (    lowerCAmelCase_							)		->							List[Any]:
										_SCREAMING_SNAKE_CASE   :		int       		=    parser.add_parser('env'							)
										download_parser.set_defaults(func=lowerCAmelCase_							)







						def 			A      (    self							)		->							Any:
										_SCREAMING_SNAKE_CASE   :		int       		=    huggingface_hub.__version__

										_SCREAMING_SNAKE_CASE   :		Optional[Any]       		=    'not installed'
										_SCREAMING_SNAKE_CASE   :		Union[str, Any]       		=    'NA'
										if is_torch_available():
														import torch

														_SCREAMING_SNAKE_CASE   :		Union[str, Any]       		=    torch.__version__
														_SCREAMING_SNAKE_CASE   :		Union[str, Any]       		=    torch.cuda.is_available()

										_SCREAMING_SNAKE_CASE   :		Union[str, Any]       		=    'not installed'
										if is_transformers_available():
														import transformers

														_SCREAMING_SNAKE_CASE   :		Tuple       		=    transformers.__version__

										_SCREAMING_SNAKE_CASE   :		Optional[int]       		=    'not installed'
										if is_accelerate_available():
														import accelerate

														_SCREAMING_SNAKE_CASE   :		str       		=    accelerate.__version__

										_SCREAMING_SNAKE_CASE   :		str       		=    'not installed'
										if is_xformers_available():
														import xformers

														_SCREAMING_SNAKE_CASE   :		Optional[int]       		=    xformers.__version__

										_SCREAMING_SNAKE_CASE   :		Any       		=    {
										    '`diffusers` version': version,
										    'Platform': platform.platform(),
										    'Python version': platform.python_version(),
										    'PyTorch version (GPU?)': F"""{pt_version} ({pt_cuda_available})""",
										    'Huggingface_hub version': hub_version,
										    'Transformers version': transformers_version,
										    'Accelerate version': accelerate_version,
										    'xFormers version': xformers_version,
										    'Using GPU in script?': '<fill in>',
										    'Using distributed or parallel set-up in script?': '<fill in>',
										}

										print('\nCopy-and-paste the text below in your GitHub issue and FILL OUT the two last points.\n'							)
										print(self.format_dict(lowerCAmelCase_							)							)

										return info







						@staticmethod
						def 			A      (    lowerCAmelCase_							)		->							int:
										return "\n".join([F"""- {prop}: {val}""" for prop, val in d.items()]							) + "\n"

