You are on page 1of 46

Data Science

Jupyter and Numpy


Online Jupyter
Anaconda Installation
• [root@localhost Desktop]# chmod +x
Anaconda3-5.1.0-Linux-x86_64.sh
• [root@localhost Desktop]# ./Anaconda3-
5.1.0-Linux-x86_64.sh
• [root@localhost Desktop]# export
PATH=/root/anaconda3/bin:$PATH
• [root@localhost Desktop]# echo 'export
PATH=/root/anaconda3/bin:$PATH' >>
/root/.bashrc
Starts Jupyter
• [root@localhost ~]# firewall-cmd --add-
port=8888/tcp
• [root@localhost ~]# firewall-cmd --add-
port=8888/tcp --permanent

• [root@localhost Desktop]# nohup jupyter


notebook --allow-root --ip=192.168.0.5 --
port=8888 &

• For url and token => # cat nohup.out


Ipynb file extension
• An IPYNB file is a notebook document used by
Jupyter Notebook, an interactive
computational environment designed to help
scientists work with the python language and
their data.
• NOTE: Jupyter notebooks were formerly
known as IPython notebooks, which is where
the "ipynb" extension got its name
To run code in cell of juypter
Interrupt Kernel
• ## use base python version with only numpy
module install
• # conda create --name myenv numpy
• Or
• #### install complete amaconda with
python3.6 installed
• # conda create --name mypy3.6env
python=3.6 anaconda
• [root@localhost ~]# source activate
mypy3.6env
• (mypy3.6env) [root@localhost ~]# python
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16
2018, 18:10:19)
• # source deactivate
Python map
Python lambda
Python filter
Tuple Unpacking
• [root@localhost ~]# conda list numpy
• # packages in environment at /root/anaconda3:
• #
• # Name Version Build
Channel
• numpy 1.14.0 py36h3dfced4_1
• numpydoc 0.7.0 py36h18f165f_0
Numpy to create 1d or 2d array
Array Copy
Universal Func
• https://docs.scipy.org/doc/numpy-
1.14.0/reference/ufuncs.html

You might also like