diff --git a/module3/exo3/submission/mooc_rr_module3_sujet4.ipynb b/module3/exo3/submission/mooc_rr_module3_sujet4.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..b1c9a666722cad8e3c9b9bbab36cb46273227891 --- /dev/null +++ b/module3/exo3/submission/mooc_rr_module3_sujet4.ipynb @@ -0,0 +1,511 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Estimation de la latence et de la capacité d’une connexion à partir de mesures asymétriques" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Téléchargements des données" + ] + }, + { + "cell_type": "code", + "execution_count": 87, + "metadata": {}, + "outputs": [], + "source": [ + "%matplotlib inline\n", + "import matplotlib.pyplot as plt\n", + "import pandas as pd" + ] + }, + { + "cell_type": "code", + "execution_count": 88, + "metadata": {}, + "outputs": [], + "source": [ + "# Données de connexion courte à l'intérieur d'un campus\n", + "archive1_url = \"http://mescal.imag.fr/membres/arnaud.legrand/teaching/2014/RICM4_EP_ping/liglab2.log.gz\"\n", + "\n", + "# Données de connexion vers un site Web éloigné\n", + "archive2_url = \"http://mescal.imag.fr/membres/arnaud.legrand/teaching/2014/RICM4_EP_ping/stackoverflow.log.gz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Initialisation des données" + ] + }, + { + "cell_type": "code", + "execution_count": 89, + "metadata": {}, + "outputs": [], + "source": [ + "from urllib.request import urlopen\n", + "import gzip\n", + "import re\n", + "\n", + "archive = urlopen(archive1_url)\n", + "raw_data = gzip.decompress(archive.read())\n", + "lines = raw_data.decode('latin-1').strip().split('\\n')\n", + "\n", + "format_string = r'\\[(?P[\\d.]+)\\] (?P\\d+) bytes from lig-publig.imag.fr \\((?P[·\\d.]+)\\): icmp_seq=(?P\\d+) ttl=(?P\\d+) time=(?P