Jupyter notebook inside wordpress

Welcome to the experimental embeding of nbviewer notebook into wordpress

In [1]:
print("Hello World")
Hello World

As usual create your notebook and then general html content. Then get the content of a div called notebook and embed into the wordpress post

We will also include notebook.css at the top to style it

Below I am going to have some code examples just for fun.

In [3]:
#https://github.com/ovalhub/pyicu
from icu import *
text ="ಕನ್ನಡ"
trans = Transliterator.createInstance('Kannada-Latin')
print trans.transliterate(text)
kannaḍa
In [5]:
# Another test function
def cubic(x): 
    return x**3

[cubic(x) for x in xrange(10)]
Out[5]:
[0, 1, 8, 27, 64, 125, 216, 343, 512, 729]
In [7]:
display("TEST")
'TEST'
In [12]:
from IPython.display import *

HTML('<iframe src="https://thejeshgn.com/" height=300 width=800>'
     '</iframe>')
Out[12]:
In [13]:
print "The END of testing"
The END of testing

Do you like this post? Please rate, its just a click :) 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...