Jupyter notebook example

Jupyter notebook example#

Here is an example page built with Jupyter Notebooks

Subsection 1#

Here is a subsection

Subsection 2#

Here is another subsection.

Here is some $m^at_h$

$$e^{i\pi} = -1$$

And here comes some code!

### python is the default for code cells, since we are running a Python3 kernel. This could be changed though.
import numpy as np
import matplotlib.pyplot as plt

xy = np.random.multivariate_normal([0,0], [[1, 0.8], [0.8, 1]], 1000)
plt.scatter(xy[:,0], xy[:,1], alpha=0.3)
<matplotlib.collections.PathCollection at 0x7f1de41bbdd0>
../_images/1c815e99bf164926945217d688d1eb136b9e08727398b78d1797914f25b46fa0.png
%%bash
## bash cells can be run using %%bash magic

pwd
/home/runner/work/reedgroup.github.io/reedgroup.github.io/docs/Contributing
# %load_ext rpy2.ipython
### Can also use R cells, after installing R and python library rpy2, and loading rpy2.ipython
### following https://evodify.com/python-r-bash-jupyter-notebook/
# %%R
# ### R cell using %%R magic

# library(ggforce)
# ggplot(iris, aes(Petal.Length, Petal.Width, colour = Species)) +
#     geom_point() +
#     facet_zoom(x = Species == "versicolor")
for row in range(6):  
    for col in range(7):  
        if (row==0 and col %3 !=0)or(row==1 and col %3==0) or(row-col==2) or(row+col==8):  
            print("*",end=" ")  
        else:  
            print(end=" ")  
    print() 
 * *  * *  
*   *   * 
*      * 
 *    *  
  *  *   
   *