This repository collects Jupyter notebooks deployed using Binder. Please click on the previous links to find out more about notebooks.
The directory binder
contains some configuration files
that are used to install clingo
(see binder/environment.yml
),
and to define a magic command (see binder/postBuild
)
that allows us to run clingo
on the cells whose first line starts with
%clingo
just by clicking on them.
If you want to save your changes while working online,
you have to download the files that you have modified,
and in the next session you have to upload them.
For the download, go to the Files
menu,
tick the files that you want to download, and
click the button Download
.
For the upload, go to the Files
menu, and click the button Upload
.
You can also work on the notebooks locally on your computer. In this way you will save your modified files normally, avoiding the hassle of downloading and uploading files.
Instructions to install locally Jupyter Lab are available here: https://jupyterlab.readthedocs.io
The sources of the notebooks for the whole course are available here: https://github.com/potassco-asp-course/notebooks/tree/WiSe21
To configure locally the magic command clingo
, please follow these steps:
Locate your ipython profile with ipython locate profile
(usually at ~/.ipython/profile_default
).
Create a new file config.ipy
inside the directory startup
.
Add the line alias_magic clingo script -p "clingo --no-raise-error"
to config.ipy
.
If jupyter
is running, restart the kernel.