Skip to content

Instantly share code, notes, and snippets.

View dhoconno's full-sized avatar

David O'Connor dhoconno

View GitHub Profile
@dhoconno
dhoconno / auto-faculty-profile.py
Last active October 2, 2023 01:38 — forked from corneliusroemer/auto-faculty-profile.py
Automatically generate faculty profiles using pubmed abstracts and GPT-4, filtering papers for relevance based on author position
import argparse
from Bio import Entrez
import openai
import time
def search_latest_papers(faculty_id, affiliation, num_papers=25):
papers_info = []
Entrez.email = "[email protected]"
handle = Entrez.esearch(
db="pubmed",
@dhoconno
dhoconno / auto-faculty-profile.py
Last active September 26, 2023 02:02 — forked from corneliusroemer/auto-faculty-profile.py
Automatically generate faculty profiles using pubmed abstracts and GPT-4
import argparse
from math import e
from Bio import Entrez
import openai
## modified to return succinct summaries of five most recent papers
## todo: avoid stilted language construct while preserving key points
def search_latest_papers(faculty_name, affiliation, source="Pubmed", num_papers=5):
abstracts = []