Commit 3febf603 authored by Matthieu Boileau's avatar Matthieu Boileau
Browse files

Update from mm2act

parent cac8027d
......@@ -6,8 +6,8 @@ chapter_preview_only:
- 4
- 5
- 6
# book:
# file: cours-python.pdf
book:
file: cours-python.pdf
picture:
path: img/python-logo_full.png
width: 300px
......@@ -21,16 +21,16 @@ links:
manual:
title: Notice
target: manual.html
# binder:
# title: Exécuter
# target: https://mybinder.org/v2/git/https%3A%2F%2Fgitlab.math.unistra.fr%2Furfist%2Fcours-python/urfist?filepath=notebooks
# book:
# title: Version pdf
# gitlab:
# title: Sources
# target: https://gitlab.math.unistra.fr/urfist/cours-python
# archive:
# title: Archive complète
binder:
title: Exécuter
target: https://mybinder.org/v2/git/https%3A%2F%2Fgitlab.math.unistra.fr%2Furfist%2Fcours-python/urfist?filepath=notebooks
book:
title: Version pdf
gitlab:
title: Sources
target: https://gitlab.math.unistra.fr/urfist/cours-python
archive:
title: Archive complète
license:
text: Contenu mis à disposition sous licence
target: https://creativecommons.org/licenses/by-sa/4.0/
......
......@@ -335,7 +335,7 @@
"slideshow": {
"slide_type": "-"
},
"solution2": "shown",
"solution2": "hidden",
"solution2_first": true
},
"source": [
......@@ -345,7 +345,7 @@
{
"cell_type": "markdown",
"metadata": {
"solution2": "shown"
"solution2": "hidden"
},
"source": [
"Pas si vite ! Êtes-vous sûr ? Vraiment ? \n",
......@@ -358,7 +358,7 @@
"slideshow": {
"slide_type": "slide"
},
"solution2": "shown",
"solution2": "hidden",
"solution2_first": true
},
"source": [
......@@ -373,7 +373,7 @@
"slideshow": {
"slide_type": "-"
},
"solution2": "shown"
"solution2": "hidden"
},
"source": [
"Pas si vite ! Êtes-vous sûr ? Vraiment ? \n",
......
......@@ -11,6 +11,7 @@ import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
import ssl
from io import BytesIO
context = ssl._create_unverified_context()
......@@ -49,7 +50,7 @@ ax.set_ylabel('Temperature [deg. C]')
ax.plot(t[0], t[1]) # plot t[1] (tempe) as a function of t[0] (hour)
# Add meteo icon to plot
icon = urllib.request.urlopen(day['icon_big'], context=context) # Open weather icon
icon = BytesIO(urllib.request.urlopen(day['icon_big'], context=context).read()) # Open weather icon
axicon = fig.add_axes([0.8, 0.8, 0.15, 0.15])
img = mpimg.imread(icon) # initialise image
......
......@@ -11,6 +11,7 @@ import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
import ssl
from io import BytesIO
context = ssl._create_unverified_context()
......@@ -69,8 +70,9 @@ def plot_day_tempe(city_json, day_key):
ax.plot(t[0], t[1]) # plot t[1] (tempe) as a function of t[0] (hour)
# Add meteo icon to plot
icon = urllib.request.urlopen(day['icon_big'], context=context) # Open weather icon
# Open weather icon
response = urllib.request.urlopen(day['icon_big'], context=context)
icon = BytesIO(response.read())
axicon = fig.add_axes([0.8, 0.8, 0.15, 0.15])
img = mpimg.imread(icon) # initialise image
axicon.set_xticks([]) # Remove axes ticks
......
......@@ -11,6 +11,7 @@ import json
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
from io import BytesIO
def get_city_json(city_name):
......@@ -62,7 +63,7 @@ def plot_day_tempe(city_json, day_key):
ax.plot(t[0], t[1]) # plot t[1] (tempe) as a function of t[0] (hour)
# Add meteo icon to plot
icon = urllib.request.urlopen(day['icon_big']) # Open weather icon
icon = BytesIO(urllib.request.urlopen(day['icon_big']).read()) # Open weather icon
axicon = fig.add_axes([0.8, 0.8, 0.15, 0.15])
img = mpimg.imread(icon) # initialise image
......
......@@ -5,12 +5,12 @@ parent: manual.md
## Download
Download <a href="https://www.anaconda.com/download"><img src="fig/anaconda.png" style="display:inline" alt="Anaconda logo" width="100px"></a> for Python 3.X for your operating system and install it.
Download <a href="https://www.anaconda.com/download"><img src="img/anaconda.png" style="display:inline;vertical-align:bottom;" alt="Anaconda logo" width="100px"></a> for Python 3.X for your operating system and install it.
On Linux, open *Terminal* application and type:
```bash
cd Download
cd Downloads
bash ./Anaconda*.sh
```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment