This is a test notebook


In [1]:
## __init__
a = 5
print('I am inside loaded_notebook!')


I am inside loaded_notebook!

In [ ]:
print((3, a))
print((lambda: (4, a))())

In [2]:
## create_b
b = 10

In [3]:
## add_one
a += 1

In [4]:
##block __init__
import numpy as np
import matplotlib.pyplot as plt

In [5]:
print('in __init__')


in __init__

In [6]:
cycles = 1
n = 50

In [7]:
##lastblock
print('I should still be in __init__')


I should still be in __init__

In [8]:
## raises_exception __skip__
raise Exception('This cell should be skipped.')


---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-8-50d56b80b11d> in <module>
      1 ## raises_exception __skip__
----> 2 raise Exception('This cell should be skipped.')

Exception: This cell should be skipped.

Data


In [9]:
print('Ran Data (heading 1)')


Ran Data (heading 1)

Data 1


In [10]:
x = np.arange(n)
x


Out[10]:
array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,
       17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
       34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49])

In [11]:
print('Ran Data 1 (heading 2)')


Ran Data 1 (heading 2)

Data 2


In [12]:
y = np.sin(cycles * 2 * np.pi * np.arange(n) / n)
y


Out[12]:
array([ 0.00000000e+00,  1.25333234e-01,  2.48689887e-01,  3.68124553e-01,
        4.81753674e-01,  5.87785252e-01,  6.84547106e-01,  7.70513243e-01,
        8.44327926e-01,  9.04827052e-01,  9.51056516e-01,  9.82287251e-01,
        9.98026728e-01,  9.98026728e-01,  9.82287251e-01,  9.51056516e-01,
        9.04827052e-01,  8.44327926e-01,  7.70513243e-01,  6.84547106e-01,
        5.87785252e-01,  4.81753674e-01,  3.68124553e-01,  2.48689887e-01,
        1.25333234e-01,  1.22464680e-16, -1.25333234e-01, -2.48689887e-01,
       -3.68124553e-01, -4.81753674e-01, -5.87785252e-01, -6.84547106e-01,
       -7.70513243e-01, -8.44327926e-01, -9.04827052e-01, -9.51056516e-01,
       -9.82287251e-01, -9.98026728e-01, -9.98026728e-01, -9.82287251e-01,
       -9.51056516e-01, -9.04827052e-01, -8.44327926e-01, -7.70513243e-01,
       -6.84547106e-01, -5.87785252e-01, -4.81753674e-01, -3.68124553e-01,
       -2.48689887e-01, -1.25333234e-01])

In [13]:
print('Ran Data 2 (heading 2)')


Ran Data 2 (heading 2)

Plot

Plot 1


In [14]:
print('Ran Plot 1 (heading 2)')


Ran Plot 1 (heading 2)

In [15]:
plt.plot(x, label='plot 1');


Plot 2


In [16]:
print('Ran Plot 2 (heading 2)')


Ran Plot 2 (heading 2)

In [17]:
cycles


Out[17]:
1

In [18]:
plt.plot(y, label='plot 2')
plt.title('adfasdff')
plt.legend();



In [ ]:


In [ ]:


In [ ]: