print('This is a demo of Juniper.') text1 = "It's a JS library for running code in your " text2 = "browser, via Jupyter kernels provided by {}." print(text1 + text2.format('Binder'))
# it starts a Docker container from a pre-built image # so you can pre-install any libraries import spacy nlp = spacy.load('en_core_web_sm') # spaCy models! doc = nlp(u"This is a sentence.") for token in doc: print(token.text, token.pos_)
# because it's a Jupyter environment, you can # use the built-in IPython functions from IPython.core.display import display, HTML html = "<img src='https://i.imgur.com/A2g43BD.jpg'/>" display(HTML(html)) # you can also just output stuff def some_function(some_arg): return some_arg some_function([1, 2, 3, 4])
# this code contains an error, so Jupyter will complain some_string = 'hello world' some_int = 1234 print(some_string + some_int)