Skip to content

3. Documentation

Ebenezer Jesuraj edited this page Nov 23, 2020 · 2 revisions

Git Clone the New Version of Code from the GitHub using the Command:

Linux Working Environment

(Pre-Requisites) Initializing .gitconfig File
Note:- Simply run the below Commands in the Linux Terminal.. Replace "your-username" and "your-email@gmail.com" with the User's Respective Info Provided in the GitHub Account..
git config --global user.name "your-username"
git config --global user.email "your-email@gmail.com"
git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=31536000'
Git Clone Command

Google Colab Working Environment

Note:- The User Should Know How to use Google Colab - Basics.. The User should also Initialize .gitconfig File in the Google Colab Environment by Running the git config commands..
  1. Open a New NoteBook Dedicated for this Repository (Always use the same Notebook)

  2. Linking Google Drive with Google Colab

Pre-Requisites:- Log into your GitHub Account in your Default Browser..

Command to be Run:

    from google.colab import drive
    drive.mount(‘/content/gdrive’)

Reason: To Hold the Source Code, Store the Generated Results in the User's Google Drive for Future Use..

  1. Linking GitHub with Google Colab (Recommended Instructions: To Clone a Private Repository, Can also be used to a Public Repository)
Note: You should have Collaboratory Privileages to the Respective Private Repository..
Command to be Run:

    import os
    from getpass import getpass
    import urllib

    user = input('User name: ')                 # Enter Your Full GitHub Account UserName..
    password = getpass('Password: ')            # Enter Your GitHub Account Password..
    password = urllib.parse.quote(password)     # Your password is converted into url format..
    repo_name = input('Repo name: ')            # Enter the Repo's Name with Repo Owner's Info.. (i.e) <Repo-Owner UserName> / <GitHub-Repo Name> 
                                                # In This Case.. (eg) paullu-ualberta/TSC.April.2020

    cmd_string = 'git clone https://{0}:{1}@github.com/{0}/{2}.git'.format(user, password, repo_name)

    os.system(cmd_string)
    cmd_string, password = "", "" # removing the password from the variable

How to Run the Code

Change in to the src Sub-Directory and then run the Menu Driven main.cpp Function and then follow the OnScreen Instruction..

Clone this wiki locally