



"""simple docstring"""

from cva import destroyAllWindows, imread, imshow, waitKey







def 							SCREAMING_SNAKE_CASE__      (		SCREAMING_SNAKE_CASE__ :  List[str]			):



					"""simple docstring"""





					snake_case_					,			snake_case_					:		Any 					=					img.shape[0], img.shape[1]

					# converting each pixel's color to its negative
					for i in range(_UpperCAmelCase			):
										for j in range(_UpperCAmelCase			):
															snake_case_					:		int 					=					[2_5_5, 2_5_5, 2_5_5] - img[i][j]

					return img


if __name__ == "__main__":
				# read original image
				a_			   =					imread('''image_data/lena.jpg''', 1)

				# convert to its negative
				a_			   =					convert_to_negative(img)

				# show result image
				imshow('''negative of original image''', img)
				waitKey(0)
				destroyAllWindows()









"""simple docstring"""

import copy
from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Audio, Features, Value
from .base import TaskTemplate







@dataclass(frozen=_UpperCAmelCase)
class    __lowercase     (					_UpperCAmelCase):







						"""simple docstring"""







						_A		:							str							       =		field(default="""automatic-speech-recognition"""					,    metadata={"""include_in_asdict_even_if_is_default""": True})
						_A		:							ClassVar[Features]							       =		Features({"""audio""": Audio()})
						_A		:							ClassVar[Features]							       =		Features({"""transcription""": Value("""string""")})
						_A		:							str							       =		"audio"
						_A		:							str							       =		"transcription"







						def 						__UpperCamelCase							(self   ,		lowercase__       ):
											if self.audio_column not in features:
																raise ValueError(f'Column {self.audio_column} is not present in features.'       )
											if not isinstance(features[self.audio_column]   ,		lowercase__       ):
																raise ValueError(f'Column {self.audio_column} is not an Audio type.'       )
											snake_case_					:		Optional[int] 					=					copy.deepcopy(self       )
											snake_case_					:		Tuple 					=					self.input_schema.copy()
											snake_case_					:		List[str] 					=					features[self.audio_column]
											snake_case_					:		Any 					=					input_schema
											return task_template







						@property
						def 						__UpperCamelCase							(self       ):
											return {self.audio_column: "audio", self.transcription_column: "transcription"}




