#comments which are not run are denoted with #
#hello world
#try running this cell clicking inside it and pressing shift+enter
#python3
print("hello world")

"""
Explanation: Euplotid says "hello world"
Markdown
hello world
hello world
hello world
End of explanation
"""


%lsmagic
#shows you all available magics, these allow you to run many different 
#commands on a single line, such as "load_ext" to load functions or "time" to time your code
#cell magics can interpret many other languages

%%perl
#can use magic to run whole cell as perl
print "hello world"

%%bash
#or make cell bash
echo "hello world"

#bash commands inside python kernel
!echo "hello world"

#can even store output of bash commands and use in python
string = !echo "hello world"
print(string)

"""
Explanation: Quick Jupyter Tips

select how the cell is interpreted in the toolbar at the top, this one says "Markdown"
view a notebook as a powerpoint style presentation by clicking the "play" button at the top right, with button next to it allowing for editing
edit text at multiple locations by holding down the "command" key
highlight and edit blocks of text using the "alt" key
download the notebook in a variety of ways, including html and presentation html (which preserve interactive elements) and pdf which is static
End of explanation
"""


#switch to Bash kernel
echo "hello world"

#switch to R kernel
print("hello world")

#switch to C kernel
printf("hello world");

#switch to python2 kernel
print "hello world"

"""
Explanation: Switching kernels
Jupyter (JuliaPythonR) is essentially a wrapper of kernels. A kernel takes text, compiles it according their respective rules and outputs machine code which is then executed on the CPU/GPU. Jupyter allows you to switch between different kernels by goint to Kernel-->Change Kernel at the top.
End of explanation
"""


from datetime import timedelta
from IPython.display import YouTubeVideo
start=int(timedelta(hours=0, minutes=0, seconds=0).total_seconds())
YouTubeVideo("rOU4YiuaxAM", start=start, autoplay=1, theme="light", color="red")

"""
Explanation: Images

<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/28/HelloWorld.svg/1200px-HelloWorld.svg.png" style="width: 500px; height: 500px">
Youtube videos
End of explanation
"""


