From 032689605b8fd79dc233b81f47af6866ff8f248b Mon Sep 17 00:00:00 2001 From: 91c11c6589bdcf2449a00f33421e76a8 <91c11c6589bdcf2449a00f33421e76a8@app-learninglab.inria.fr> Date: Fri, 15 Dec 2023 15:43:52 +0000 Subject: [PATCH] jupyter notebook submission --- .../submission/mooc_rr_module3_sujet4.ipynb | 511 ++++++++++++++++++ 1 file changed, 511 insertions(+) create mode 100644 module3/exo3/submission/mooc_rr_module3_sujet4.ipynb 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 0000000..b1c9a66 --- /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