On-line Laboratary for Dynamical Systems On IPython

Index

This purpose of package is to avail ubiquitous on-line Lab for Dynamical Systems, with minimal resources but unlimit gains.

To implement the platform, we use the following Python and IPython (notebook interface) as the user interface on the top of power Python computing environment. Sources can be re-used on Sage Notebook.

[Python Modules Requirement]

  • Python - 2.7.x, 3.4.x
  • SciPy/NumPy
  • Matplotlib+ IVisual
  • IPython (2.+], ipywidgets, JSAnimation, ipy_table
  • SymPy

[Topics]


In [1]:
from IPython.core.display import HTML
def css_styling():
    styles = open("styles/custom.css", "r").read()
    return HTML(styles)
css_styling()


Out[1]:


In [ ]:

Git Tutorial


In [1]:
import sha

# Our first commit
data1 = 'Math 2014 - Lecture 1 '
meta1 = 'date: 8/1/14'
hash1 = sha.sha(data1 + meta1).hexdigest()
print 'Hash:', hash1


Hash: 5af60e11e3856fad759c830257ece50c115b708a

In [3]:
%%bash
git config --global user.name "Chu-ching Huang"
git config --global user.email "cchuang2009@gmail.com"

In [4]:
%%bash
rm -rf lecture
git init lecture


Initialized empty Git repository in /Users/cch/Desktop/IPythonNotebook/math-2014/lecture/.git/

In [5]:
%%bash
cd lecture

ls -la


total 0
drwxr-xr-x   3 cch  staff  102  7 29 08:57 .
drwxr-xr-x  24 cch  staff  816  7 29 08:57 ..
drwxr-xr-x  10 cch  staff  340  7 29 08:57 .git

In [6]:
%%bash
cd lecture

echo "Lecture2014 for Math" > file1.txt

In [3]:
%%bash
cd lecture

git status


# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#	file1.txt
nothing added to commit but untracked files present (use "git add" to track)

In [4]:
%%bash
cd lecture

git commit -a -m"This is our first commit"


# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#	file1.txt
nothing added to commit but untracked files present (use "git add" to track)

In [11]:
%%bash

cp -rp 1 lecture/

In [13]:
%%bash


cp index.ipynb lecture
cp -rp imgs lecture
cp -rp styles lecture
ls -l lecture


total 40
drwxr-xr-x  7 cch  staff    238  7 28 14:22 1
-rw-r--r--  1 cch  staff     21  7 29 08:58 file1.txt
drwxrwxrwx  8 cch  staff    272  7 15 01:25 imgs
-rwxr-xr-x  1 cch  staff  15689  7 29 09:19 index.ipynb
drwxrwxrwx  5 cch  staff    170  7 24 13:39 styles

In [8]:
%%bash

cd lecture
git add index.ipynb
git add styles
git add imgs
git add 1
git commit -m "Math 2014 lecture 1"


# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#	file1.txt
nothing added to commit but untracked files present (use "git add" to track)

In [20]:
%%bash

cd lecture
git add README.md
git commit -m "Math 2014"


[master 93abafc] Math 2014
 1 file changed, 29 insertions(+), 33 deletions(-)
 rewrite README.md (80%)

In [14]:
%%bash

cd lecture
git add index.html
git commit -m "Math 2014"


# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#   (use "git push" to publish your local commits)
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#	file1.txt
nothing added to commit but untracked files present (use "git add" to track)

In [22]:
%%bash

cd lecture
git add 2
git add 3
git add 4
git add 8
git commit -m "Math 2014 2-8"


