asdfasdfasdsdssfsdssdfsdf

"""
Explanation: Test Notebook
A test notebook by Nathan Whitehead
Copyright 2015
This notebook is designed to test the styling and functionality of Pineapple.
You are reading introductory text right now.
Basic Paragraph
Pineapple is a customized build of Jupyter (formerly known as IPython) designed as an easy way to get started with scientific computing.
It has a list of features:
- Full power of Python
- Interactive editing, syntax highlighting
- Easy download and installation
- Lots of packages preinstalled
- Native interface
Platforms
Currently Pineapple runs on:
1. Linux
2. Mac OS X 10.6 (Snow Leopard) and later versions
3. Windows 7 and later (in progress)
Markdown features
There are other markdown features you can use, for example you can do inline code to indicate that x is a variable. The function get_ready is set to True until it gets reset to false.
You can also put code within markdown (will not be runnable). Here is the broken version:
python
def f(x):
    return f(x)
to do f:
    f
Do not run this code, it will smash your stack.
Links
You can also include links to http://news.ycombinator.com
places with or without descriptive text.
Interactive
Let's get down to business. Here is some code.
End of explanation
"""


%cd

"""
Explanation: Are you impressed yet?
Maybe the next one will be more impressive.
End of explanation
"""


from IPython.display import Image
Image(filename='projects/pineapple/data/images/Pineapple-256.png')

"""
Explanation: Notice that the working directory is set to your home directory by default.
End of explanation
"""


import sys
print(sys.version)

"""
Explanation: Of course you can also do inline markdown images if you want.
Using special markdown syntax.

Or just good ol' HTML5.
<img src="../images/Pineapple-256.png" />
Here it is different, the URL is relative to the notebook file. Much nicer in my opinion.
Let's see what versions of libraries we have.
End of explanation
"""


from numpy import *
a = arange(9).reshape(3, 3); a

a.dot(a)

print('hello')

from IPython.core.display import HTML
HTML('<b>hello</b>')

def f(x):
    return HTML("<i>{}</i> waa".format(x))

f('Simon')

%%html
<i>This is italics</i>

"""
Explanation: Numpy
The real reason you want to use Python, let's be honest. You want that numpy goodness. You got it.
End of explanation
"""


class Fancy(object):
    def __init__(self, text):
        self.text = text
    def __repr_html__(self):
        return "<h3>{}</h3>".format(self.text)

Fancy("Nathan")

import numpy as np
maxtime = 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)

from IPython.display import Audio
Audio(data=signal, rate=rate)

"""
Explanation: $\LaTeX$ Section Names
Oh yeah, you can do $\TeX$ inline with dollars or as equations with double dollars.
$$x^2+y^2=z^{x+y}$$
Rich Objects
You can define rich representations of Python objects.
End of explanation
"""


%matplotlib inline

import matplotlib.pyplot as plt
import numpy as np

plt.rcParams['figure.figsize'] = (10.0, 8.0)
plt.figure()
x = np.linspace(0, 3*np.pi, 500)
plt.plot(x,np.sin(np.sin(1.0*x) + x))
plt.title('Phase Modulation plot')
plt.show()

"""
Explanation: Matplotlib
What use is data crunching if you can't graph it?
End of explanation
"""


