Difference between revisions of "EGR 224/Spring 2023/Lab 00"

From PrattWiki
Jump to navigation Jump to search
(Created page with "== At The Beginning of Lab == * Go to [https://www.google.com https://www.google.com] and sign in; if you do not have a Google account, create one * In another tab in the same...")
 
(Open and run the findfits.ipynb notebook)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== At The Beginning of Lab ==
 
== At The Beginning of Lab ==
 +
 +
=== Create / Log-in to a Google Account ===
 
* Go to [https://www.google.com https://www.google.com] and sign in; if you do not have a Google account, create one
 
* Go to [https://www.google.com https://www.google.com] and sign in; if you do not have a Google account, create one
 +
 +
=== Log-in to Google Drive ===
 
* In another tab in the same browser, go to [https://drive.google.com https://drive.google.com]
 
* In another tab in the same browser, go to [https://drive.google.com https://drive.google.com]
 +
 +
=== Log-in to Google Colab ===
 
* In another tab in the same browser, go to [https://colab.research.google.com https://colab.research.google.com]
 
* In another tab in the same browser, go to [https://colab.research.google.com https://colab.research.google.com]
** Among other things, if you haven't gone here before, this will create a "Colab Notebooks" folder in your Google Drive
+
** In the Colab tab, click File and select "New notebook" - among other things, if you haven't gone here before, this will create a "Colab Notebooks" folder in your Google Drive
 +
 
 +
=== Get files from Sakai on your computer ===
 
* In another tab in the same browser, go to [https://sakai.duke.edu/ https://sakai.duke.edu/]  
 
* In another tab in the same browser, go to [https://sakai.duke.edu/ https://sakai.duke.edu/]  
* Get the sym_helpers.py file and put it in your Google Drive/Colab Notebooks/Helpers folder:
+
* Get the HW00soln.zip folder:
 
** In the Sakai tab:
 
** In the Sakai tab:
 
*** Go to the page for EGR 224
 
*** Go to the page for EGR 224
 
*** Click on the "Resources" link at left
 
*** Click on the "Resources" link at left
 
*** Click on the "HW 0 Files" folder in Resources
 
*** Click on the "HW 0 Files" folder in Resources
 +
*** Right-click the "HW00soln.zip" file and save it to your computer
 +
* Get the sym_helpers.py file:
 +
** In the Sakai tab:
 
*** Click on the "Helpers" folder in the "HW 0 Files" folder
 
*** Click on the "Helpers" folder in the "HW 0 Files" folder
 
*** Right-click the "sym_helper.py" file and save it to your computer
 
*** Right-click the "sym_helper.py" file and save it to your computer
** In the Google Drive tab, double-click on the "Colab Notebooks" folder to open it
+
 
*** Right-click in the blank space and create a new folder called "Helpers"
+
=== Expand and upload the HW00soln folder to Google Drive ===
*** Double-click the "Helpers" folder
+
* On your computer:
*** Go find where your downloaded "sym_helpers.py" and drag it into the "Helpers" folder
+
** Find and open the HW00soln.zip file
* Get the HW00soln zip, unzip it, and put that folder Google Drive/Colab Notebooks folder:
+
*** On Windows, click the "Extract all" icon at the top of the page when you open the file -- keep track of where it extracts the file to
** In the Sakai tab:
+
*** On macOS,  
*** Go to the page for EGR 224
+
* In the Google Drive tab, double-click on the "Colab Notebooks" folder to open it
*** Click on the "Resources" link at left
+
** Right-click in the blank space and select '''''"Folder Upload"'''''
*** Click on the "HW 0 Files" folder in Resources
+
** Go find where your extracted the "HW00soln" folder is and drag it into the "Colab Notebooks" folder
*** Right-click the "HW00soln.zip" file and save it to your computer
+
 
** On your computer:
+
=== Create a Helpers folder and upload sym_helper.py ===
*** Find and open the HW00soln.zip file
+
* In the Google Drive tab, double-click on the "Colab Notebooks" folder to open it
**** On Windows, click the "Extract all" icon at the top of the page when you open the file -- keep track of where it extracts the file to
+
** Right-click in the blank space and create a new folder called "Helpers"
**** On macOS,  
+
** Double-click the "Helpers" folder
** In the Google Drive tab, double-click on the "Colab Notebooks" folder to open it
+
** Go find where your downloaded "sym_helpers.py" and drag it into the "Helpers" folder
*** Right-click in the blank space and select "Folder Upload"
+
 
*** Go find where your extracted the "HW00soln" folder and drag it into the "Colab Notebooks" folder
+
=== Open and run the findfits.ipynb notebook ===
**** Note - the HW00soln folder you need is '''''inside''''' the HW00soln folder you extracted.  So find "HW00soln" and then click through that to find the "HW00soln" you actually want...
+
* In the Google Drive tab, double-click on "Colab Notebooks" then "HW00soln" then "findfits.ipynb" -- Google Colab should automatically open a new tab with the "findfits.ipynb" notebook.
* Open and run the "findfits.ipynb":
+
** If your browser tries to open findfits.ipynb but says there's no way to preview it instead of opening Google Colab, try this:
** In the Google Drive tab, double-click on "Colab Notebooks" then "HW00soln" then "findfits.ipynb" -- Google Colab should automatically open a new tab with the "findfits.ipynb" notebook.
+
*** At the top of the "no preview" page there should be a box with a down arrow on the right side
** In the "findfits.ipynb" tab, click "Runtime" and select "Run all".  As the notebook is running, it should ask if you will permit your notebook to access your Google Drive files.  You should allow it to...
+
*** Click the down arrow to add apps
* Access Dr. G's linear algebra examples
+
*** Scroll down in that window a little and Google Colaboratory should be there - click on it
** Open a new browser tab and point it at [https://drive.google.com/drive/folders/10NuAAl4yWpsapZesm2snnWOgMtBb-tP2?usp=sharing https://drive.google.com/drive/folders/10NuAAl4yWpsapZesm2snnWOgMtBb-tP2?usp=sharing]
+
*** Uninstall it, then install it
** Double-click on linalg_1_basic.ipynb
+
*** when you go back to the window, that box at the top will have "Open in Colaboratory" in it
 +
* In the "findfits.ipynb" tab, click "Runtime" and select "Run all".  As the notebook is running, it should ask if you will permit your notebook to access your Google Drive files.  You should allow it to...
 +
 
 +
=== Access Dr. G's linear algebra examples ===
 +
* Open a new browser tab and point it at [https://drive.google.com/drive/folders/10NuAAl4yWpsapZesm2snnWOgMtBb-tP2?usp=sharing https://drive.google.com/drive/folders/10NuAAl4yWpsapZesm2snnWOgMtBb-tP2?usp=sharing]
 +
* Double-click on linalg_1_basic.ipynb
 +
** Note: if you run it, you will get a "folder not found" error in one of the steps.  You can ignore that for now!
 +
 
 +
=== Open the Pundit page for the assignment ===
 +
* In another tab in the same browser, go to [[Homework 0|Homework 0]]
 +
 
 +
== At the end of lab ==
 +
* Install Google Drive for desktop: [https://support.google.com/drive/answer/7329379 Use Google Drive for desktop at home, work, or school].  This will allow you to have direct access to your Google Drive through the Explorer / Finder
 +
* Go to [https://sakai.duke.edu/ https://sakai.duke.edu/] and specifically to EGR 224
 +
** Click on the "Gradescope" link at left
 +
** Go to "Assignment 0"
 +
** Upload the five .ipynb files we made for "Homework 0"

Latest revision as of 13:48, 18 January 2023

At The Beginning of Lab

Create / Log-in to a Google Account

Log-in to Google Drive

Log-in to Google Colab

  • In another tab in the same browser, go to https://colab.research.google.com
    • In the Colab tab, click File and select "New notebook" - among other things, if you haven't gone here before, this will create a "Colab Notebooks" folder in your Google Drive

Get files from Sakai on your computer

  • In another tab in the same browser, go to https://sakai.duke.edu/
  • Get the HW00soln.zip folder:
    • In the Sakai tab:
      • Go to the page for EGR 224
      • Click on the "Resources" link at left
      • Click on the "HW 0 Files" folder in Resources
      • Right-click the "HW00soln.zip" file and save it to your computer
  • Get the sym_helpers.py file:
    • In the Sakai tab:
      • Click on the "Helpers" folder in the "HW 0 Files" folder
      • Right-click the "sym_helper.py" file and save it to your computer

Expand and upload the HW00soln folder to Google Drive

  • On your computer:
    • Find and open the HW00soln.zip file
      • On Windows, click the "Extract all" icon at the top of the page when you open the file -- keep track of where it extracts the file to
      • On macOS,
  • In the Google Drive tab, double-click on the "Colab Notebooks" folder to open it
    • Right-click in the blank space and select "Folder Upload"
    • Go find where your extracted the "HW00soln" folder is and drag it into the "Colab Notebooks" folder

Create a Helpers folder and upload sym_helper.py

  • In the Google Drive tab, double-click on the "Colab Notebooks" folder to open it
    • Right-click in the blank space and create a new folder called "Helpers"
    • Double-click the "Helpers" folder
    • Go find where your downloaded "sym_helpers.py" and drag it into the "Helpers" folder

Open and run the findfits.ipynb notebook

  • In the Google Drive tab, double-click on "Colab Notebooks" then "HW00soln" then "findfits.ipynb" -- Google Colab should automatically open a new tab with the "findfits.ipynb" notebook.
    • If your browser tries to open findfits.ipynb but says there's no way to preview it instead of opening Google Colab, try this:
      • At the top of the "no preview" page there should be a box with a down arrow on the right side
      • Click the down arrow to add apps
      • Scroll down in that window a little and Google Colaboratory should be there - click on it
      • Uninstall it, then install it
      • when you go back to the window, that box at the top will have "Open in Colaboratory" in it
  • In the "findfits.ipynb" tab, click "Runtime" and select "Run all". As the notebook is running, it should ask if you will permit your notebook to access your Google Drive files. You should allow it to...

Access Dr. G's linear algebra examples

Open the Pundit page for the assignment

  • In another tab in the same browser, go to Homework 0

At the end of lab