Getting Started with OpenAD§
Tl;dr§
Get started in your terminal:
Get started with Jupyter Notebook examples:
Warning
If you get an error when running init_magic
, you may first need to setup the default iPython profile for magic commands.
Getting Started - CLI§
-
Enter the virtual environment
-
Enter the command shell
Here you'll find further instructions on how to use OpenAD.
-
Exit the command shell
Hitctrl+c
or run: -
Run a single command from outside the command shell
-
Exit the virtual environment
-
Running Bash Commands
To run a command in bash mode, prepend it with
openad
and make sure to escape quotes.
Getting Started - Jupyter§
Setting up Jupyter§
The following commands only need to be run once after installation:
-
Activate your virtual environment
-
Create an iPython kernel
This ports your virtual environment to Jupyter.Note: List your installed iPython kernels:
jupyter kernelspec list
Remove a kernel:jupyter kernelspec uninstall ad-venv
-
Install the magic commands
This enables OpenAD commands to be run within a Jupyter Notebook.
Alternative: Manually add magic commands
-
Install example Notebooks
This installs our example Notebooks at~/openad_notebooks
.
Launching OpenAD in Jupyter§
-
Open any Notebook
Launch Jupyter lab to create a fresh notebook, or get started with our example Notebook: -
Select the kernel
Make sure to select the "ad-venv" iPython kernel you just created. You can do this under Kernel > Change Kernel, or by clicking the kernel name in the top right hand corner. If you don't see your iPython kernel, make sure you followed the Jupyter Setup instructions listed above. -
Magic Commands
Magic commands let you access any OpenAD CLI command from within Jupyter. They are invoked by the%openad
prefix. Try listing your files as a test:If you wish to retrieve data from an OpenAD command, you can use the
%openadd
prefix instead. This will return raw, unstyled data for further processing. For example:To see the available commands, you consult the Commands page, or you can request inline help: