#!/usr/bin/env python
# coding: utf-8
# In[8]:
#Configure some notebook settings
from traitlets.config.manager import BaseJSONConfigManager
path='/Users/Esh/.jupyter/nbconfig'
cm = BaseJSONConfigManager(config_dir=path)
cm.update('livereveal', {
'theme': 'beige',
'transition': 'fade',
'transition-speed':'default',
'controls': 'true',
'scroll':'true',
'width': 1024,
'heigh': 768
})
#
Introduction To Jupyter Notebooks
# (and why you should love them!)
# Eshin Jolly
# Overview
# I Wanna Be Interactive
# Lab Notebooks of the Future
# I'm Multilingual
# Sharing is Caring
# Pimp My Ride
# Tips and Tricks
# I Wanna Be Interactive
# - Interactive data analysis through code "cells"
# - Inline plotting
# - Access to the file system
# - "IDE" for analysts
# In[10]:
#Put some code here!
x = 10
print x
# In[25]:
#Put more code here!
# Notebooks of the Future
# ## Not just for code
# - Markdown, HTML, LateX integration
# - Slide shows (like this one!)
# - Keep your notes alongside your analysis routines
# - Embed images, videos, anything (it's all just HTML + javascript)
# I'm Multilingual!
# ## Not just for Python!
# - Python (multiple versions together!)
# - R
# - Matlab
# - Javascript
# - Julia
# - [30+ others](https://github.com/jupyter/jupyter/wiki/Jupyter-kernels)
# # R... the master troll of statistical languages
# In[3]:
get_ipython().run_line_magic('load_ext', 'rpy2.ipython')
# In[4]:
get_ipython().run_cell_magic('R', '', 'cat("This is an R cell!\\n")\nseq(1,10,2)\n')
# # Matlab... because you enjoy paying for licenses
# In[ ]:
get_ipython().run_line_magic('load_ext', 'pymatbridge')
# In[6]:
get_ipython().run_cell_magic('matlab', '', "disp('This is a matlab cell')\nrepmat([1 2 3],2)\n")
# # But we can talk to each other
# In[7]:
x = get_ipython().run_line_magic('R', 'seq(1,10,2)')
x *= 10
print("Look now I'm a numpy array!")
print(type(x))
# Sharing is Caring
# ## Save notebooks in other formats and put them online
# - Github automatically renders jupyter notebooks
# - [Online notebook viewer](http://nbviewer.jupyter.org/)
# - Output to PDF, HTML (including javascript)
# - [Jupyterhub](https://github.com/jupyterhub/jupyterhub) code with friends!
#
# Pimp My Ride
# # You can customize your notebook experience with extensions
# - Table of Contents
# - Execution time
# - Scratch Space
# - Code/Section folding
# - Look and feel (CSS+Javascript)
# - [All through notebook extensions](https://github.com/ipython-contrib/jupyter_contrib_nbextensions)
# ## But be careful of yak-shaving:
# ### "Falling down an endless series of sub-tasks that prevent you from actually getting anything done"
#
#
# Tips and Tricks
# ## Lots of extra features
# - Interactive debugger (%pdb)
# - Timing code (%timeit)
# - Memory usage (%memit)
# - Profiling (%prun)
# - Development (%file, %reload)
# ## For more...
# - [Jake Vanderplas - Data Science Handbook](https://github.com/jakevdp/PythonDataScienceHandbook)
# - [Tal Yarkoni - Intro to Data Science w/ Python](https://github.com/tyarkoni/SSI2016)
# - [Yarik - Intro to Programming for Psych/Neuro](https://github.com/dartmouth-pbs/psyc161)
# - [Awesome notebooks](https://github.com/jupyter/jupyter/wiki/A-gallery-of-interesting-Jupyter-Notebooks)
# - [Neuroimaging in Python](https://github.com/datacarpentry/python-neuroimaging-lesson)
#
#