Skip to content

Instantly share code, notes, and snippets.

@everythingpython
Created August 26, 2024 20:07
Show Gist options
  • Select an option

  • Save everythingpython/d6a97bbd3534c532d148ea8a1efc851b to your computer and use it in GitHub Desktop.

Select an option

Save everythingpython/d6a97bbd3534c532d148ea8a1efc851b to your computer and use it in GitHub Desktop.
For hn_scraper
def get_sys_prompt(content_full):
prompt = f"Please go through the content and for each title \
return the topic of the content. If it's about Python, return Python. \
If it's about GenAI, return GenAI. Else return irrelevant:\n\n{content_full}"
return prompt
hacker_news_latest_url = "https://hacker-news.firebaseio.com/v0/newstories.json?print=pretty"
def hacker_news_get_article_url(i):
return f"https://hacker-news.firebaseio.com/v0/item/{i}.json?print=pretty"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment