

import argparse


lowercase_             =     'docs/source/_static/js/custom.js'
def   a   (    A__			:     Dict  )					->   int:





      """simple docstring"""



      with open(A__   ,     encoding='utf-8'   ,     newline='\n'  ) as f:
            _lowercase			 =f.readlines()
      _lowercase			 =0

      # First let's put the right version
      while not lines[index].startswith('const stableVersion ='  ):
            index += 1
      _lowercase			 =F'''const stableVersion = "v{version}"\n'''

      # Then update the dictionary
      while not lines[index].startswith('const versionMapping = {'  ):
            index += 1

      # We go until the end
      while not lines[index].startswith('}'  ):
            index += 1
      # We add the new version at the end
      lines[index - 1] += F'''    "v{version}": "v{version}",\n'''

      with open(A__   ,     'w'   ,     encoding='utf-8'   ,     newline='\n'  ) as f:
            f.writelines(A__  )


if __name__ == "__main__":
  lowercase_             =     argparse.ArgumentParser()
  parser.add_argument('--version', help='Release version.')
  lowercase_             =     parser.parse_args()
  update_custom_js(args.version)





import requests

lowercase_             =     'YOUR API KEY'
def   a   (    A__			:     str   ,     A__			:     str = giphy_api_key  )					->   list:





      """simple docstring"""



      _lowercase			 ='+'.join(query.split()  )
      _lowercase			 =F'''https://api.giphy.com/v1/gifs/search?q={formatted_query}&api_key={api_key}'''
      _lowercase			 =requests.get(A__  ).json()['data']
      return [gif["url"] for gif in gifs]


if __name__ == "__main__":
  print('\n'.join(get_gifs('space ship')))


