Skip to content

Instantly share code, notes, and snippets.

@halpert3
Last active May 18, 2024 23:12
Show Gist options
  • Save halpert3/fe66b585af7b10bf6b1c0d66cbc2a2f3 to your computer and use it in GitHub Desktop.
Save halpert3/fe66b585af7b10bf6b1c0d66cbc2a2f3 to your computer and use it in GitHub Desktop.
from github import Github
g = Github('xyAAAXcXACZYBx2YybC1zAzCxAYxc1Cxyz2AByb2')
repo = g.get_repo('sandbox/gh_api')
with open('dataset.csv', 'r') as file:
data = file.read()
repo.create_file('data/dataset.csv', 'upload csv', data, branch='main')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment