






"""simple docstring"""
def 							lowercase__		(				lowerCamelCase = 1_000					):
				return sum(i for i in range(lowerCamelCase					) if i % 3 == 0 or i % 5 == 0					)


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









"""simple docstring"""
from typing import Dict, List, Optional, Union

import numpy as np

from ...image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict
from ...image_transforms import normalize, rescale, resize, to_channel_dimension_format
from ...image_utils import (
    IMAGENET_STANDARD_MEAN,
    IMAGENET_STANDARD_STD,
    ChannelDimension,
    ImageInput,
    PILImageResampling,
    make_list_of_images,
    to_numpy_array,
    valid_images,
)
from ...utils import TensorType, logging


lowerCAmelCase__							= logging.get_logger(__name__)


class _lowerCAmelCase	(						__UpperCAmelCase					):
						SCREAMING_SNAKE_CASE_:				List[str]   				=							['pixel_values']







						def __init__(						self      ,							lowerCAmelCase_ = True      ,							lowerCAmelCase_ = None      ,							lowerCAmelCase_ = PILImageResampling.BILINEAR      ,							lowerCAmelCase_ = True      ,							lowerCAmelCase_ = 1 / 2_5_5      ,							lowerCAmelCase_ = True      ,							lowerCAmelCase_ = None      ,							lowerCAmelCase_ = None      ,							**lowerCAmelCase_      ,							)		->       None:
										super().__init__(**lowerCAmelCase_       )
										_SCREAMING_SNAKE_CASE      :		str							=						size if size is not None else {'height': 2_2_4, 'width': 2_2_4}
										_SCREAMING_SNAKE_CASE      :		List[str]							=						get_size_dict(lowerCAmelCase_       )
										_SCREAMING_SNAKE_CASE      :		List[Any]							=						do_resize
										_SCREAMING_SNAKE_CASE      :		List[str]							=						do_rescale
										_SCREAMING_SNAKE_CASE      :		Union[str, Any]							=						do_normalize
										_SCREAMING_SNAKE_CASE      :		Optional[int]							=						size
										_SCREAMING_SNAKE_CASE      :		Optional[Any]							=						resample
										_SCREAMING_SNAKE_CASE      :		List[str]							=						rescale_factor
										_SCREAMING_SNAKE_CASE      :		List[Any]							=						image_mean if image_mean is not None else IMAGENET_STANDARD_MEAN
										_SCREAMING_SNAKE_CASE      :		Dict							=						image_std if image_std is not None else IMAGENET_STANDARD_STD







						def  A			(						self      ,							lowerCAmelCase_      ,							lowerCAmelCase_      ,							lowerCAmelCase_ = PILImageResampling.BILINEAR      ,							lowerCAmelCase_ = None      ,							**lowerCAmelCase_      ,							)		->       np.ndarray:
										_SCREAMING_SNAKE_CASE      :		List[str]							=						get_size_dict(lowerCAmelCase_       )
										if "height" not in size or "width" not in size:
														raise ValueError(F"""The `size` dictionary must contain the keys `height` and `width`. Got {size.keys()}"""       )
										return resize(
										    lowerCAmelCase_      ,							size=(size['height'], size['width'])      ,							resample=lowerCAmelCase_      ,							data_format=lowerCAmelCase_      ,							**lowerCAmelCase_       )







						def  A			(						self      ,							lowerCAmelCase_      ,							lowerCAmelCase_      ,							lowerCAmelCase_ = None      ,							**lowerCAmelCase_       )		->       np.ndarray:
										return rescale(lowerCAmelCase_      ,							scale=lowerCAmelCase_      ,							data_format=lowerCAmelCase_      ,							**lowerCAmelCase_       )







						def  A			(						self      ,							lowerCAmelCase_      ,							lowerCAmelCase_      ,							lowerCAmelCase_      ,							lowerCAmelCase_ = None      ,							**lowerCAmelCase_      ,							)		->       np.ndarray:
										return normalize(lowerCAmelCase_      ,							mean=lowerCAmelCase_      ,							std=lowerCAmelCase_      ,							data_format=lowerCAmelCase_      ,							**lowerCAmelCase_       )







						def  A			(						self      ,							lowerCAmelCase_      ,							lowerCAmelCase_ = None      ,							lowerCAmelCase_ = None      ,							lowerCAmelCase_ = None      ,							lowerCAmelCase_ = None      ,							lowerCAmelCase_ = None      ,							lowerCAmelCase_ = None      ,							lowerCAmelCase_ = None      ,							lowerCAmelCase_ = None      ,							lowerCAmelCase_ = None      ,							lowerCAmelCase_ = ChannelDimension.FIRST      ,							**lowerCAmelCase_      ,							)		->       Dict:
										_SCREAMING_SNAKE_CASE      :		List[str]							=						do_resize if do_resize is not None else self.do_resize
										_SCREAMING_SNAKE_CASE      :		Any							=						do_rescale if do_rescale is not None else self.do_rescale
										_SCREAMING_SNAKE_CASE      :		List[str]							=						do_normalize if do_normalize is not None else self.do_normalize
										_SCREAMING_SNAKE_CASE      :		Optional[int]							=						resample if resample is not None else self.resample
										_SCREAMING_SNAKE_CASE      :		List[str]							=						rescale_factor if rescale_factor is not None else self.rescale_factor
										_SCREAMING_SNAKE_CASE      :		Any							=						image_mean if image_mean is not None else self.image_mean
										_SCREAMING_SNAKE_CASE      :		Optional[Any]							=						image_std if image_std is not None else self.image_std

										_SCREAMING_SNAKE_CASE      :		Tuple							=						size if size is not None else self.size
										_SCREAMING_SNAKE_CASE      :		List[str]							=						get_size_dict(lowerCAmelCase_       )

										_SCREAMING_SNAKE_CASE      :		Dict							=						make_list_of_images(lowerCAmelCase_       )

										if not valid_images(lowerCAmelCase_       ):
														raise ValueError(
														    'Invalid image type. Must be of type PIL.Image.Image, numpy.ndarray, '
														    'torch.Tensor, tf.Tensor or jax.ndarray.'       )

										if do_resize and size is None:
														raise ValueError('Size must be specified if do_resize is True.'       )

										if do_rescale and rescale_factor is None:
														raise ValueError('Rescale factor must be specified if do_rescale is True.'       )

										# All transformations expect numpy arrays.
										_SCREAMING_SNAKE_CASE      :		Optional[Any]							=						[to_numpy_array(lowerCAmelCase_       ) for image in images]

										if do_resize:
														_SCREAMING_SNAKE_CASE      :		Dict							=						[self.resize(image=lowerCAmelCase_      ,							size=lowerCAmelCase_      ,							resample=lowerCAmelCase_       ) for image in images]

										if do_rescale:
														_SCREAMING_SNAKE_CASE      :		Optional[Any]							=						[self.rescale(image=lowerCAmelCase_      ,							scale=lowerCAmelCase_       ) for image in images]

										if do_normalize:
														_SCREAMING_SNAKE_CASE      :		str							=						[self.normalize(image=lowerCAmelCase_      ,							mean=lowerCAmelCase_      ,							std=lowerCAmelCase_       ) for image in images]

										_SCREAMING_SNAKE_CASE      :		Optional[int]							=						[to_channel_dimension_format(lowerCAmelCase_      ,							lowerCAmelCase_       ) for image in images]

										_SCREAMING_SNAKE_CASE      :		Union[str, Any]							=						{'pixel_values': images}
										return BatchFeature(data=lowerCAmelCase_      ,							tensor_type=lowerCAmelCase_       )

