SlideShare una empresa de Scribd logo
1 de 55
Descargar para leer sin conexión
ipython notebook
from scratch. for realsies.
Some basic information to start with
iPython notebook is a part of the iPython package
(iPython is an improved command line interpreter)
Some basic information to start with
iPython notebook is a part of the iPython package
(iPython is an improved command line interpreter)
iPython notebook is young, it’s at v2.1 right now.
Some basic information to start with
iPython notebook is a part of the iPython package
(iPython is an improved command line interpreter)
iPython notebook is young, it’s at v2.1 right now.
Only 1 year ago, iPython notebook was at v0.11
Some basic information to start with
iPython notebook is a part of the iPython package
(iPython is an improved command line interpreter)
iPython notebook is young, it’s at v2.1 right now.
Only 1 year ago, iPython notebook was at v0.11
In any case iPython notebook has pretty much
become *the* tool for data analysis and analysis
sharing on the inter webs
Why is that?
Why is that?
Easy - Like using the interactive interpreter but now
there is the ability to edit, fix, and refactor code.!
Why is that?
Easy - Like using the interactive interpreter but now
there is the ability to edit, fix, and refactor code.!
Shareable - Easily exported, results are in-line with
the page so that it’s easy to see how code turns out.!
Why is that?
Easy - Like using the interactive interpreter but now
there is the ability to edit, fix, and refactor code.!
Shareable - Easily exported, results are in-line with
the page so that it’s easy to see how code turns out.!
Documented - The code and results are both there
without necessitating that someone else run it first!
Why is that?
Easy - Like using the interactive interpreter but now
there is the ability to edit, fix, and refactor code.!
Shareable - Easily exported, results are in-line with
the page so that it’s easy to see how code turns out.!
Polyglot - Something works better with bash? R?
Ruby? Perl? No problem, run it from iPython notebook!
Documented - The code and results are both there
without necessitating that someone else run it first!
Interactive demo time
The basics with an assumption of pyenv
We’ll assume you have the basics, now do:
$	
  pyenv	
  virtualenv	
  2.7.6	
  notebook	
  
$	
  pyenv	
  global	
  notebook	
  
$	
  pip	
  install	
  ipython	
  pyzmq	
  tornado	
  	
  
(Using pip then using ipython will install notebook too!)
The basics with an assumption of pyenv
We’ll assume you have the basics, now do:
$	
  pyenv	
  virtualenv	
  2.7.6	
  notebook	
  
$	
  pyenv	
  global	
  notebook	
  
$	
  pip	
  install	
  ipython	
  pyzmq	
  tornado	
  	
  
(Using pip then using ipython will install notebook too!)
Or follow this handy blog post:
http://amaral-lab.org/blog/i-wish-i-knew-then-what-i-know-now-lab-notebooks-a
So how can I use this…
Start me up on the command line now
$	
  ipython	
  notebook	
  
So how can I use this…
Start me up on the command line now
$	
  ipython	
  notebook	
  
Navigate to localhost:8888 in your preferred web
browser
So how can I use this…
Start me up on the command line now
$	
  ipython	
  notebook	
  
Navigate to localhost:8888 in your preferred web
browser
VOILA!
So how can I use this…
From the web interface you can create a new notebook
So how can I use this…
From the web interface you can create a new notebook
So how can I use this…
From the web interface you can create a new notebook
Folders have to be created on the filesystem 

(terminal or nautilus/finder)
So what is the best way to use this?
Data Exploration
So what is the best way to use this?
Data Exploration
Learning new libraries/techniques
So what is the best way to use this?
Data Exploration
Learning new libraries/techniques
Documenting code/workflow/results
So what is the best way to use this?
Data Exploration
Learning new libraries/techniques
Trying different visualizations
Documenting code/workflow/results
So what is the best way to use this?
Data Exploration
Learning new libraries/techniques
Trying different visualizations
Documenting code/workflow/results
Looking at small/modular parts
What is not a good way to use it?
Greater than 15-20 images in a single notebook
What is not a good way to use it?
Greater than 15-20 images in a single notebook
Poor programming practices

