171k views
3 votes
How to upload kaggle notebook to github

User Crispin
by
8.2k points

1 Answer

6 votes

Final answer:

To upload a Kaggle notebook to GitHub, you need to save a copy of the notebook on your local machine, create a new repository on GitHub, and then upload the saved notebook file to the repository.

Step-by-step explanation:

To upload a Kaggle notebook to GitHub, follow these steps:

  1. First, ensure that you have a GitHub account and a Kaggle account.
  2. In your Kaggle notebook, click on the 'File' tab and select 'Save copy and edit.'
  3. Next to the 'Version' option, click on 'Save'; this downloads a JSON file to your local machine.
  4. Now, go to your GitHub account and create a new repository by clicking on the 'New' repository button.
  5. Enter the repository name and description, and choose whether you want to make it public or private. Once done, click on the 'Create repository' button.
  6. Now, on your local machine, find and open the JSON file you downloaded from Kaggle. Copy the contents of the file.
  7. Go back to the GitHub repository and click on the 'Add file' button. From the dropdown menu, select 'Create new file.'
  8. Give the file a name with a .ipynb extension (e.g., mynotebook.ipynb) and paste the copied JSON contents into the file.
  9. Scroll down and click on the 'Commit new file' button.
  10. Your Kaggle notebook is now uploaded to GitHub. You can access it by navigating to your GitHub repository and clicking on the notebook file.
User Faradey Inimicos
by
8.3k points