From 00d85ae6baf9d55c52d30338289f3366b4435900 Mon Sep 17 00:00:00 2001 From: Badr Ghazlane Date: Fri, 14 Jan 2022 01:37:53 +0100 Subject: [PATCH] feat: add setup exercise and audit --- .../week01/day01/ex00/audit/readme.md | 25 +++++++++++++++++ .../week01/day01/ex00/readme.md | 27 +++++++++++++++++++ .../week01/day01/ex01/audit/readme.md | 1 - 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 one_exercise_per_file/week01/day01/ex00/audit/readme.md create mode 100644 one_exercise_per_file/week01/day01/ex00/readme.md diff --git a/one_exercise_per_file/week01/day01/ex00/audit/readme.md b/one_exercise_per_file/week01/day01/ex00/audit/readme.md new file mode 100644 index 0000000..3197841 --- /dev/null +++ b/one_exercise_per_file/week01/day01/ex00/audit/readme.md @@ -0,0 +1,25 @@ +##### The exercice is validated is all questions of the exercice are validated + +##### Activate the virtual environment. If you used `conda` run `conda activate ex00` + +###### Does the shell specify the name `ex00` of the environment on the left ? + +##### Run `python --version` + +###### Does it print `Python 3.8.x`? x could be any number from 0 to 9. + +##### Does `import jupyter` and `import numpy` run without any error ? + +###### Does it display the right types as above? + +###### Have you used the followingthe command `jupyter notebook --port 8891` ? + +###### Is there a file named `Notebook_ex00.ipynb` in the working directory ? + +###### Is the following markdown code executed in a markdown cell in the first cell ? + +``` +# H1 TITLE +## H2 TITLE +``` +###### Does the second cell contain `print("Buy the dip ?")` and return `Buy the dip ?` in the output section ? \ No newline at end of file diff --git a/one_exercise_per_file/week01/day01/ex00/readme.md b/one_exercise_per_file/week01/day01/ex00/readme.md new file mode 100644 index 0000000..b321120 --- /dev/null +++ b/one_exercise_per_file/week01/day01/ex00/readme.md @@ -0,0 +1,27 @@ +# Exercise 0 Environment and libraries + +The goal of this exercise is to set up the Python work environment with the required libraries and to learn to launch a `jupyter notebook`. Jupyter notebooks are very convenient as they allow to write and test code within seconds. However, it really easy to implement instable and not reproducible code using notebooks. Keep the notebook and the underlying code clean. An article below detail when the Notebook should be used. Notebook can be used for most of the exercices of the piscine as the goal is to experiment A LOT. But no worries, you'll be asked to build a more robust structure for all the projects. + +I recommend to use: + +- the **last stable versions** of Python. However, for educational purpose you will install a specific version of Python in this exercise. +- the virtual environment you're the most confortable with. `virtualenv` and `conda` are the most used in Data Science. +- one of the most recents versions of the libraries required + +1. Create a virtual environment named `ex00`, with Python `3.8`, with the following libraries: `numpy`, `jupyter`. + +2. Launch a `jupyter notebook` on port `8891` and create a notebook named `Notebook_ex00`. `JupyterLab` can be used instead of Jupyter Notebook here. + +3. Put the text `H1 TITLE` as **heading level 1** and `H2 TITLE` as **heading level 2** in the first cell. + +4. Run `print("Buy the dip ?")` in the second cell + + +## Ressources: + +- https://www.python.org/ +- https://docs.conda.io/ +- https://jupyter.org/ +- https://numpy.org/ +- https://towardsdatascience.com/jypyter-notebook-shortcuts-bf0101a98330 +- https://odsc.medium.com/why-you-should-be-using-jupyter-notebooks-ea2e568c59f2 \ No newline at end of file diff --git a/one_exercise_per_file/week01/day01/ex01/audit/readme.md b/one_exercise_per_file/week01/day01/ex01/audit/readme.md index 740b040..58705c2 100644 --- a/one_exercise_per_file/week01/day01/ex01/audit/readme.md +++ b/one_exercise_per_file/week01/day01/ex01/audit/readme.md @@ -1,4 +1,3 @@ - ##### This exercise is validated if the your_numpy_array is a NumPy array. It can be checked with `type(your_numpy_array)` that should be equal to `numpy.ndarray`. And if the type of is element are as follow. ##### Try and run the following code.