|
- # ---
- # jupyter:
- # jupytext_format_version: '1.2'
- # kernelspec:
- # display_name: Python 3
- # language: python
- # name: python3
- # language_info:
- # codemirror_mode:
- # name: ipython
- # version: 3
- # file_extension: .py
- # mimetype: text/x-python
- # name: python
- # nbconvert_exporter: python
- # pygments_lexer: ipython3
- # version: 3.5.2
- # ---
-
- # ## Show LaTeX equation
- #
- #
-
- from IPython.display import Latex
- Latex(r"""\begin{eqnarray}
- \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\
- \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\
- \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\
- \nabla \cdot \vec{\mathbf{B}} & = 0
- \end{eqnarray}""")
-
- # %%latex
- \begin{align}
- \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\
- \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\
- \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\
- \nabla \cdot \vec{\mathbf{B}} & = 0
- \end{align}
-
- # ## Audio
- #
-
- from IPython.display import Audio
- Audio(url="http://www.nch.com.au/acm/8k16bitpcm.wav")
-
- # +
- import numpy as np
- max_time = 3
- f1 = 220.0
- f2 = 224.0
- rate = 8000.0
- L = 3
- times = np.linspace(0,L,rate*L)
- signal = np.sin(2*np.pi*f1*times) + np.sin(2*np.pi*f2*times)
-
- Audio(data=signal, rate=rate)
- # -
-
- # ## External sites
-
- # + {"scrolled": true}
- from IPython.display import IFrame
- IFrame('https://jupyter.org', width='100%', height=350)
- # -
-
- # ## References
- #
- # * https://nbviewer.jupyter.org/github/ipython/ipython/blob/master/examples/IPython%20Kernel/Index.ipynb
|