2 Course Administration
We use Python for a number of reasons:
- It is open source and therefore free
- It is platform independent, that is, this software runs on Windows or Linux PC’s as well as Apple computers
- Python has a large user base and is still growing in popularity. You will therefore be able to find a lot of material online in case you run into trouble and need expert help and/or good sources
- It’s superfun!
2.1 Installing Python
Next you have to download Python. If you are running Linux or Apple, some version of Python is already installed. However, these basic Python versions miss some of the important scientific packages that you will still have to install. The most important ones are numpy
, scipy
, and matplotlib
. If you “google” these packages you should be able to find them on the internet. They need to be installed.
I also recommend that you install an IDE for Python. One that is very amenable for scientific computation is called Spyder. Spyder is part of most Linux repositories and can easily be installed from there.
The easiest way to install Python and Spyder and all sorts of other useful packages for scientific computing is to install Python via the Anaconda distribution from: https://www.anaconda.com/download This is a simple one click installation process which works for Linux/Windows/Mac and it installs everything! When prompted which version you want to install go with the latest one for your system which at the time of writing this is Python 3.10. You should install the 64 bit version, not the 32 bit version.
2.2 Installing R and R Studio
To install R and R-Studio, follow these steps:
- Install R:
- Go to the CRAN (Comprehensive R Archive Network) website.
- Choose a CRAN mirror location near you.
- Download and run the R installer for your operating system (Windows, macOS, or Linux).
- Follow the installation instructions, which are usually straightforward.
- Install R-Studio:
- Go to the R-Studio download page.
- Choose the R-Studio Desktop edition (free version).
- Download the R-Studio installer for your operating system (Windows, macOS, or Linux).
- Run the installer and follow the installation instructions.
After completing these steps, you’ll have both R and R-Studio installed on your system. You can now open R-Studio, and it will work seamlessly with your R installation. R-Studio provides a user-friendly interface and various tools to help you work with R more effectively.
2.3 Submitting homework, the midterm and the final via Dropbox
A homework will be due every week. You need to submit the homework and all other assignments via Dropbox. There is a little bit of setup involved but it is not very complicated.
Go to Dropbox and sign up for a free account. This is a free account which gives you 2GB cloud disk space. It’s not immediately obvious from the Dropbox starting page how to sign up for the free account. On the left, below the two boxes you see a link that says get Dropbox Basic. Follow that link.
Download the Dropbox client on your computer and install it. This may take a couple minutes. You should now see a new Dropbox folder with a green marking on it in your folder structure. Usually under
user
but it depends on whether you are under windows, mac or linux.
- If you are under Windows you may have to start the Dropbox client by
hand each time you reboot the computer. You simply go to the Start menue button, start typing Dropbox in the search field and once the Dropbox link appears in the Start-Menue, right-click on it and click on Run as Administrator. This will start the client. You should see a small Dropbox symbol in your status line at the bottom that should say something like Dropbox Up to Date when you hover over it with the mouse pointer.
Accept the share-a-folder invitation that I sent out via Dropbox. I will email this invitation after our first class session.
You will find a folder structure in this shared folder that should be self explanatory, i.e., a homework folder for homework, a midterm folder for the midterm, etc. All the homework script file with extensions
.py
are already inside of this folder.When you work on a homework, simply open
Spyder
first. Then, from withinSpyder
navigate to this shared folder and open the homework script file that you want to work on. For the first homework this would be the file:homework1.py
. So openhomework1.py
from withinSpyder
and start editing it. Once you hit save the file will automatically be mirrored via Dropbox and I will see the updatedhomework1.py
file on my computer.No further action is required - the homework is already submitted.
PS: Please do not change the names of the scriptfiles.
A day or two later you will find a file called:
homework1_graded.py
with my comments and the point score for this assignment.