Setting Up a GitHub Repository with Jupyter Notebook
Installation:
- Install Git:
- Download and install Git for your operating system.
- Create a GitHub Account:
- Go to github.com and sign up for a free GitHub account.
- Install Anaconda:
- Download and install Anaconda for your operating system.
Cloning the Git Repository and Creating a Conda Environment:
-
Clone a Git Repository:
-
Open Anaconda Prompt (Windows) or Terminal (macOS/Linux).
-
Navigate to the directory where you want to store your project files using the
cd
command. -
Clone the Git repository by running the following command:
git clone https://github.com/yurisugano/Object-Ellicitation-NLP.git
-
Go into the Git repository folder by typining
cd Object-Ellicitation-NLP
-
-
Create a Conda Environment:
-
Create a new conda environment and install the required packages from the "requirements.txt" file:
conda env create
This will create a new conda environment with the required packages installed. `` Opening Jupyter Notebook:
-
-
Activate the Conda Environment:
-
Activate the newly created conda environment using the following command:
conda activate NLP
The beginning of your command prompt should now have (NLP)
-
Make the conda environment visible from Jupyter Notebook using:
python -m ipykernel install
-
-
Open Jupyter Notebook:
-
With the conda environment activated, start Jupyter Notebook by typing:
jupyter notebook
-
This will launch Jupyter Notebook in your default web browser.
-
Access the Jupyter Notebook File:
- In the Jupyter Notebook interface in your browser, navigate to the repository folder and click on the Jupyter Notebook file (
2023_ObjectEllicitationAnalysis.ipynb
).
- In the Jupyter Notebook interface in your browser, navigate to the repository folder and click on the Jupyter Notebook file (
-
Start Working with the Jupyter Notebook:
- The Jupyter Notebook will open, displaying the notebook's cells and content.
- To execute a cell, click on the cell and press Shift + Enter. Alternatively, you can use the "Run" button in the toolbar at the top of the notebook.
-
Edit and Save the Notebook:
- Edit the code and content in the notebook as needed.
- To add a new cell, click the
+
button in the toolbar or use the keyboard shortcutEsc + A
to add a cell above the current cell orEsc + B
to add a cell below the current cell. - Save the changes to your notebook by clicking "File" > "Save and Checkpoint" or press
Ctrl + S
.
-
Commit and Push Changes to GitHub:
-
Once you've made changes to the notebook, save it in Jupyter Notebook.
-
Go back to the Command Prompt or Terminal where your repository is located.
-
Use the following commands to commit your changes and push them to GitHub:
git add filename.ipynb # Replace filename with the actual notebook filename. git commit -m "Update notebook" git push origin main
-
Your changes will be updated in your GitHub repository.
-