introduction to ipython notebook

20
Introduction to IPython-Notebook (aka: Python for Scientist) Go Frendi Gunawan

Upload: go-asgard

Post on 07-Jul-2015

198 views

Category:

Education


1 download

DESCRIPTION

The Basic of IPython-Notebook and why you should use it.

TRANSCRIPT

Page 1: Introduction to ipython notebook

Introduction to IPython-Notebook(aka: Python for Scientist)

Go Frendi Gunawan

Page 2: Introduction to ipython notebook

About Me

● Go Frendi Gunawan● Developer of No-CMS and Kokoropy● Lecturer at STIKI Malang● Pythonista● http://gofrendiasgard.github.io

Page 3: Introduction to ipython notebook

Why Python?

● Free● Multi-Purpose Language● OOP, Imperative, Simple● Open Source● Strong Community● Easy to Learn ● Packaging System (PIP)● Interactive Python (IPython)● Interactive Python with Web Interface (IPython Notebook)

Page 4: Introduction to ipython notebook

Install Python

● Linux and Mac user:– Pre installed

– pip install any-package

● Windows user:– Use Enthought Canopy or

– Anaconda

Page 5: Introduction to ipython notebook

Start Notebook● Open up your command prompt and type this:

– ipython notebook

● Open your browser (firefox, chrome)– http://localhost:8888

● This is Notebook (try to make a new notebook):

Page 6: Introduction to ipython notebook

Why Notebook is Great?

● It is literally a notebook● Supporting Markdown Syntax

● Supporting LATEX

● Supporting Python-scripting (of course)● See the result of your script immediately● Share it to your friends or through nbviewer

http://nbviewer.ipython.org/

Page 7: Introduction to ipython notebook

Markdown Syntax(Simple yet beautiful)

Page 8: Introduction to ipython notebook

LAT

EX

(Write your formulas like a boss)

Page 9: Introduction to ipython notebook

Python(The magical language)

Page 10: Introduction to ipython notebook

A Bit Python

a, b = 5, 7

a, b = b, a

print(a,b)

if a==7: print ” ”すごい

else: print “not cool”

blood=['a','b','ab','o','unknown']

print blood[0]print blood[0:2]print blood[0:len(blood)]print blood[0:5:2]

for x in blood: print x

i = 0while i<len(blood): print blood[i] i = i+1

Page 11: Introduction to ipython notebook

Libraries

● There is no native scientific function in Python● There are libraries to do that

– Numpy

– Matplotlib

– Scipy

– Scikit-Learn

– Panda

– Simpy

– Sympy

– Python-OpenCV

Page 12: Introduction to ipython notebook

2D plot

Page 13: Introduction to ipython notebook

3D plot

Page 14: Introduction to ipython notebook

Markdown + LAT

EX + Python = Awesomeness

Page 15: Introduction to ipython notebook

Markdown & LATEX

Page 16: Introduction to ipython notebook

Python

Page 17: Introduction to ipython notebook

The Show (What You See is What You Code)

Page 18: Introduction to ipython notebook

Mix them up

Page 19: Introduction to ipython notebook

Conclusion

● Using IPython Notebook, you can:– Write some notes.

– Write mathematics formulas.

– Write Python Codes.

– See what you code immediately.

– Share your works and idea easily.

– Do almost everything you can do with matlab (and even more) for free.

Page 20: Introduction to ipython notebook

Thank youありがとう