All Projects → Calysto → Octave_kernel

Calysto / Octave_kernel

Licence: bsd-3-clause
An Octave kernel for IPython

Projects that are alternatives of or similar to Octave kernel

Cs231nassignment
Stanford CS231n assignment in 2019 spring
Stars: ✭ 358 (+0.28%)
Mutual labels:  jupyter-notebook
Portrait Segmentation
Real-time portrait segmentation for mobile devices
Stars: ✭ 358 (+0.28%)
Mutual labels:  jupyter-notebook
Deep learning coronavirus cure
Using deep learning to generate novel molecules as candidates for binding with coronavirus protease
Stars: ✭ 361 (+1.12%)
Mutual labels:  jupyter-notebook
Predicting Poverty
Combining satellite imagery and machine learning to predict poverty
Stars: ✭ 358 (+0.28%)
Mutual labels:  jupyter-notebook
Graphgym
Platform for designing and evaluating Graph Neural Networks (GNN)
Stars: ✭ 344 (-3.64%)
Mutual labels:  jupyter-notebook
Text summurization abstractive methods
Multiple implementations for abstractive text summurization , using google colab
Stars: ✭ 359 (+0.56%)
Mutual labels:  jupyter-notebook
Stock Prediction Models
Gathers machine learning and deep learning models for Stock forecasting including trading bots and simulations
Stars: ✭ 4,660 (+1205.32%)
Mutual labels:  jupyter-notebook
Machine Learning Projects
Machine Learning Experiments and Work
Stars: ✭ 356 (-0.28%)
Mutual labels:  jupyter-notebook
Www20 Hands On Tutorial
Materials for DGL hands-on tutorial in WWW 2020
Stars: ✭ 359 (+0.56%)
Mutual labels:  jupyter-notebook
Question generation
Neural question generation using transformers
Stars: ✭ 356 (-0.28%)
Mutual labels:  jupyter-notebook
Python for geosciences
Introduction to python use in geosciences.
Stars: ✭ 357 (+0%)
Mutual labels:  jupyter-notebook
Keras Quora Question Pairs
A Keras model that addresses the Quora Question Pairs dyadic prediction task.
Stars: ✭ 359 (+0.56%)
Mutual labels:  jupyter-notebook
Machinelearning Deeplearning Nlp Leetcode Statisticallearningmethod Tensorflow
最近在学习机器学习,深度学习,自然语言处理,统计学习方法等知识,理论学习主要根据readme的链接,在学习理论的同时,决定自己将学习的相关算法用Python实现一遍,并结合GitHub上相关大牛的代码进行改进,本项目会不断的更新相关算法,欢迎star,fork和关注。 主要包括: 1.吴恩达Andrew Ng老师的机器学习课程作业个人笔记 Python实现, 2.deeplearning.ai(吴恩达老师的深度学习课程笔记及资源) Python实现, 3.李航《统计学习方法》 Python代码实现, 4.自然语言处理NLP 牛津大学xDeepMind Python代码实现, 5.LeetCode刷题,题析,分析心得笔记 Java和Python代码实现, 6.TensorFlow人工智能实践代码笔记 北京大学曹健老师课程和TensorFlow:实战Google深度学习框架(第二版) Python代码实现, 附带一些个人心得和笔记。GitHub上有很多机器学习课程的代码资源,我也准备自己实现一下,后续会更新笔记,代码和百度云网盘链接。 这个项目主要是学习算法的,并且会不断更新相关资源和代码,欢迎关注,star,fork! Min's blog 欢迎访问我的博客主页! (Welcome to my blog website !)https://liweimin1996.github.io/
Stars: ✭ 359 (+0.56%)
Mutual labels:  jupyter-notebook
Spotmicroai
SpotMicro AI - How to build a self-learning Robot
Stars: ✭ 357 (+0%)
Mutual labels:  jupyter-notebook
Pytorch objectdetecttrack
Object detection in images, and tracking across video frames
Stars: ✭ 358 (+0.28%)
Mutual labels:  jupyter-notebook
Paintschainer
line drawing colorization using chainer
Stars: ✭ 3,612 (+911.76%)
Mutual labels:  jupyter-notebook
Predicting Car Price From Scraped Data
Picture and specifications scraper
Stars: ✭ 360 (+0.84%)
Mutual labels:  jupyter-notebook
Ivpid
Python PID Controller
Stars: ✭ 361 (+1.12%)
Mutual labels:  jupyter-notebook
Tensorflow Learning
B站上炼数成金的公开课笔记
Stars: ✭ 360 (+0.84%)
Mutual labels:  jupyter-notebook
Modern Nlp In Python
Stars: ✭ 360 (+0.84%)
Mutual labels:  jupyter-notebook

An Octave kernel for Jupyter

.. image:: https://mybinder.org/badge_logo.svg :target: https://mybinder.org/v2/gh/Calysto/octave_kernel/master?urlpath=/lab/tree/octave_kernel.ipynb

