{ "cells": [ { "cell_type": "markdown", "metadata": { "hideCode": false, "hidePrompt": false }, "source": [ "# Hoofdstuk1\n", "Dit is de eerste regel van hoofdstuk1" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "hideCode": false, "hidePrompt": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "3.1415\n", "4.141500000000001\n" ] } ], "source": [ "x =3.1415\n", "print(x)\n", "print(x+1)" ] }, { "cell_type": "markdown", "metadata": { "hideCode": false, "hidePrompt": false }, "source": [ "## Hoofdstuk2\n", "Dit is de eerste regel van hoofdstuk2" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "hideCode": false, "hidePrompt": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2.718281828459045\n" ] } ], "source": [ "import math\n", "y = math.exp(1)\n", "print(y)" ] }, { "cell_type": "markdown", "metadata": { "hideCode": false, "hidePrompt": false }, "source": [ "Dit is een doodgewone tekst over de constante `e` met waarde {{y}}\n", "\n", "$P(A \\mid B) = \\frac{P(B \\mid A)P(A)}{P(B)}$" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "3.6.4 |Anaconda, Inc.| (default, Mar 13 2018, 01:15:57) \n", "[GCC 7.2.0]\n" ] }, { "data": { "text/plain": [ "0" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import sys\n", "print(sys.version)\n", "\n", "import os\n", "os.system('jupyter nbconvert --to html speel_schrijfboekje.ipynb')" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "cars.png\t\t toy_document_orgmode_python_en.org\r\n", "cosxsx.png\t\t toy_document_orgmode_python_fr.org\r\n", "speel_schrijfboekje.html toy_document_orgmode_R_en.org\r\n", "speel_schrijfboekje.ipynb toy_document_orgmode_R_fr.org\r\n", "toy_document_en.Rmd\t toy_notebook_en.ipynb\r\n", "toy_document_fr.Rmd\t toy_notebook_fr.ipynb\r\n" ] } ], "source": [ "!ls" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "%load_ext rpy2.ipython" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "R version 3.4.1 (2017-06-30)\n", "Platform: x86_64-pc-linux-gnu (64-bit)\n", "Running under: Ubuntu 18.04.3 LTS\n", "\n", "Matrix products: default\n", "BLAS: /opt/conda/lib/R/lib/libRblas.so\n", "LAPACK: /opt/conda/lib/R/lib/libRlapack.so\n", "\n", "locale:\n", " [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n", " [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n", " [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n", " [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n", " [9] LC_ADDRESS=C LC_TELEPHONE=C \n", "[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n", "\n", "attached base packages:\n", "[1] tools stats graphics grDevices utils datasets methods \n", "[8] base \n", "\n", "loaded via a namespace (and not attached):\n", "[1] compiler_3.4.1\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%R\n", "sessionInfo()" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "Usage: \n", " /opt/conda/bin/python -m pip [options]\n", "\n", "Commands:\n", " install Install packages.\n", " download Download packages.\n", " uninstall Uninstall packages.\n", " freeze Output installed packages in requirements format.\n", " list List installed packages.\n", " show Show information about installed packages.\n", " check Verify installed packages have compatible dependencies.\n", " config Manage local and global configuration.\n", " search Search PyPI for packages.\n", " wheel Build wheels from your requirements.\n", " hash Compute hashes of package archives.\n", " completion A helper command used for command completion.\n", " debug Show information useful for debugging.\n", " help Show help for commands.\n", "\n", "General Options:\n", " -h, --help Show help.\n", " --isolated Run pip in an isolated mode, ignoring\n", " environment variables and user configuration.\n", " -v, --verbose Give more output. Option is additive, and can be\n", " used up to 3 times.\n", " -V, --version Show version and exit.\n", " -q, --quiet Give less output. Option is additive, and can be\n", " used up to 3 times (corresponding to WARNING,\n", " ERROR, and CRITICAL logging levels).\n", " --log Path to a verbose appending log.\n", " --proxy Specify a proxy in the form\n", " [user:passwd@]proxy.server:port.\n", " --retries Maximum number of retries each connection should\n", " attempt (default 5 times).\n", " --timeout Set the socket timeout (default 15 seconds).\n", " --exists-action Default action when a path already exists:\n", " (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.\n", " --trusted-host Mark this host or host:port pair as trusted,\n", " even though it does not have valid or any HTTPS.\n", " --cert Path to alternate CA bundle.\n", " --client-cert Path to SSL client certificate, a single file\n", " containing the private key and the certificate\n", " in PEM format.\n", " --cache-dir Store the cache data in .\n", " --no-cache-dir Disable the cache.\n", " --disable-pip-version-check\n", " Don't periodically check PyPI to determine\n", " whether a new version of pip is available for\n", " download. Implied with --no-index.\n", " --no-color Suppress colored output\n", " --no-python-version-warning\n", " Silence deprecation warnings for upcoming\n", " unsupported Pythons.\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } ], "source": [ "pip -help" ] } ], "metadata": { "hide_code_all_hidden": false, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "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.4" } }, "nbformat": 4, "nbformat_minor": 2 }