30-04-2021



Jupyter Notebooks¶. Any notebooks that you create will need front matter for hugo to know how to render the content. Once you edit the name of the jupyter notebook to something other than Untitled.ipynb, hugo-jupyter will automatically edit the notebook’s metadata to enable rendering with jupyter. Jupyter Notebook IntroJupyter Notebook TutorialData ScienceSconsJupyter Notebook SecurityPython BasicsIntro to Data AnalysisWhat is AnacondaJupyter Notebook Tips and TricksMultiple Python. A simple, retro theme for Hugo.

  • Jupyter Tutorial
  • IPython

Learn about how Cacher renders Jupyter Notebooks. Cacher empowers you and your team to write more code, faster. In this short guide, I'll show you how to add R to Jupyter Notebook. I will review the complete steps to add R from scratch.

  • Jupyter
  • QtConsole
Hugo
  • JupyterLab
  • Jupyter Resources
  • Selected Reading

While the menu bar and toolbar lets you perform various operations on notebook, it is desirable to be able to use keyboard shortcuts to perform them quickly.

Jupyter Notebooks have two different keyboard input modes −

  • Command Mode − Binds the keyboard to notebook level actions. Indicated by a grey cell border with a blue left margin.

  • Edit Mode − When you are typing in a cell. Indicated by a green cell border.

Command Mode (press Esc to enable)

F

find and replace

1

change cell to heading 1

Ctrl-Shift-F

open the command palette

2

change cell to heading 2

Ctrl-Shift-P

open the command palette

3

change cell to heading 3

Enter

enter edit mode

4

change cell to heading 4

P

open the command palette

5

change cell to heading 5

Shift-Enter

run cell, select below

6

change cell to heading 6

Ctrl-Enter

run selected cells

A

insert cell above

Alt-Enter

run cell and insert below

B

insert cell below

Y

change cell to code

X

cut selected cells

M

change cell to markdown

C

copy selected cells

R

change cell to raw

Drivers asix network & wireless cards. V

paste cells below

K

select cell above

Z

undo cell deletion

Up

select cell above

D,D

delete selected cells

Down

select cell below

Shift-M

merge selected cells, or current cell with cell below if only one cell is selected

J

select cell below

Shift-V

paste cells above

Shift-K

extend selected cells above

L

toggle line numbers

Shift-Up

extend selected cells above

O

toggle output of selected cells

Shift-Down

extend selected cells below

Shift-O

toggle output scrolling of selected cells

Shift-J

extend selected cells below

I,I

interrupt the kernel

Ctrl-S

Save and Checkpoint

0,0

restart the kernel (with dialog)

S

Save and Checkpoint

Esc

close the pager

Shift-L

toggles line numbers in all cells, and persist the setting

Q

close the pager

Shift-Space

scroll notebook up

Space

scroll notebook down

Edit Mode (press Enter to enable)

Tab

code completion or indent

Ctrl-Home

go to cell start

Shift-Tab

tooltip

Ctrl-Up

go to cell start

Ctrl-]

indent

Ctrl-End

go to cell end

Ctrl-[

dedent

Ctrl-Down

go to cell end

Ctrl-A

select all

Ctrl-Left

go one word left

Ctrl-Z

undo

Ctrl-Right

go one word right

Ctrl-/

comment

Ctrl-M

enter command mode

Ctrl-D

delete whole line

Ctrl-Shift-F

open the command palette

Ctrl-U

undo selection

Ctrl-Shift-P

open the command palette

Insert

toggle overwrite flag

Esc

enter command mode

Ctrl-Backspace

delete word before

Ctrl-Y

redo

Ctrl-Delete

delete word after

Alt-U

redo selection

Shift-Enter

run cell, select below

Ctrl-Shift-Minus

split cell at cursor

Ctrl-Enter

run selected cells

Down

move cursor down

Alt-Enter

run cell and insert below

Up

move cursor up

Ctrl-S

Save and Checkpoint

iPython and Jupyter Notebook with Embedded D3.js




bogotobogo.com site search:

There have been several tries to incorporate D3 into IPython:

Though quite progresses have been made in those approaches, they were kind of hacks. Now, we have language agnostic Jupyter which was forked from IPython, we can take the D3 into Notebook without lots of effeorts.

We can start implement D3 into Jupyter from this repo: PyGoogle/PyD3.

The repo is based on this presentation:



The primary idea looks like this:

  1. Jupyter reads in HTML DOM as a string via IPython.core.display
  2. So, Jupyter simply imports D3 using HTML API
  3. DOM elements manipulation using Python's string.Template.substitute

  4. Data format - Panda's JSON

D3 - Circle animation

Before we use Jupyter, we'll use the following D3 animation.

Here is the pure D3 animation.


SVG circle with animation - to see it again, refresh the browser:

Hugo Jupyter Notebook

Here is the code for D3 animaition:


Jupyter with D3 - Circle animation

We're using the same animation showed in the previous section.

The code for Notebook looks like this: Download atrack driver.

Hugo Jupiter Notebook Book


Notebook is available at Github:
PyD3/D3-Circle-Animation.ipynb


Hugo Jupiter Notebooks

Note: This is an email I got from a reader:

hi K Hong,
I was just reading your post regarding embedding d3 in jupyter notebooks:
http://www.bogotobogo.com/python/IPython/iPython_Jupyter_Notebook_with_Embedded_D3.php
It seems there is an issue importing d3 as an external library:
see https://github.com/mpld3/mpld3/issues/33#issuecomment-32101013
(I had the same issue)
the solution was to place the usage of d3 within a require:
this worked for me.
you can se an example for how to get your code to work with this fix here:
https://github.com/fensterheim/DataProjects/blob/master/D3_example/D3Test.ipynb
according to the issue that was opened it seems that this is a problem with newer versions of d3, therefore it might be worth while noting this in your blog post.

Hugo Jupiter Notebook Download



Please enable JavaScript to view the comments powered by Disqus.

Hugo Jupiter Notebook Pdf