[master d7129ab] Math 2014 2-8
 84 files changed, 92866 insertions(+)
 create mode 100644 2/.DS_Store
 create mode 100755 2/.ipynb_checkpoints/2013-2-math-2-checkpoint.ipynb
 create mode 100644 2/.ipynb_checkpoints/Untitled0-checkpoint.ipynb
 create mode 100755 2/2013-2-math-2.ipynb
 create mode 100755 2/images/.DS_Store
 create mode 100644 2/images/2-dim.png
 create mode 100644 2/images/3-dim.png
 create mode 100755 2/images/Cantor.png
 create mode 100755 2/images/Chrysanthemum.png
 create mode 100755 2/images/Koch.gif
 create mode 100755 2/images/LW306.jpg
 create mode 100755 2/images/LW389.jpg
 create mode 100755 2/images/Mandelbrot.jpg
 create mode 100755 2/images/Monalisa.png
 create mode 100755 2/images/Sierpinski.gif
 create mode 100755 2/images/Sierpinski.jpg
 create mode 100755 2/images/abs.png
 create mode 100755 2/images/britain.png
 create mode 100755 2/images/coastline.png
 create mode 100755 2/images/galois.png
 create mode 100755 2/images/housedorff.jpg
 create mode 100755 2/images/julia.gif
 create mode 100755 2/images/julia.pgm
 create mode 100755 2/images/julia.png
 create mode 100755 2/images/koch.jpg
 create mode 100755 2/images/ms.gif
 create mode 100755 2/images/patrick.png
 create mode 100755 2/images/sunflower.png
 create mode 100755 2/images/sunflower1.png
 create mode 100755 2/images/sunflower2.png
 create mode 100644 2/images/test.svg
 create mode 100755 2/images/traj.png
 create mode 100755 2/styles/.DS_Store
 create mode 100755 2/styles/custom.css
 create mode 100755 2/styles/impress-demo.css
 create mode 100644 3/.DS_Store
 create mode 100755 3/.ipynb_checkpoints/2013-2-3-checkpoint.ipynb
 create mode 100755 3/2013-2-3.ipynb
 create mode 100644 3/data/.DS_Store
 create mode 100644 3/data/audio/.DS_Store
 create mode 100755 3/data/audio/AltoSax440.wav
 create mode 100755 3/data/audio/Flute440.wav
 create mode 100755 3/data/audio/Guitar440.wav
 create mode 100755 3/data/audio/README
 create mode 100755 3/data/audio/Vincent.mp3
 create mode 100755 3/data/audio/Violin443.mp3
 create mode 100755 3/data/audio/Violin443.wav
 create mode 100755 3/data/audio/african.wav
 create mode 100755 3/data/audio/bird.wav
 create mode 100755 3/data/audio/blues.wav
 create mode 100755 3/data/audio/classical.wav
 create mode 100755 3/data/audio/country.wav
 create mode 100755 3/data/audio/disco.wav
 create mode 100755 3/data/audio/flute.wav
 create mode 100755 3/data/audio/hiphop.wav
 create mode 100755 3/data/audio/jazz.wav
 create mode 100755 3/data/audio/metal.wav
 create mode 100755 3/data/audio/pop.wav
 create mode 100755 3/data/audio/reggae.wav
 create mode 100755 3/data/audio/rock.wav
 create mode 100755 3/data/audio/sine/sine_a.wav
 create mode 100755 3/data/audio/sine/sine_b.wav
 create mode 100755 3/data/audio/sine/sine_mix.wav
 create mode 100755 3/data/audio/sinea.wav
 create mode 100755 3/data/images/American.png
 create mode 100755 3/data/images/Fourier.jpg
 create mode 100755 3/data/images/archimedes.png
 create mode 100755 3/data/images/fft.gif
 create mode 100755 3/data/images/moonlanding.png
 create mode 100755 3/data/images/newton.png
 create mode 100644 4/.DS_Store
 create mode 100755 4/2013-2-4.ipynb
 create mode 100755 4/images/Godwin.jpg
 create mode 100755 4/images/TinTin.jpg
 create mode 100755 4/images/elephant.gif
 create mode 100755 4/images/elephant.jpg
 create mode 100755 4/images/japan.jpg
 create mode 100755 4/images/star.jpg
 create mode 100644 8/.DS_Store
 create mode 100644 8/.ipynb_checkpoints/2014-2-8-checkpoint.ipynb
 create mode 100644 8/2014-2-8.ipynb
 create mode 100755 8/images/neighbor2.png
 create mode 100755 8/images/numpyVec.png
 create mode 100755 8/lottery.ipynb

In [23]:
%%bash

cd lecture
git push -u origin master


Branch master set up to track remote branch master from origin.
To https://github.com/cchuang2009/math2014.git
   93abafc..d7129ab  master -> master

In [9]:
%%bash

cd lecture
git status


# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#	file1.txt
nothing added to commit but untracked files present (use "git add" to track)

In [14]:
!git clone https://github.com/cchuang2009/math2014


Cloning into 'math2014'...
Username for 'https://github.com': ^C

Note

Create a new repository on the command line

> touch README.md
> git init
> git add README.md
> git commit -m "first commit"
> git remote add origin https://github.com/cchuang2009/math2014.git
> git push -u origin master

Push an existing repository from the command line

> git remote add origin https://github.com/cchuang2009/math2014.git
> git push -u origin master  > touch README.md

In [ ]: