In this file you will find practical informations on how to work this class. Daily activities and once-for-all setup(s) are separately described both for in-class lessons and study from-home.
These are the steps you need to be done before the lesson starts to effectively follow any in-class lesson:
- In Google Chrome, go to the class webpage at github.com/gabrielepompa88/IT-For-Business-And-Finance-2019-20.
- TIP: If not done already, add the class webpage to the list of favorites (see figure 1)
Figure 1: add class webpage to Google Chrome's list favorites |
- Open Anaconda Navigator and select the class conda environment
ITForBusAndFin2020_env
from the menu (see figure 2).
Figure 2: open Anaconda Navigator and select the class conda environment |
- Sync your local copy of the class repository to have the latest updated material of the class. To do this, do the following:
- In the Anaconda Navigator, open the console_shortcut app. A terminal window opens (see figure 6)
Figure 3: Open a Terminal window using the console_shorcut app in Anaconda Navigator |
- Navigate to folder
/Desktop/IT-For-Business-And-Finance-2019-20
, typing:
cd C:\Users\it-bf\Desktop\IT-For-Business-And-Finance-2019-20
- Do the syncing typing the following two commands (for an explanation of this commands see this answer in Stack Overflow, see also figure 4):
git fetch --all
git reset --hard origin/master
Figure 4: Syncing local copy of class repository with latest version |
WARNING: git reset
command will overwrite all changes to files in the class repository that are not in the dedicated IT-For-Business-And-Finance-2019-20/Personal_Notes
folder. That is, for example, if these changes were notes that you took while on a Jupyter Notebook while reading it, these notes will be lost!!! See section How to follow the lesson to effectively take notes during the lesson and section How to work at home to know how to retrieve those notes at home and how to take new ones at home while studying on Notebooks.
- Launch the Jupyer Notebook App (see figure 5). A new panel in Chrome opens, which lists the tree of all the directories in your machine (see figure 6)
Figure 5: launch the Jupyter Notebook app |
Figure 6: Jupyter Notebook App entry page with list of directories |
- In the newly opened Google Chrome's panel, navigate to folder
/Desktop/IT-For-Business-And-Finance-2019-20/Notebooks
(left-click on the blue links to step into a folder) and open the Notebook that you want clicking on the blue link to the.ipynb
file (see figure 7).
Figure 7: how to open a Notebook to follow the in-class lesson |
Let's suppose that you want to take notes on a Notebook - say Introduction_II.ipynb
- and, let's say you add extra code-cells to it, or make changes to text cells or so (see figure 8).
Figure 8: notes taken on a Jupyter Notebook. A new code-cell added |
When the lesson ends you want to keep studying on the modified notebook at home. Then you can:
- Rename your Notebook: simply clicking on the Notebook's name Introduction_II and give it a new name, for example Introduction_II___WITH_MY_NOTES (see figure 9).
Figure 9: rename the Notebook where you have taken notes to make it clear it's not the original one |
- Download the Notebook (see figure 10) as a Notebook (.ipynb).
![]() |
---|
Figure 10: download your notebook with your in-class notes and e-mail it to yourself |
- E-mail the renamed Notebook
Introduction_II___WITH_MY_NOTES.ipynb
to yourself.
WARNING: remember to log-off from gmail before you leave the IT class.
These are preliminary tasks to be done the first time that you work on this class from your personal computer.
- Download Anaconda (see figure 11):
- go to https://www.anaconda.com/distribution/#download-section
- on the top of the page, select the icon corresponding to your operating system (Windows, Max OS or Linux)
- click the green button Download under the Python 3.7 version section
- follow installation instructions (keep default configurations unless you have a sound reason)
Figure 11: download Anaconda |
- Download Git (see figure 12):
- go to https://git-scm.com/downloads
- in the Download section, click on the banner corresponding to your operating system (Windows, Max OS or Linux/Unix) and download the program
- follow installation instructions (keep default configurations unless you have a sound reason)
Figure 12: download Git |
- clone the IT-For-Business-And-Finance-2019-20 class repository into your
/Desktop
folder (see figure 13):
- move to your Desktop folder. Type:
cd C:\Users\[$YOUR_USER_NAME]\Desktop
where [$YOUR_USER_NAME]
has to be substituted with your appropriate user name in your computer.
- Make the clone. Type:
git clone https://github.com/gabrielepompa88/IT-For-Business-And-Finance-2019-20.git
Figure 13: git clone the class repository into your /Desktop folder |
You will see that a newly created /IT-For-Business-And-Finance-2019-20
is created in your /Desktop
folder.
- In the newly created class local folder
/Desktop/IT-For-Business-And-Finance-2019-20
there is an environment setup fileITForBusAndFin2020_env_setup.yml
from which the dedicated ITForBusAndFin2020_env Conda environment can be created. This new conda environment contains all the packages needed for the course. Follow these steps to create and activate it (see figure 14):
-
In the Anaconda Navigator, click on Environments
-
at the bottom, click on Import
-
next to Specification File browse for file
ITForBusAndFin2020_env_setup.yml
in your newly created/Desktop/IT-For-Business-And-Finance-2019-20
folder -
click open: a new environment ITForBusAndFin2020_env gets created.
-
switch to the newly created ITForBusAndFin2020_env environment.
-
TIP: under Environment section, on the right, there is the list of packages installed under the newly created ITForBusAndFin2020_env environment. Among many, you should find the following packages and version installed:
Python 3.7.4
Numpy 1.16.5
Scipy 1.3.1
Pandas 0.25.1
Matplotlib 3.1.1
Figure 14: importing class conda environment ITForBusAndFin2020_env Conda environment |
When you are at home and want to study for this class, you can do the following:
- Follow all the steps (0., 1., 2., 3. and 4.) explained in section Before the lessons starts on your computer.
-
TIP: make appropriate changes to folder paths when needed. In particular, to navigate to folder
/Desktop/IT-For-Business-And-Finance-2019-20
, the command to be typed will be something like:cd C:\Users\[$YOUR_USER_NAME]\Desktop\IT-For-Business-And-Finance-2019-20
where [$YOUR_USER_NAME]
has to be substituted with your appropriate user name in your computer.
- Go to your email application and put the e-mailed Notebook(s) (in the example from section How to follow the lesson, we emailed to ourselves the renamed
Introduction_II___WITH_MY_NOTES.ipynb
Notebook with notes taken during a lesson) into the/IT-For-Business-And-Finance-2019-20/Personal_Notes
folder of your computer (see figure 11).
Figure 11: save the notebook with notes in the /IT-For-Business-And-Finance-2019-20/Personal_Notes of your computer |
- Work on the Notebook
Introduction_II___WITH_MY_NOTES.ipynb
or any other Notebook or file in/IT-For-Business-And-Finance-2019-20
folder using the Jupyter Notebook App or the Spyder App of the Anaconda Navigator, but
- WARNING: any file that you modify in the folder
/IT-For-Business-And-Finance-2019-20
that is not in/IT-For-Business-And-Finance-2019-20/Personal_Notes
sub-folder will be over-written by thegit-reset
command. Therefore, if you want to study on a Notebook/file and make changes/notes/experiments to it, just copy-n-paste the file into /Personal_Notes folder. Also, if you want to create new files (Notebooks, script, data, whatever) and want to be sure it won't be touched.. then create any new personal file into /Personal_Notes folder.