"""simple docstring"""





from datetime import date

import requests

_UpperCamelCase       :						List[str]     =   "https://api.carbonintensity.org.uk/intensity"





def     a_					(				):





       '''simple docstring'''

       lowercase__      :		Any          =     requests.get(_lowerCAmelCase					).json()['data'][0]
       return last_half_hour["intensity"]["actual"]





def     a_					(				_lowerCAmelCase  :			List[Any]       ,			_lowerCAmelCase  :			str					):





       '''simple docstring'''

       return requests.get(f"""{BASE_URL}/{start}/{end}"""					).json()["data"]


if __name__ == "__main__":
       for entry in fetch_from_to(start=date(20_20, 10, 1), end=date(20_20, 10, 3)):
              print("from {from} to {to}: {intensity[actual]}".format(**entry))
       print(f'''{fetch_last_half_hour() = }''')


"""simple docstring"""





import torch

from transformers import PreTrainedModel

from .custom_configuration import CustomConfig, NoSuperInitConfig


class 					UpperCAmelCase_     (   _a):
      lowerCamelCase__		:   List[str]			  =  CustomConfig


      def __init__(       self		,      a							)	-> Optional[int]:
             super().__init__(a							)
             lowercase__      :		Any          =     torch.nn.Linear(config.hidden_size		,      config.hidden_size							)


      def 		_UpperCAmelCase	(       self		,      a							)	-> Union[str, Any]:
             return self.linear(a							)


      def 		_UpperCAmelCase	(       self		,      a							)	-> Tuple:
             pass





class 					UpperCAmelCase_     (   _a):
      lowerCamelCase__		:   Optional[int]			  =  NoSuperInitConfig


      def __init__(       self		,      a							)	-> int:
             super().__init__(a							)
             lowercase__      :		List[Any]          =     torch.nn.Linear(config.attribute		,      config.attribute							)


      def 		_UpperCAmelCase	(       self		,      a							)	-> Optional[int]:
             return self.linear(a							)


      def 		_UpperCAmelCase	(       self		,      a							)	-> Optional[Any]:
             pass

