Skip to content

Commit

Permalink
Updates on the use of Anaconda environment and PyCharm
Browse files Browse the repository at this point in the history
  • Loading branch information
angeltoribio-UPC-BCN committed Feb 27, 2018
1 parent e6204c5 commit e0d17de
Show file tree
Hide file tree
Showing 15 changed files with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion Lab01.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,57 @@ Create an AWS account and install AWS CLI following the following hands-on:
## Task 1.1:
Install Python on your laptop.

For these lab sessions we advice you to create a new anaconda environment using the bare minimum amount of Python packages. You will be adding more packages as you need them later.

Once the new environment is set you can hoover and see the path where the python interpreter and the packages have been installed.

<p align="center"><img src="./images/Lab01-AnacondaEnviron.png " alt="Lab05-1" title="New Anaconda Environment"/></p>

You can also open a terminal and examine your new environment.

<p align="center"><img src="./images/Lab01-AnacondaTerminal.png " alt="Lab05-1" title="Anaconda terminal"/></p>

Some unix commands also work in windows:

```bash
(CCBDA_UPC) C:\prompt> which python
/cygdrive/c/Anaconda/envs/CCBDA_UPC/python
```

That answer means that your python interpreter is at `c:\Anaconda\envs\CCBDA_UPC\python`. You will get a similar response if you are using a unix OS.

If you need to use the commands from that new environment you must make sure that the `PATH` variable (both windows and unix) contains the directory. To update that variable for windows. If your environment has a different name or it has been created in a different path change the command accordingly.

```bash
SET PATH=%PATH%;c:\Anaconda\envs\CCBDA_UPC;c:\Anaconda\envs\CCBDA_UPC\Scripts;
```

[PyCharm](https://www.jetbrains.com/pycharm/) is a very popular [IDE](https://en.wikipedia.org/wiki/Integrated_development_environment) that will make your life much easier. It supports execution and debugging of Python, Python environments, code version control, it has a built-in terminal and all kinds of plugins. Moreover, it is [completely free for students](https://www.jetbrains.com/buy/classroom/?product=pycharm).



## Task 1.2:
Create a python code that uses the “random” library. We will positively value if you build a creative program in python. The minimum example accepted will be a code that generates a random number between 1 and 20. Then let the player guess the number introduced, displaying if the number is too low or high. The game ends either when the number is guessed correctly. The suggested program name is `Lab1.guessnumber.py`.

If you are using PyCharm try to become familiar with the integrated debugger. You will need to debug your code in future sessions. On the top-right part of the IDE:

<p align="center"><img src="./images/Lab01-PyCharmEditConfig.png " alt="Lab05-1" title="Edit configuration"/></p>

Create a new configuration to run each Python Script:

<p align="center"><img src="./images/Lab01-PyCharmDebugConfig.png " alt="Lab05-1" title="New configuration"/></p>

Just to become familiar with the IDE, set some break points and examine the variables.


## Task 1.3:
Create a `private repository` **CLOUD-COMPUTING-CLASS-2018** in your GitHub account. Use your student email account (".upc.edu") to create your GitHub account to benefit from private repositories and other perks of the [student pack](https://education.github.com/pack).

We advice you to create a global folder with a subfolder for each lab session similarly as shown below:

<p align="center"><img src="./images/SolutionsFolder.png " alt="Lab01-1" title="Solutions Folder"/></p>

## Task 1.4:
## Task 1.4:
Update your remote repository from the local repository on your laptop:
```
echo "# CLOUD-COMPUTING-CLASS-2018" >> README.md
Expand Down
Binary file added images/Lab01-AnacondaEnviron.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/Lab01-AnacondaTerminal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/Lab01-PyCharmDebugConfig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/Lab01-PyCharmEditConfig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/Lab04-1.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/Lab04-10.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/Lab04-11.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/Lab04-2.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/Lab04-3.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/Lab04-5.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/Lab04-6.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/Lab04-7.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/Lab04-8.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/Lab04-9.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e0d17de

Please sign in to comment.