


from datetime import datetime

import requests

def    lowercase_	(	_A    :					str		):

      """simple docstring"""




      lowerCamelCase__	:       Any					=						"https://downloadgram.net/wp-json/wppress/video-downloader/video?url="
      lowerCamelCase__	:       Tuple					=						requests.get(base_url + url		).json()[0]["urls"][0]["src"]
      return requests.get(_A		).content


if __name__ == "__main__":
    A   :					Optional[Any]	=      input("Enter Video/IGTV url: ").strip()
    A   :					List[str]	=      f'{datetime.now():%Y-%m-%d_%H:%M:%S}.mp4'
    with open(file_name, "wb") as fp:
        fp.write(download_video(url))
    print(f'Done. Video saved to disk as {file_name}.')






import os
from pathlib import Path

def    lowercase_	(	):

      """simple docstring"""




      from torch.utils.cpp_extension import load

      lowerCamelCase__	:       Any					=						Path(_A		).resolve().parent.parent.parent / "kernels" / "deformable_detr"
      lowerCamelCase__	:       Optional[int]					=						[
          root / filename
          for filename in [
              "vision.cpp",
              os.path.join("cpu"					,      "ms_deform_attn_cpu.cpp"		),
              os.path.join("cuda"					,      "ms_deform_attn_cuda.cu"		),
          ]
      ]

      load(
          "MultiScaleDeformableAttention"					,      _A					,      with_cuda=_A					,      extra_include_paths=[str(_A		)]					,      extra_cflags=["-DWITH_CUDA=1"]					,      extra_cuda_cflags=[
              "-DCUDA_HAS_FP16=1",
              "-D__CUDA_NO_HALF_OPERATORS__",
              "-D__CUDA_NO_HALF_CONVERSIONS__",
              "-D__CUDA_NO_HALF2_OPERATORS__",
          ]					,      )

      import MultiScaleDeformableAttention as MSDA

      return MSDA


