{ "cells": [ { "cell_type": "markdown", "metadata": { "tags": [] }, "source": [ "# Environment\n", "\n", "This repository collects [Jupyter](https://jupyter.org/) notebooks deployed using \n", "[Binder](https://mybinder.readthedocs.io/en/latest/introduction.html#what-is-a-binder).\n", "Please click on the previous links to find out more about notebooks.\n", "\n", "The directory ``binder`` contains some configuration files\n", "that are used to install ``clingo`` (see ``binder/environment.yml``), \n", "and to define a magic command (see ``binder/postBuild``)\n", "that allows us to run ``clingo`` on the cells whose first line starts with\n", "``%clingo`` just by clicking on them. \n", "\n", "If you want to save your changes while working online, \n", "you have to download the files that you have modified, \n", "and in the next session you have to upload them.\n", "For the download, go to the ``Files`` menu, \n", "tick the files that you want to download, and \n", "click the button ``Download``. \n", "For the upload, go to the ``Files`` menu, and click the button ``Upload``.\n", "\n", "### Working locally\n", "\n", "You can also work on the notebooks locally on your computer.\n", "In this way you will save your modified files normally, \n", "avoiding the hassle of downloading and uploading files.\n", "\n", "Instructions to install locally Jupyter Lab are available here: https://jupyterlab.readthedocs.io\n", "\n", "The sources of the notebooks for the whole course are available here: https://github.com/potassco-asp-course/notebooks/tree/WiSe21\n", "\n", "To configure locally the magic command `clingo`, please follow these steps:\n", "\n", "1. Locate your ipython profile with `ipython locate profile` (usually at `~/.ipython/profile_default`).\n", "\n", "2. Create a new file `config.ipy` inside the directory `startup`.\n", "\n", "3. Add the line `alias_magic clingo script -p \"clingo --no-raise-error\"` to `config.ipy`.\n", "\n", "4. If `jupyter` is running, restart the kernel.\n", "\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.9.7" } }, "nbformat": 4, "nbformat_minor": 4 }