(i.e. no functions or modules)
What is not a good way to use it?
Greater than 15-20 images in a single notebook
Poor programming practices

(i.e. no functions or modules)
Extensive amounts of *production* code

(Think hundreds or thousands of lines)
So how can I set this up…
Holy crap! So many ways!
So how can I set this up…
Holy crap! So many ways!
As a one-off as described!
So how can I set this up…
Holy crap! So many ways!
As a one-off as described!
As a server!
So how can I set this up…
Holy crap! So many ways!
As a one-off as described!
As a server!
As a constantly updating resource!
Initial caveats first
iPython notebook currently has no method of
handling two individuals editing the same
notebook simultaneously
As a one-off
Simply do:
$	
  ipython	
  notebook	
  
As a one-off
Simply do:
$	
  ipython	
  notebook	
  
The cool thing is that iPython notebook can now
traverse directories
As a one-off
Simply do:
$	
  ipython	
  notebook	
  
The cool thing is that iPython notebook can now
traverse directories
So *ANY* directory that is a child of the directory
where you start the service you can reach it!
As a one-off
Simply do:
$	
  ipython	
  notebook	
  
The cool thing is that iPython notebook can now
traverse directories
So *ANY* directory that is a child of the directory
where you start the service you can reach it!
But! While iPython notebook can create notebooks
from the web page it can’t create folders
As a one-off
So this is pretty simple then, you can embed the
ipython notebooks in your project directories and
navigate to them from your project root
$	
  cd	
  ~	
  
$	
  nohup	
  ipython	
  notebook	
  &	
  
!
Now navigate to the project code in the browser
But I have to keep switching computers
…and I can’t remember to keep committing
repositories.
But I have to keep switching computers
…and I can’t remember to keep committing
repositories.
BAM! Solution!
But I have to keep switching computers
…and I can’t remember to keep committing
repositories.
BAM! Solution!
Make one folder for ipython notebooks in dropbox!
But I have to keep switching computers
…and I can’t remember to keep committing
repositories.
BAM! Solution!
Make one folder for ipython notebooks in dropbox!
But how do I have ipython notebook start in dropbox?
Creating a custom startup directory
Create your profile
$	
  ipython	
  profile	
  create	
  
$	
  vi	
  ~/.ipython/profile_default/ipython_notebook_config	
  
Change line 551 from:
#c.NotebookManager.notebook_dir	
  =	
  u’’	
  
to:
c.NotebookManager.notebook_dir	
  =	
  	
  
	
   u’/home/staff/$USER/Dropbox/Notebooks/’	
  
Kick it up a notch
What if I told you about a world where you could
always access your programming environment so
long as you had internet?
Kick it up a notch
What if I told you about a world where you could
always access your programming environment so
long as you had internet?
Or refer to your graphs?
Kick it up a notch
What if I told you about a world where you could
always access your programming environment so
long as you had internet?
Or refer to your graphs?
Or show your partners/collaborators?
Make a server!
Okay, but hold on there. Here is the HUGE
NUMBER
ONE
RULE
Make a server!
YOU MUST PASSWORD PROTECT IT!
Make a server!
YOU MUST PASSWORD PROTECT IT!
AND NOT WITH YOUR USER PASSWORD!
Make a server!
YOU MUST PASSWORD PROTECT IT!
AND NOT WITH YOUR USER PASSWORD!
MAKE IT A VERYYYY LONG PASSPHRASE
So let’s make a password
Open iPython from your command line

(NOT the regular python interpreter!)
$	
  ipython
From Thomas Sileo’s blog
So let’s make a password
Open iPython from your command line

(NOT the regular python interpreter!)
$	
  ipython
From Thomas Sileo’s blog
Now set up the profile WITH the password
From Thomas Sileo’s blog
Now set up the profile WITH the password
From Thomas Sileo’s blog
And start that baby up!
Neat idea:

