<commit_before>---
layout: post
title: iPython Notebook
---

> "*Simplicity is the final achievement. After one has played a vast quantity of notes and more notes, it is simplicity that emerges as the crowning reward of art.*"  
> <NAME> 


-------------------------------------------------------------

# <pre>   <span class="hgviolet"> iPython Notebook Intro </span>

<p style="text-align: center;"><i class="icon-github icon-2x">
[melvincabatuan](https://github.com/melvincabatuan)</i></p>

-------------------------------------------------------------

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>


# <span> Hello World! </span>


    message = 'Hello World!'
    !echo $message

    Hello World!



    print("Hello World!")

    Hello World!


-------------------------------------------------------------
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

# <span class="hgviolet"> Displaying Images </span>


    from IPython.display import Image
    Image(url='https://emptyencore.files.wordpress.com/2011/05/the-witcher-2-19121.jpg')
          




<img src="https://emptyencore.files.wordpress.com/2011/05/the-witcher-2-19121.jpg"/>



-------------------------------------------------------------

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

# <span>  Displaying Equations </span>

The *compound interest* formula states that:

$$ R = Pe^{rt} $$

where:

- $P$ is the principal (initial investment).
- $r$ is the annual interest rate, as a decimal.
- $t$ is the time in years.
- $e$ is the base of natural logarithms.
- $R$ is the total return after $t$ years (including principal)

-------------------------------------------------------------

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

# <span> Cross Product Formula </span>

\[
\mathbf{V}_1 \times \mathbf{V}_2 =  \begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\frac{\partial X}{\partial u} &  \frac{\partial Y}{\partial u} & 0 \\
\frac{\partial X}{\partial v} &  \frac{\partial Y}{\partial v} & 0
\end{vmatrix}
\]

-------------------------------------------------------------

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

# <span> Maxwell's Equations </span>

\[
\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
\]

-------------------------------------------------------------

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

# <span>  List Files using ls </span>


    ls

    [0m[01;32mAnaconda-2.1.0-Linux-x86.sh[0m*       HelloNotebook.ipynb  NotebookEssentials.ipynb  [01;31mRISE-master.zip[0m          Styling_notebooks.ipynb
    Details                            Introduction         NotebookSetup.ipynb       SlideSample.ipynb
    [01;34mEvolution-of-Swarming-Experiment[0m/  [01;34mnode-v0.12.0[0m/        [01;34mRISE-master[0m/              SlideSample.slides.html


-------------------------------------------------------------

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

# <span> Import Audio </span>


    from IPython.display import Audio
    Audio(url="http://www.nch.com.au/acm/8k16bitpcm.wav")





                <audio controls="controls" >
                    <source src="http://www.nch.com.au/acm/8k16bitpcm.wav" type="audio/x-wav" />
                    Your browser does not support the audio element.
                </audio>
              



-------------------------------------------------------------

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

# <span> Adding Video </span>


    from IPython.display import YouTubeVideo
    YouTubeVideo('j9jbdgZidu8')





        <iframe
            width="400"
            height="300"
            src="https://www.youtube.com/embed/j9jbdgZidu8"
            frameborder="0"
            allowfullscreen
        ></iframe>
        



-------------------------------------------------------------

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

# <span> Embed External Websites </span>


    from IPython.display import IFrame
    IFrame('http://www.dlsu.edu.ph/', width='100%', height=540)





        <iframe
            width="100%"
            height="540"
            src="http://www.dlsu.edu.ph/"
            frameborder="0"
            allowfullscreen
        ></iframe>
        



-------------------------------------------------------------

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

# <span> That's it for now! </span>
<commit_msg>Update 2015-3-13-iPython-Notebook.md<commit_after>---
layout: post
title: iPython Notebook
---

> "*Simplicity is the final achievement. After one has played a vast quantity of notes and more notes, it is simplicity that emerges as the crowning reward of art.*"  
> <NAME> 


-------------------------------------------------------------

# <pre>   <span class="hgviolet"> iPython Notebook Intro </span>

<p style="text-align: center;"><i class="icon-github icon-2x">
[melvincabatuan](https://github.com/melvincabatuan)</i></p>

-------------------------------------------------------------

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>


# <span> Hello World! </span>


    message = 'Hello World!'
    !echo $message

    Hello World!



    print("Hello World!")

    Hello World!


-------------------------------------------------------------
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

# <span class="hgviolet"> Displaying Images </span>


    from IPython.display import Image
    Image(url='https://emptyencore.files.wordpress.com/2011/05/the-witcher-2-19121.jpg')
          




<img src="https://emptyencore.files.wordpress.com/2011/05/the-witcher-2-19121.jpg"/>



-------------------------------------------------------------

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

# <span>  Displaying Equations </span>

The *compound interest* formula states that:

$$ R = Pe^{rt} $$

where:

- $P$ is the principal (initial investment).
- $r$ is the annual interest rate, as a decimal.
- $t$ is the time in years.
- $e$ is the base of natural logarithms.
- $R$ is the total return after $t$ years (including principal)

-------------------------------------------------------------

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

# <span> Cross Product Formula </span>

$$\mathbf{V}_1 \times \mathbf{V}_2 =  \begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\frac{\partial X}{\partial u} &  \frac{\partial Y}{\partial u} & 0 \\
\frac{\partial X}{\partial v} &  \frac{\partial Y}{\partial v} & 0
\end{vmatrix}$$

-------------------------------------------------------------

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

# <span> Maxwell's Equations </span>

\[
\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
\]

-------------------------------------------------------------

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

# <span>  List Files using ls </span>


    ls

    [0m[01;32mAnaconda-2.1.0-Linux-x86.sh[0m*       HelloNotebook.ipynb  NotebookEssentials.ipynb  [01;31mRISE-master.zip[0m          Styling_notebooks.ipynb
    Details                            Introduction         NotebookSetup.ipynb       SlideSample.ipynb
    [01;34mEvolution-of-Swarming-Experiment[0m/  [01;34mnode-v0.12.0[0m/        [01;34mRISE-master[0m/              SlideSample.slides.html


-------------------------------------------------------------

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

# <span> Import Audio </span>


    from IPython.display import Audio
    Audio(url="http://www.nch.com.au/acm/8k16bitpcm.wav")





                <audio controls="controls" >
                    <source src="http://www.nch.com.au/acm/8k16bitpcm.wav" type="audio/x-wav" />
                    Your browser does not support the audio element.
                </audio>
              



-------------------------------------------------------------

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

# <span> Adding Video </span>


    from IPython.display import YouTubeVideo
    YouTubeVideo('j9jbdgZidu8')





        <iframe
            width="400"
            height="300"
            src="https://www.youtube.com/embed/j9jbdgZidu8"
            frameborder="0"
            allowfullscreen
        ></iframe>
        



-------------------------------------------------------------

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

# <span> Embed External Websites </span>


    from IPython.display import IFrame
    IFrame('http://www.dlsu.edu.ph/', width='100%', height=540)





        <iframe
            width="100%"
            height="540"
            src="http://www.dlsu.edu.ph/"
            frameborder="0"
            allowfullscreen
        ></iframe>
        



-------------------------------------------------------------

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

# <span> That's it for now! </span>

{'fraction_non_alphanumeric': 0.3280624294075367, 'fraction_numerical': 0.021254748947530547, 'mean_word_length': 1.481528662420382, 'pattern_counts': {'":': 0, '<': 315, '<?xml version=': 0, '>': 319, 'https://': 8, 'lorem ipsum': 0, 'www.': 10, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2870507', 'n_tokens_mistral': 3656, 'n_tokens_neox': 3373, 'n_words': 771}