Prerequisites

Jupyter Notebook <http://jupyter.readthedocs.org/en/latest/install.html>_ and GNU Octave_.

It is recommended to also install gnuplot for Octave to enable inline plotting.

Installation

To install using pip::

pip install octave_kernel

Add --user to install in the user-level environment instead of the system environment.

To install using conda::

conda config --add channels conda-forge
conda install octave_kernel
conda install texinfo # For the inline documentation (shift-tab) to appear.

We require the octave-cli executable to run the kernel. Add that executable's directory to the PATH environment variable or use the OCTAVE_EXECUTABLE to point to the executable itself. Note that on Octave 5 on Windows, the executable is in "Octave-5.x.x.x\mingw64\bin".

We automatically install a Jupyter kernelspec when installing the python package. This location can be found using jupyter kernelspec list. If the default location is not desired, remove the directory for the octave kernel, and install using python -m octave_kernel install. See python -m octave_kernel install --help for available options.

Usage

To use the kernel, run one of:

.. code:: shell

jupyter notebook  # or ``jupyter lab``, if available
# In the notebook interface, select Octave from the 'New' menu
jupyter qtconsole --kernel octave
jupyter console --kernel octave

This kernel is based on MetaKernel <http://pypi.python.org/pypi/metakernel>_, which means it features a standard set of magics (such as %%html). For a full list of magics, run %lsmagic in a cell.

A sample notebook is available online_.

Configuration

The kernel can be configured by adding an octave_kernel_config.py file to the jupyter config path. The OctaveKernel class offers plot_settings, inline_toolkit, kernel_json, and cli_options as configurable traits. The available plot settings are: 'format', 'backend', 'width', 'height', 'resolution', and 'plot_dir'.

.. code:: bash

cat ~/.jupyter/octave_kernel_config.py
# use Qt as the default backend for plots
c.OctaveKernel.plot_settings = dict(backend='qt')

The path to the Octave kernel JSON file can also be specified by creating an OCTAVE_KERNEL_JSON environment variable.

The command line options to Octave can also be specified with an OCTAVE_CLI_OPTIONS environment variable. The cli options be appended to the default opions of --interactive --quiet --no-init-file. Note that the init file is explicitly called after the kernel has set more off to prevent a lockup when the pager is invoked in ~/.octaverc.

The inline toolkit is the graphics_toolkit used to generate plots for the inline backend. It defaults to gnuplot. The different backend can be used for inline plotting either by using this configuration or by using the plot magic and putting the backend name after inline:, e.g. plot -b inline:fltk.

Troubleshooting

Kernel Times Out While Starting

If the kernel does not start, run the following command from a terminal:

.. code:: shell

    python -m octave_kernel.check

This can help diagnose problems with setting up integration with Octave.  If in doubt,
create an issue with the output of that command.


Kernel is Not Listed
~~~~~~~~~~~~~~~~~~~~
If the kernel is not listed as an available kernel, first try the following command:

.. code:: shell

    python -m octave_kernel install --user

If the kernel is still not listed, verify that the following point to the same
version of python:

.. code:: shell

    which python  # use "where" if using cmd.exe
    which jupyter


Gnuplot Error
~~~~~~~~~~~~~
An error that starts with ``gnuplot> set terminal aqua enhanced title`` can be fixed by
adding ``setenv("GNUTERM","qt");`` to ``~/.octaverc`` on MacOS or by installing
``gunplot-x11`` and using ``setenv("GNUTERM", "X11")``.

Octave-Snap (Linux)
~~~~~~~~~~~~~~~~~~~
You can check if you are using a snap version on Linux by checking the path to your Octave
installation.

.. code:: shell

    which octave

If the returned path has ``snap`` in it, then Octave is running in a container and you will need to configure the kernel appropriately.

1) Set the environment variable ``OCTAVE_EXECUTABLE="octave"``

.. code:: shell

    echo export OCTAVE_EXECUTABLE=\"octave\" >> ~/.bashrc

2) Make a directory for the temporary plot directories that the kernel uses. This *cannot* be a hidden directory.

.. code:: shell

    mkdir ~/octavePlots

3) Set ``plot_dir`` to point to your plot directory in ``octave_kernel_config.py``.

.. code:: shell

	c.OctaveKernel.plot_settings = dict(plot_dir='<home>/octavePlots')

where ``<home>`` is the absolute path to your home directory. Do not use ``~`` as this resolves to a different location for Octave-Snap.


Blank Plot
~~~~~~~~~~
Specify a different format using the ``%plot -f <backend>`` magic or using a configuration setting.
On some systems, the default ``'png'`` produces a black plot.  On other systems ``'svg'`` produces a
black plot.


.. _Octave: https://www.gnu.org/software/octave/download.html
.. _online: http://nbviewer.ipython.org/github/Calysto/octave_kernel/blob/master/octave_kernel.ipynb
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].