diff --git a/module2/exo1/toy_notebook_fr.ipynb b/module2/exo1/toy_notebook_fr.ipynb index 0bbbe371b01e359e381e43239412d77bf53fb1fb..2754d7433cf151655347ee7255c33ba55194626c 100644 --- a/module2/exo1/toy_notebook_fr.ipynb +++ b/module2/exo1/toy_notebook_fr.ipynb @@ -1,25 +1,374 @@ { - "cells": [], + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Titre du document\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "4" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "2+2" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "10\n" + ] + } + ], + "source": [ + "x = 10\n", + "print(x)" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "12\n" + ] + } + ], + "source": [ + "x = x + 2\n", + "print(x)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "application/json": { + "cell": { + "!": "OSMagics", + "HTML": "Other", + "SVG": "Other", + "bash": "Other", + "capture": "ExecutionMagics", + "debug": "ExecutionMagics", + "file": "Other", + "html": "DisplayMagics", + "javascript": "DisplayMagics", + "js": "DisplayMagics", + "latex": "DisplayMagics", + "markdown": "DisplayMagics", + "perl": "Other", + "prun": "ExecutionMagics", + "pypy": "Other", + "python": "Other", + "python2": "Other", + "python3": "Other", + "ruby": "Other", + "script": "ScriptMagics", + "sh": "Other", + "svg": "DisplayMagics", + "sx": "OSMagics", + "system": "OSMagics", + "time": "ExecutionMagics", + "timeit": "ExecutionMagics", + "writefile": "OSMagics" + }, + "line": { + "alias": "OSMagics", + "alias_magic": "BasicMagics", + "autoawait": "AsyncMagics", + "autocall": "AutoMagics", + "automagic": "AutoMagics", + "autosave": "KernelMagics", + "bookmark": "OSMagics", + "cat": "Other", + "cd": "OSMagics", + "clear": "KernelMagics", + "colors": "BasicMagics", + "conda": "PackagingMagics", + "config": "ConfigMagics", + "connect_info": "KernelMagics", + "cp": "Other", + "debug": "ExecutionMagics", + "dhist": "OSMagics", + "dirs": "OSMagics", + "doctest_mode": "BasicMagics", + "ed": "Other", + "edit": "KernelMagics", + "env": "OSMagics", + "gui": "BasicMagics", + "hist": "Other", + "history": "HistoryMagics", + "killbgscripts": "ScriptMagics", + "ldir": "Other", + "less": "KernelMagics", + "lf": "Other", + "lk": "Other", + "ll": "Other", + "load": "CodeMagics", + "load_ext": "ExtensionMagics", + "loadpy": "CodeMagics", + "logoff": "LoggingMagics", + "logon": "LoggingMagics", + "logstart": "LoggingMagics", + "logstate": "LoggingMagics", + "logstop": "LoggingMagics", + "ls": "Other", + "lsmagic": "BasicMagics", + "lx": "Other", + "macro": "ExecutionMagics", + "magic": "BasicMagics", + "man": "KernelMagics", + "matplotlib": "PylabMagics", + "mkdir": "Other", + "more": "KernelMagics", + "mv": "Other", + "notebook": "BasicMagics", + "page": "BasicMagics", + "pastebin": "CodeMagics", + "pdb": "ExecutionMagics", + "pdef": "NamespaceMagics", + "pdoc": "NamespaceMagics", + "pfile": "NamespaceMagics", + "pinfo": "NamespaceMagics", + "pinfo2": "NamespaceMagics", + "pip": "PackagingMagics", + "popd": "OSMagics", + "pprint": "BasicMagics", + "precision": "BasicMagics", + "prun": "ExecutionMagics", + "psearch": "NamespaceMagics", + "psource": "NamespaceMagics", + "pushd": "OSMagics", + "pwd": "OSMagics", + "pycat": "OSMagics", + "pylab": "PylabMagics", + "qtconsole": "KernelMagics", + "quickref": "BasicMagics", + "recall": "HistoryMagics", + "rehashx": "OSMagics", + "reload_ext": "ExtensionMagics", + "rep": "Other", + "rerun": "HistoryMagics", + "reset": "NamespaceMagics", + "reset_selective": "NamespaceMagics", + "rm": "Other", + "rmdir": "Other", + "run": "ExecutionMagics", + "save": "CodeMagics", + "sc": "OSMagics", + "set_env": "OSMagics", + "store": "StoreMagics", + "sx": "OSMagics", + "system": "OSMagics", + "tb": "ExecutionMagics", + "time": "ExecutionMagics", + "timeit": "ExecutionMagics", + "unalias": "OSMagics", + "unload_ext": "ExtensionMagics", + "who": "NamespaceMagics", + "who_ls": "NamespaceMagics", + "whos": "NamespaceMagics", + "xdel": "NamespaceMagics", + "xmode": "BasicMagics" + } + }, + "text/plain": [ + "Available line magics:\n", + "%alias %alias_magic %autoawait %autocall %automagic %autosave %bookmark %cat %cd %clear %colors %conda %config %connect_info %cp %debug %dhist %dirs %doctest_mode %ed %edit %env %gui %hist %history %killbgscripts %ldir %less %lf %lk %ll %load %load_ext %loadpy %logoff %logon %logstart %logstate %logstop %ls %lsmagic %lx %macro %magic %man %matplotlib %mkdir %more %mv %notebook %page %pastebin %pdb %pdef %pdoc %pfile %pinfo %pinfo2 %pip %popd %pprint %precision %prun %psearch %psource %pushd %pwd %pycat %pylab %qtconsole %quickref %recall %rehashx %reload_ext %rep %rerun %reset %reset_selective %rm %rmdir %run %save %sc %set_env %store %sx %system %tb %time %timeit %unalias %unload_ext %who %who_ls %whos %xdel %xmode\n", + "\n", + "Available cell magics:\n", + "%%! %%HTML %%SVG %%bash %%capture %%debug %%file %%html %%javascript %%js %%latex %%markdown %%perl %%prun %%pypy %%python %%python2 %%python3 %%ruby %%script %%sh %%svg %%sx %%system %%time %%timeit %%writefile\n", + "\n", + "Automagic is ON, % prefix IS NOT needed for line magics." + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "%lsmagic" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total 60\n", + "-rw-r--r-- 1 jovyan users 6690 Jul 31 06:55 cars.png\n", + "-rw-r--r-- 1 jovyan users 19421 Jul 31 06:55 cosxsx.png\n", + "-rw-r--r-- 1 jovyan users 1291 Jul 31 06:55 toy_document_en.Rmd\n", + "-rw-r--r-- 1 jovyan users 1418 Jul 31 06:55 toy_document_fr.Rmd\n", + "-rw-r--r-- 1 jovyan users 3864 Jul 31 06:55 toy_document_orgmode_python_en.org\n", + "-rw-r--r-- 1 jovyan users 4008 Jul 31 06:55 toy_document_orgmode_python_fr.org\n", + "-rw-r--r-- 1 jovyan users 3281 Jul 31 06:55 toy_document_orgmode_R_en.org\n", + "-rw-r--r-- 1 jovyan users 3610 Jul 31 06:55 toy_document_orgmode_R_fr.org\n", + "-rw-r--r-- 1 jovyan users 441 Jul 31 06:55 toy_notebook_en.ipynb\n", + "-rw-r--r-- 1 jovyan users 441 Jul 31 06:55 toy_notebook_fr.ipynb\n" + ] + } + ], + "source": [ + "%%bash\n", + "ls -l" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "ename": "ERROR", + "evalue": "Error in eval(expr, envir, enclos): object 'll' not found\n", + "output_type": "error", + "traceback": [ + "Error in eval(expr, envir, enclos): object 'll' not found\nTraceback:\n" + ] + } + ], + "source": [ + "ll" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\t\n", + "\n", + "
speeddist
4 2
4 10
7 4
7 22
8 16
9 10
\n" + ], + "text/latex": [ + "\\begin{tabular}{r|ll}\n", + " speed & dist\\\\\n", + "\\hline\n", + "\t 4 & 2\\\\\n", + "\t 4 & 10\\\\\n", + "\t 7 & 4\\\\\n", + "\t 7 & 22\\\\\n", + "\t 8 & 16\\\\\n", + "\t 9 & 10\\\\\n", + "\\end{tabular}\n" + ], + "text/markdown": [ + "\n", + "speed | dist | \n", + "|---|---|---|---|---|---|\n", + "| 4 | 2 | \n", + "| 4 | 10 | \n", + "| 7 | 4 | \n", + "| 7 | 22 | \n", + "| 8 | 16 | \n", + "| 9 | 10 | \n", + "\n", + "\n" + ], + "text/plain": [ + " speed dist\n", + "1 4 2 \n", + "2 4 10 \n", + "3 7 4 \n", + "4 7 22 \n", + "5 8 16 \n", + "6 9 10 " + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "head(cars)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + " speed dist \n", + " Min. : 4.0 Min. : 2.00 \n", + " 1st Qu.:12.0 1st Qu.: 26.00 \n", + " Median :15.0 Median : 36.00 \n", + " Mean :15.4 Mean : 42.98 \n", + " 3rd Qu.:19.0 3rd Qu.: 56.00 \n", + " Max. :25.0 Max. :120.00 " + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "summary(cars)" + ] + } + ], "metadata": { "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" + "display_name": "R", + "language": "R", + "name": "ir" }, "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.3" + "codemirror_mode": "r", + "file_extension": ".r", + "mimetype": "text/x-r-source", + "name": "R", + "pygments_lexer": "r", + "version": "3.4.1" } }, "nbformat": 4, "nbformat_minor": 2 } -