Skip to content

Instantly share code, notes, and snippets.

@berndverst
Created June 29, 2021 16:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save berndverst/1db9bae37f3c809e5c3f56262c0a1092 to your computer and use it in GitHub Desktop.
Save berndverst/1db9bae37f3c809e5c3f56262c0a1092 to your computer and use it in GitHub Desktop.
Simple Copilot Example

Existing code:

import requests


def get_hacker_news_stories_by_search_term(search_term: str):
    """
    Get the stories from Hacker News mentioning the search term.
    """

Suggested code block:

url = 'https://hacker-news.firebaseio.com/v0/search.json?q={}'.format(search_term)
    response = requests.get(url)
    return response.json()
@berndverst
Copy link
Author

copilot

@berndverst
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment