In [3]:
%connect_info


{
  "kernel_name": "",
  "signature_scheme": "hmac-sha256",
  "control_port": 51676,
  "transport": "tcp",
  "iopub_port": 51674,
  "hb_port": 51677,
  "ip": "127.0.0.1",
  "stdin_port": 51675,
  "key": "cc604cc1-220f-4626-8437-508f2e1bd29b",
  "shell_port": 51673
}

Paste the above JSON into a file, and connect with:
    $> jupyter <app> --existing <file>
or, if you are local, you can connect with just:
    $> jupyter <app> --existing kernel-709d2ed0-fecc-463b-9553-46f12806bdec.json
or even just:
    $> jupyter <app> --existing
if this is the most recent Jupyter kernel you have started.

In [2]:
%lsmagic


Out[2]:
Available line magics:
%alias  %alias_magic  %autocall  %automagic  %autosave  %bookmark  %cd  %clear  %cls  %colors  %config  %connect_info  %copy  %ddir  %debug  %dhist  %dirs  %doctest_mode  %echo  %ed  %edit  %env  %gui  %hist  %history  %killbgscripts  %ldir  %less  %load  %load_ext  %loadpy  %logoff  %logon  %logstart  %logstate  %logstop  %ls  %lsmagic  %macro  %magic  %matplotlib  %mkdir  %more  %notebook  %page  %pastebin  %pdb  %pdef  %pdoc  %pfile  %pinfo  %pinfo2  %popd  %pprint  %precision  %profile  %prun  %psearch  %psource  %pushd  %pwd  %pycat  %pylab  %qtconsole  %quickref  %recall  %rehashx  %reload_ext  %ren  %rep  %rerun  %reset  %reset_selective  %rmdir  %run  %save  %sc  %set_env  %store  %sx  %system  %tb  %time  %timeit  %unalias  %unload_ext  %who  %who_ls  %whos  %xdel  %xmode

Available cell magics:
%%!  %%HTML  %%SVG  %%bash  %%capture  %%cmd  %%debug  %%file  %%html  %%javascript  %%js  %%latex  %%perl  %%prun  %%pypy  %%python  %%python2  %%python3  %%ruby  %%script  %%sh  %%svg  %%sx  %%system  %%time  %%timeit  %%writefile

Automagic is ON, % prefix IS NOT needed for line magics.

Line Magic

Cell Magic

%%bash    %%capture    %%html    %%javascript    %%js    %%latex    %%perl    
%%python    %%python2    %%python3    %%ruby    %%script    %%sh    %%svg    %%writefile

Line Magic

Alias

%alias
%alias_magic

%alias

In [2]: alias bracket echo "Input in brackets: <%l>"
In [3]: bracket hello world
Input in brackets: <hello world>

%alias

In [1]: alias parts echo first %s second %s
In [2]: %parts A B
first A second B
In [3]: %parts A
Incorrect number of arguments: 2 expected.
parts is an alias to: 'echo first %s second %s'

%alias

In [6]: alias show echo
In [7]: PATH='A Python string'
In [8]: show $PATH
A Python string
In [9]: show $$PATH
/usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...

%alias_magic

%alias_magic [-l] [-c] name target
In [1]: %alias_magic t timeit
Created `%t` as an alias for `%timeit`.
Created `%%t` as an alias for `%%timeit`.

In [2]: %t -n1 pass
1 loops, best of 3: 954 ns per loop

In [3]: %%t -n1
   ...: pass
   ...:
1 loops, best of 3: 954 ns per loop

In [4]: %alias_magic --cell whereami pwd
UsageError: Cell magic function `%%pwd` not found.
In [5]: %alias_magic --line whereami pwd
Created `%whereami` as an alias for `%pwd`.

In [6]: %whereami
Out[6]: u'/home/testuser'

Directory


In [7]:
%cd


C:\Users\satish goda

In [9]:
%cd -


F:\src\learning\python\jupyter\tutorial

In [10]:
%dhist


Directory history (kept in _dh)
0: F:\src\learning\python\jupyter\tutorial
1: C:\Users\satish goda
2: F:\src\learning\python\jupyter\tutorial
3: C:\Users\satish goda
4: F:\src\learning\python\jupyter\tutorial

Configuration


In [1]:
%config


Available objects for config:
     ZMQInteractiveShell
     HistoryManager
     PrefilterManager
     IPCompleter
     DisplayFormatter
     MagicsManager
     ScriptMagics
     AliasManager
     IPKernelApp
     StoreMagics
     StoreMagics

%gui

In [1]: %gui qt5

In [2]: from PyQt5 import QtWidgets

In [3]: w = QtWidgets.QPushButton("sdfsdf")

In [4]: w.show()