Introduction to ipython notebook

Post on 07-Jul-2015

198 views 1 download

description

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

Transcript of Introduction to ipython notebook

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

Go Frendi Gunawan

About Me

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

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)

Install Python

● Linux and Mac user:– Pre installed

– pip install any-package

● Windows user:– Use Enthought Canopy or

– Anaconda

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):

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/

Markdown Syntax(Simple yet beautiful)

LAT

EX

(Write your formulas like a boss)

Python(The magical language)

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

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

2D plot

3D plot

Markdown + LAT

EX + Python = Awesomeness

Markdown & LATEX

Python

The Show (What You See is What You Code)

Mix them up

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.

Thank youありがとう