...
 
Commits (15)
# Journal de bord du Mooc / Mooc's logbook
FR
Espace réservé au journal de bord du Mooc
EN
Reserved for the Mooc's logbook
\ No newline at end of file
Meiling
-exprimen
\ No newline at end of file
test
\ No newline at end of file
# Partie 1
## Sous-partie 1 : texte
Une phrase sans rien
*Une phrase en italique*
**Une phrase en gras**
Un lien vers [fun-mooc.fr](https://www.fun-mooc.fr/)
Une ligne de `code`
## Sous-partie 2 : listes
**Liste à puce**
- item
- sous-item
- sous-item
- item
- item
**Liste numérotée**
1. item
2. item
3. item
## Sous-partie 3 : code
```
# Extrait de code
```
\ No newline at end of file
This diff is collapsed.
{
"cells": [],
"cells": [
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"14.113000000000001\n"
]
}
],
"source": [
"import numpy as np\n",
"\n",
"data = [14.0, 7.6, 11.2, 12.8, 12.5, 9.9, 14.9, 9.4, 16.9, 10.2, 14.9, 18.1, 7.3, 9.8, 10.9,12.2, 9.9, 2.9, 2.8, 15.4, 15.7, 9.7, 13.1, 13.2, 12.3, 11.7, 16.0, 12.4, 17.9, 12.2, 16.2, 18.7, 8.9, 11.9, 12.1, 14.6, 12.1, 4.7, 3.9, 16.9, 16.8, 11.3, 14.4, 15.7, 14.0, 13.6, 18.0, 13.6, 19.9, 13.7, 17.0, 20.5, 9.9, 12.5, 13.2, 16.1, 13.5, 6.3, 6.4, 17.6, 19.1, 12.8, 15.5, 16.3, 15.2, 14.6, 19.1, 14.4, 21.4, 15.1, 19.6, 21.7, 11.3, 15.0, 14.3, 16.8, 14.0, 6.8, 8.2, 19.9, 20.4, 14.6, 16.4, 18.7, 16.8, 15.8, 20.4, 15.8, 22.4, 16.2, 20.3, 23.4, 12.1, 15.5, 15.4, 18.4, 15.7, 10.2, 8.9, 21.0]\n",
"mean = np.mean(data)\n",
"print(mean)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2.8\n"
]
}
],
"source": [
"minimum = np.min(data)\n",
"print(minimum)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"23.4\n"
]
}
],
"source": [
"maximum = np.max(data)\n",
"print(maximum)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"14.5\n"
]
}
],
"source": [
"median = np.median(data)\n",
"print(median)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"4.334094455301447\n"
]
}
],
"source": [
"stDev = np.std(data, ddof=1)\n",
"print(stDev)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
......@@ -16,10 +110,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.3"
"version": "3.6.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
This diff is collapsed.
{
"cells": [],
"cells": [
{
"cell_type": "markdown",
"metadata": {
"hideCode": false,
"hidePrompt": false
},
"source": [
"# Useful links\n",
"\n",
"## For markdown:\n",
"- Page with good overview is [here in this MOOC](https://lms.fun-mooc.fr/courses/course-v1:inria+41016+self-paced/courseware/2bfe60a86fed4994b5493a220c38eb69/13f6fd96266746a0bd9d717a12f1f835/4?activate_block_id=block-v1%3Ainria%2B41016%2Bself-paced%2Btype%40vertical%2Bblock%4089c7893cb5aa4644b06569c65945d4d9)\n",
"\n",
"## For Python\n",
"- numpy documentation (used for statistics exercise) is [here on numpy.org](https://numpy.org/doc/stable/reference/generated/numpy.mean.html)\n",
"- matplotlib.pyplot is great for plotting and matplotlib has a great [documentation](https://matplotlib.org/) as well\n",
" - a useful general tutorial [here](https://matplotlib.org/stable/tutorials/introductory/pyplot.html)\n",
" - some information for [grid lines on this page](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.grid.html)\n",
" - for histogram plots [take this](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.hist.html)"
]
},
{
"cell_type": "markdown",
"metadata": {
"hideCode": false,
"hidePrompt": false
},
"source": [
"# Encountered problems \n",
"\n",
"## Exercise 3.2: had a weird error message when trying to execute the evaluation part:\n",
"\n",
"```\n",
"---------------------------------------------------------------------------\n",
"AssertionError Traceback (most recent call last)\n",
"<ipython-input-12-537d91e19818> in <module>\n",
" 4 first_september_week[1:]):\n",
" 5 one_year = sorted_data['inc'][week1:week2-1]\n",
"----> 6 assert abs(len(one_year)-52) < 2\n",
" 7 yearly_incidence.append(one_year.sum())\n",
" 8 year.append(week2.year)\n",
"\n",
"AssertionError: \n",
"```\n",
"\n",
"worked on it together with Eva Diaz, trying to figure out what the problem was, but couldn't find any solution... "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"With help of Eva understood that assertion error came from uncompleted year and the marked code line that said \"assert ...\", so deleted this line and worked through the rest of the code --> worked! Found strongest year 2009 and weakest year 2020."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"hide_code_all_hidden": false,
"kernelspec": {
"display_name": "Python 3",
"language": "python",
......@@ -16,10 +79,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.3"
"version": "3.6.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
......@@ -9,7 +9,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
......@@ -28,13 +28,17 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"data_url = \"http://www.sentiweb.fr/datasets/incidence-PAY-3.csv\""
"data_url = \"http://www.sentiweb.fr/datasets/incidence-PAY-3.csv\"\n",
"data_file = \"syndrome-grippal.csv\"\n",
"\n",
"import os\n",
"import urllib.request\n",
"if not os.path.exists(data_file): \n",
" urllib.request.urlretrieve(data_url, data_file)"
]
},
{
......@@ -364,7 +368,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.1"
"version": "3.6.4"
}
},
"nbformat": 4,
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.