Use the server with the notebook directory in your
dropbox.
And start that baby up!
Neat idea:

Use the server with the notebook directory in your
dropbox.
Just copy new data files into dropbox and bam!
instant transfer and analysis.

Más contenido relacionado

La actualidad más candente

How to deliver a Python project
How to deliver a Python projectHow to deliver a Python project
How to deliver a Python projectmattjdavidson
 
Virtualenv
VirtualenvVirtualenv
VirtualenvWEBdeBS
 
Data analytics in the cloud with Jupyter notebooks.
Data analytics in the cloud with Jupyter notebooks.Data analytics in the cloud with Jupyter notebooks.
Data analytics in the cloud with Jupyter notebooks.Graham Dumpleton
 
Puppet DSL: back to the basics
Puppet DSL: back to the basicsPuppet DSL: back to the basics
Puppet DSL: back to the basicsJulien Pivotto
 
Python Desktop Application Development - PythonBo
Python Desktop Application Development - PythonBoPython Desktop Application Development - PythonBo
Python Desktop Application Development - PythonBoDeusdies
 
GPU Computing for Data Science
GPU Computing for Data Science GPU Computing for Data Science
GPU Computing for Data Science Domino Data Lab
 
[Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi
[Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi [Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi
[Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi Tomomi Imura
 
Meet the Eclipse SmartHome powered Mars Rover
Meet the Eclipse SmartHome powered Mars RoverMeet the Eclipse SmartHome powered Mars Rover
Meet the Eclipse SmartHome powered Mars RoverMichael Vorburger
 
Do you know all of Puppet?
Do you know all of Puppet?Do you know all of Puppet?
Do you know all of Puppet?Julien Pivotto
 
Open source projects with python
Open source projects with pythonOpen source projects with python
Open source projects with pythonroskakori
 
Chapter 8 getting started with python
Chapter 8 getting started with pythonChapter 8 getting started with python
Chapter 8 getting started with pythonPraveen M Jigajinni
 
How to download and install Python - lesson 2
How to download and install Python - lesson 2How to download and install Python - lesson 2
How to download and install Python - lesson 2Shohel Rana
 
Introduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of PythonIntroduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of PythonPro Guide
 
The End of the world as we know it - AKA your last NullPointerException $1B b...
The End of the world as we know it - AKA your last NullPointerException $1B b...The End of the world as we know it - AKA your last NullPointerException $1B b...
The End of the world as we know it - AKA your last NullPointerException $1B b...Michael Vorburger
 
Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015ice799
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programmingKiran Vadakkath
 
Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015ice799
 

La actualidad más candente (20)

How to deliver a Python project
How to deliver a Python projectHow to deliver a Python project
How to deliver a Python project
 
Intro to-venv-py3
Intro to-venv-py3Intro to-venv-py3
Intro to-venv-py3
 
Virtualenv
VirtualenvVirtualenv
Virtualenv
 
Building custom kernels for IPython
Building custom kernels for IPythonBuilding custom kernels for IPython
Building custom kernels for IPython
 
Data analytics in the cloud with Jupyter notebooks.
Data analytics in the cloud with Jupyter notebooks.Data analytics in the cloud with Jupyter notebooks.
Data analytics in the cloud with Jupyter notebooks.
 
Puppet DSL: back to the basics
Puppet DSL: back to the basicsPuppet DSL: back to the basics
Puppet DSL: back to the basics
 
Python Desktop Application Development - PythonBo
Python Desktop Application Development - PythonBoPython Desktop Application Development - PythonBo
Python Desktop Application Development - PythonBo
 
GPU Computing for Data Science
GPU Computing for Data Science GPU Computing for Data Science
GPU Computing for Data Science
 
[Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi
[Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi [Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi
[Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi
 
Meet the Eclipse SmartHome powered Mars Rover
Meet the Eclipse SmartHome powered Mars RoverMeet the Eclipse SmartHome powered Mars Rover
Meet the Eclipse SmartHome powered Mars Rover
 
Do you know all of Puppet?
Do you know all of Puppet?Do you know all of Puppet?
Do you know all of Puppet?
 
Open source projects with python
Open source projects with pythonOpen source projects with python
Open source projects with python
 
Chapter 8 getting started with python
Chapter 8 getting started with pythonChapter 8 getting started with python
Chapter 8 getting started with python
 
How to download and install Python - lesson 2
How to download and install Python - lesson 2How to download and install Python - lesson 2
How to download and install Python - lesson 2
 
Introduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of PythonIntroduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of Python
 
The End of the world as we know it - AKA your last NullPointerException $1B b...
The End of the world as we know it - AKA your last NullPointerException $1B b...The End of the world as we know it - AKA your last NullPointerException $1B b...
The End of the world as we know it - AKA your last NullPointerException $1B b...
 
Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 
Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015
 

Similar a A quick overview of why to use and how to set up iPython notebooks for research

Scientist meets web dev: how Python became the language of data
Scientist meets web dev: how Python became the language of dataScientist meets web dev: how Python became the language of data
Scientist meets web dev: how Python became the language of dataGael Varoquaux
 
Design and Evolution of cyber-dojo
Design and Evolution of cyber-dojoDesign and Evolution of cyber-dojo
Design and Evolution of cyber-dojoJon Jagger
 
Py4 inf 01-intro
Py4 inf 01-introPy4 inf 01-intro
Py4 inf 01-introIshaq Ali
 
Modern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerModern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerJohn Anderson
 
5 minute intro to virtualenv
5 minute intro to virtualenv5 minute intro to virtualenv
5 minute intro to virtualenvamenasse
 
OpenOffice Application with Python
OpenOffice Application with PythonOpenOffice Application with Python
OpenOffice Application with Pythonimacat .
 
I broke what?!??!? Taking over maintenance on well loved projects
I broke what?!??!? Taking over maintenance on well loved projectsI broke what?!??!? Taking over maintenance on well loved projects
I broke what?!??!? Taking over maintenance on well loved projectsBert JW Regeer
 
I broke what? Taking over maintenance on existing (well loved) projects, by B...
I broke what? Taking over maintenance on existing (well loved) projects, by B...I broke what? Taking over maintenance on existing (well loved) projects, by B...
I broke what? Taking over maintenance on existing (well loved) projects, by B...T. Kim Nguyen
 
Learn raspberry pi programming with python
Learn raspberry pi programming with pythonLearn raspberry pi programming with python
Learn raspberry pi programming with pythonSANTIAGO PABLO ALBERTO
 
Docker for business: How I stopped worrying about antipatterns
Docker for business: How I stopped worrying about antipatternsDocker for business: How I stopped worrying about antipatterns
Docker for business: How I stopped worrying about antipatternsLenses.io
 
Class 1: Welcome to programming
Class 1: Welcome to programmingClass 1: Welcome to programming
Class 1: Welcome to programmingMarc Gouw
 
Why Python Should Be Your First Programming Language
Why Python Should Be Your First Programming LanguageWhy Python Should Be Your First Programming Language
Why Python Should Be Your First Programming LanguageEdureka!
 
Running a Plone product on Substance D
Running a Plone product on Substance DRunning a Plone product on Substance D
Running a Plone product on Substance DMakina Corpus
 

Similar a A quick overview of why to use and how to set up iPython notebooks for research (20)

Python overview
Python overviewPython overview
Python overview
 
Scientist meets web dev: how Python became the language of data
Scientist meets web dev: how Python became the language of dataScientist meets web dev: how Python became the language of data
Scientist meets web dev: how Python became the language of data
 
Design and Evolution of cyber-dojo
Design and Evolution of cyber-dojoDesign and Evolution of cyber-dojo
Design and Evolution of cyber-dojo
 
Py4 inf 01-intro
Py4 inf 01-introPy4 inf 01-intro
Py4 inf 01-intro
 
Modern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerModern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl Programmer
 
Learn to Code and Have Fun Doing It!
Learn to Code and Have Fun Doing It! Learn to Code and Have Fun Doing It!
Learn to Code and Have Fun Doing It!
 
py4inf-01-intro.ppt
py4inf-01-intro.pptpy4inf-01-intro.ppt
py4inf-01-intro.ppt
 
5 minute intro to virtualenv
5 minute intro to virtualenv5 minute intro to virtualenv
5 minute intro to virtualenv
 
OpenOffice Application with Python
OpenOffice Application with PythonOpenOffice Application with Python
OpenOffice Application with Python
 
A Gnu Way of Learning
A Gnu Way of LearningA Gnu Way of Learning
A Gnu Way of Learning
 
Automate Yo' Self
Automate Yo' SelfAutomate Yo' Self
Automate Yo' Self
 
I broke what?!??!? Taking over maintenance on well loved projects
I broke what?!??!? Taking over maintenance on well loved projectsI broke what?!??!? Taking over maintenance on well loved projects
I broke what?!??!? Taking over maintenance on well loved projects
 
I broke what? Taking over maintenance on existing (well loved) projects, by B...
I broke what? Taking over maintenance on existing (well loved) projects, by B...I broke what? Taking over maintenance on existing (well loved) projects, by B...
I broke what? Taking over maintenance on existing (well loved) projects, by B...
 
Python environments
Python environmentsPython environments
Python environments
 
05 python.pdf
05 python.pdf05 python.pdf
05 python.pdf
 
Learn raspberry pi programming with python
Learn raspberry pi programming with pythonLearn raspberry pi programming with python
Learn raspberry pi programming with python
 
Docker for business: How I stopped worrying about antipatterns
Docker for business: How I stopped worrying about antipatternsDocker for business: How I stopped worrying about antipatterns
Docker for business: How I stopped worrying about antipatterns
 
Class 1: Welcome to programming
Class 1: Welcome to programmingClass 1: Welcome to programming
Class 1: Welcome to programming
 
Why Python Should Be Your First Programming Language
Why Python Should Be Your First Programming LanguageWhy Python Should Be Your First Programming Language
Why Python Should Be Your First Programming Language
 
Running a Plone product on Substance D
Running a Plone product on Substance DRunning a Plone product on Substance D
Running a Plone product on Substance D
 

Más de Adam Pah

Why Python?
Why Python?Why Python?
Why Python?Adam Pah
 
Quest overview
Quest overviewQuest overview
Quest overviewAdam Pah
 
Pah res-potentia-netsci emailable-stagebuild
Pah res-potentia-netsci emailable-stagebuildPah res-potentia-netsci emailable-stagebuild
Pah res-potentia-netsci emailable-stagebuildAdam Pah
 
Kaggle "Give me some credit" challenge overview
Kaggle "Give me some credit" challenge overviewKaggle "Give me some credit" challenge overview
Kaggle "Give me some credit" challenge overviewAdam Pah
 
D3 interactivity Linegraph basic example
D3 interactivity Linegraph basic exampleD3 interactivity Linegraph basic example
D3 interactivity Linegraph basic exampleAdam Pah
 
Mercurial Tutorial
Mercurial TutorialMercurial Tutorial
Mercurial TutorialAdam Pah
 
Introduction to Mercurial, or "Why we're switching from SVN no matter what"
Introduction to Mercurial, or "Why we're switching from SVN no matter what"Introduction to Mercurial, or "Why we're switching from SVN no matter what"
Introduction to Mercurial, or "Why we're switching from SVN no matter what"Adam Pah
 

Más de Adam Pah (7)

Why Python?
Why Python?Why Python?
Why Python?
 
Quest overview
Quest overviewQuest overview
Quest overview
 
Pah res-potentia-netsci emailable-stagebuild
Pah res-potentia-netsci emailable-stagebuildPah res-potentia-netsci emailable-stagebuild
Pah res-potentia-netsci emailable-stagebuild
 
Kaggle "Give me some credit" challenge overview
Kaggle "Give me some credit" challenge overviewKaggle "Give me some credit" challenge overview
Kaggle "Give me some credit" challenge overview
 
D3 interactivity Linegraph basic example
D3 interactivity Linegraph basic exampleD3 interactivity Linegraph basic example
D3 interactivity Linegraph basic example
 
Mercurial Tutorial
Mercurial TutorialMercurial Tutorial
Mercurial Tutorial
 
Introduction to Mercurial, or "Why we're switching from SVN no matter what"
Introduction to Mercurial, or "Why we're switching from SVN no matter what"Introduction to Mercurial, or "Why we're switching from SVN no matter what"
Introduction to Mercurial, or "Why we're switching from SVN no matter what"
 

Último

9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Servicenishacall1
 
Zoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdfZoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdfSumit Kumar yadav
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)Areesha Ahmad
 
dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...
dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...
dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...dkNET
 
Dopamine neurotransmitter determination using graphite sheet- graphene nano-s...
Dopamine neurotransmitter determination using graphite sheet- graphene nano-s...Dopamine neurotransmitter determination using graphite sheet- graphene nano-s...
Dopamine neurotransmitter determination using graphite sheet- graphene nano-s...Mohammad Khajehpour
 
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts ServiceJustdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Servicemonikaservice1
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksSérgio Sacani
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learninglevieagacer
 
Feature-aligned N-BEATS with Sinkhorn divergence (ICLR '24)
Feature-aligned N-BEATS with Sinkhorn divergence (ICLR '24)Feature-aligned N-BEATS with Sinkhorn divergence (ICLR '24)
Feature-aligned N-BEATS with Sinkhorn divergence (ICLR '24)Joonhun Lee
 
Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.Silpa
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryAlex Henderson
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .Poonam Aher Patil
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)Areesha Ahmad
 
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑Damini Dixit
 
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 60009654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000Sapana Sha
 
Conjugation, transduction and transformation
Conjugation, transduction and transformationConjugation, transduction and transformation
Conjugation, transduction and transformationAreesha Ahmad
 
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptxSCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptxRizalinePalanog2
 
COMPUTING ANTI-DERIVATIVES (Integration by SUBSTITUTION)
COMPUTING ANTI-DERIVATIVES(Integration by SUBSTITUTION)COMPUTING ANTI-DERIVATIVES(Integration by SUBSTITUTION)
COMPUTING ANTI-DERIVATIVES (Integration by SUBSTITUTION)AkefAfaneh2
 

Último (20)

9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
 
Zoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdfZoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdf
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)
 
dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...
dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...
dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...
 
Dopamine neurotransmitter determination using graphite sheet- graphene nano-s...
Dopamine neurotransmitter determination using graphite sheet- graphene nano-s...Dopamine neurotransmitter determination using graphite sheet- graphene nano-s...
Dopamine neurotransmitter determination using graphite sheet- graphene nano-s...
 
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts ServiceJustdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disks
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
 
Feature-aligned N-BEATS with Sinkhorn divergence (ICLR '24)
Feature-aligned N-BEATS with Sinkhorn divergence (ICLR '24)Feature-aligned N-BEATS with Sinkhorn divergence (ICLR '24)
Feature-aligned N-BEATS with Sinkhorn divergence (ICLR '24)
 
Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)
 
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
 
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
 
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 60009654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
 
CELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdfCELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdf
 
Conjugation, transduction and transformation
Conjugation, transduction and transformationConjugation, transduction and transformation
Conjugation, transduction and transformation
 
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptxSCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
 
COMPUTING ANTI-DERIVATIVES (Integration by SUBSTITUTION)
COMPUTING ANTI-DERIVATIVES(Integration by SUBSTITUTION)COMPUTING ANTI-DERIVATIVES(Integration by SUBSTITUTION)
COMPUTING ANTI-DERIVATIVES (Integration by SUBSTITUTION)
 

A quick overview of why to use and how to set up iPython notebooks for research

  • 2. Some basic information to start with iPython notebook is a part of the iPython package (iPython is an improved command line interpreter)
  • 3. Some basic information to start with iPython notebook is a part of the iPython package (iPython is an improved command line interpreter) iPython notebook is young, it’s at v2.1 right now.
  • 4. Some basic information to start with iPython notebook is a part of the iPython package (iPython is an improved command line interpreter) iPython notebook is young, it’s at v2.1 right now. Only 1 year ago, iPython notebook was at v0.11
  • 5. Some basic information to start with iPython notebook is a part of the iPython package (iPython is an improved command line interpreter) iPython notebook is young, it’s at v2.1 right now. Only 1 year ago, iPython notebook was at v0.11 In any case iPython notebook has pretty much become *the* tool for data analysis and analysis sharing on the inter webs
  • 7. Why is that? Easy - Like using the interactive interpreter but now there is the ability to edit, fix, and refactor code.!
  • 8. Why is that? Easy - Like using the interactive interpreter but now there is the ability to edit, fix, and refactor code.! Shareable - Easily exported, results are in-line with the page so that it’s easy to see how code turns out.!
  • 9. Why is that? Easy - Like using the interactive interpreter but now there is the ability to edit, fix, and refactor code.! Shareable - Easily exported, results are in-line with the page so that it’s easy to see how code turns out.! Documented - The code and results are both there without necessitating that someone else run it first!
  • 10. Why is that? Easy - Like using the interactive interpreter but now there is the ability to edit, fix, and refactor code.! Shareable - Easily exported, results are in-line with the page so that it’s easy to see how code turns out.! Polyglot - Something works better with bash? R? Ruby? Perl? No problem, run it from iPython notebook! Documented - The code and results are both there without necessitating that someone else run it first!
  • 12. The basics with an assumption of pyenv We’ll assume you have the basics, now do: $  pyenv  virtualenv  2.7.6  notebook   $  pyenv  global  notebook   $  pip  install  ipython  pyzmq  tornado     (Using pip then using ipython will install notebook too!)
  • 13. The basics with an assumption of pyenv We’ll assume you have the basics, now do: $  pyenv  virtualenv  2.7.6  notebook   $  pyenv  global  notebook   $  pip  install  ipython  pyzmq  tornado     (Using pip then using ipython will install notebook too!) Or follow this handy blog post: http://amaral-lab.org/blog/i-wish-i-knew-then-what-i-know-now-lab-notebooks-a
  • 14. So how can I use this… Start me up on the command line now $  ipython  notebook  
  • 15. So how can I use this… Start me up on the command line now $  ipython  notebook   Navigate to localhost:8888 in your preferred web browser
  • 16. So how can I use this… Start me up on the command line now $  ipython  notebook   Navigate to localhost:8888 in your preferred web browser VOILA!
  • 17. So how can I use this… From the web interface you can create a new notebook
  • 18. So how can I use this… From the web interface you can create a new notebook
  • 19. So how can I use this… From the web interface you can create a new notebook Folders have to be created on the filesystem 
 (terminal or nautilus/finder)
  • 20. So what is the best way to use this? Data Exploration
  • 21. So what is the best way to use this? Data Exploration Learning new libraries/techniques
  • 22. So what is the best way to use this? Data Exploration Learning new libraries/techniques Documenting code/workflow/results
  • 23. So what is the best way to use this? Data Exploration Learning new libraries/techniques Trying different visualizations Documenting code/workflow/results
  • 24. So what is the best way to use this? Data Exploration Learning new libraries/techniques Trying different visualizations Documenting code/workflow/results Looking at small/modular parts
  • 25. What is not a good way to use it? Greater than 15-20 images in a single notebook
  • 26. What is not a good way to use it? Greater than 15-20 images in a single notebook Poor programming practices
 (i.e. no functions or modules)
  • 27. What is not a good way to use it? Greater than 15-20 images in a single notebook Poor programming practices
 (i.e. no functions or modules) Extensive amounts of *production* code
 (Think hundreds or thousands of lines)
  • 28. So how can I set this up… Holy crap! So many ways!
  • 29. So how can I set this up… Holy crap! So many ways! As a one-off as described!
  • 30. So how can I set this up… Holy crap! So many ways! As a one-off as described! As a server!
  • 31. So how can I set this up… Holy crap! So many ways! As a one-off as described! As a server! As a constantly updating resource!
  • 32. Initial caveats first iPython notebook currently has no method of handling two individuals editing the same notebook simultaneously
  • 33. As a one-off Simply do: $  ipython  notebook  
  • 34. As a one-off Simply do: $  ipython  notebook   The cool thing is that iPython notebook can now traverse directories
  • 35. As a one-off Simply do: $  ipython  notebook   The cool thing is that iPython notebook can now traverse directories So *ANY* directory that is a child of the directory where you start the service you can reach it!
  • 36. As a one-off Simply do: $  ipython  notebook   The cool thing is that iPython notebook can now traverse directories So *ANY* directory that is a child of the directory where you start the service you can reach it! But! While iPython notebook can create notebooks from the web page it can’t create folders
  • 37. As a one-off So this is pretty simple then, you can embed the ipython notebooks in your project directories and navigate to them from your project root $  cd  ~   $  nohup  ipython  notebook  &   ! Now navigate to the project code in the browser
  • 38. But I have to keep switching computers …and I can’t remember to keep committing repositories.
  • 39. But I have to keep switching computers …and I can’t remember to keep committing repositories. BAM! Solution!
  • 40. But I have to keep switching computers …and I can’t remember to keep committing repositories. BAM! Solution! Make one folder for ipython notebooks in dropbox!
  • 41. But I have to keep switching computers …and I can’t remember to keep committing repositories. BAM! Solution! Make one folder for ipython notebooks in dropbox! But how do I have ipython notebook start in dropbox?
  • 42. Creating a custom startup directory Create your profile $  ipython  profile  create   $  vi  ~/.ipython/profile_default/ipython_notebook_config   Change line 551 from: #c.NotebookManager.notebook_dir  =  u’’   to: c.NotebookManager.notebook_dir  =       u’/home/staff/$USER/Dropbox/Notebooks/’  
  • 43. Kick it up a notch What if I told you about a world where you could always access your programming environment so long as you had internet?
  • 44. Kick it up a notch What if I told you about a world where you could always access your programming environment so long as you had internet? Or refer to your graphs?
  • 45. Kick it up a notch What if I told you about a world where you could always access your programming environment so long as you had internet? Or refer to your graphs? Or show your partners/collaborators?
  • 46. Make a server! Okay, but hold on there. Here is the HUGE NUMBER ONE RULE
  • 47. Make a server! YOU MUST PASSWORD PROTECT IT!
  • 48. Make a server! YOU MUST PASSWORD PROTECT IT! AND NOT WITH YOUR USER PASSWORD!
  • 49. Make a server! YOU MUST PASSWORD PROTECT IT! AND NOT WITH YOUR USER PASSWORD! MAKE IT A VERYYYY LONG PASSPHRASE
  • 50. So let’s make a password Open iPython from your command line
 (NOT the regular python interpreter!) $  ipython From Thomas Sileo’s blog
  • 51. So let’s make a password Open iPython from your command line
 (NOT the regular python interpreter!) $  ipython From Thomas Sileo’s blog
  • 52. Now set up the profile WITH the password From Thomas Sileo’s blog
  • 53. Now set up the profile WITH the password From Thomas Sileo’s blog
  • 54. And start that baby up! Neat idea:
 Use the server with the notebook directory in your dropbox.
  • 55. And start that baby up! Neat idea:
 Use the server with the notebook directory in your dropbox. Just copy new data files into dropbox and bam! instant transfer and analysis.