!ls -la
!pwd

!pip install numpy
!pip list | grep pandas

"""
Explanation: Jupyter Features CheatSheet

Shell Commands
You can execute Shell commands with the prefix !
End of explanation
"""


%lsmagic

"""
Explanation: Magic Commands
List all Magics
End of explanation
"""


# lists all environment variables
%env
# Set environment variable NUM_THREADS
%env NUM_THREADS=4

"""
Explanation: Avaliable line Magics
python
%alias
%alias_magic
%autocall
%automagic
%autosave
%bookmark
%cat
%cd
%clear
%colors
%config
%connect_info
%cp
%debug
%dhist
%dirs
%doctest_mode
%ed
%edit
%env            # %env: Set Environment Variables
%gui
%hist
%history
%killbgscripts
%ldir
%less
%lf
%lk
%ll
%load
%load_ext
%loadpy
%logoff
%logon
%logstart
%logstate
%logstop
%ls
%lsmagic
%lx
%macro
%magic
%man
%matplotlib
%mkdir
%more
%mv
%notebook
%page
%pastebin
%pdb
%pdef
%pdoc
%pfile
%pinfo
%pinfo2
%popd
%pprint
%precision
%profile
%prun
%psearch
%psource
%pushd
%pwd
%pycat
%pylab
%qtconsole
%quickref
%recall
%rehashx
%reload_ext
%rep
%rerun
%reset
%reset_selective
%rm
%rmdir
%run
%save
%sc
%set_env
%store
%sx
%system
%tb
%time        # time code execution
%timeit      # time code execution
%unalias
%unload_ext
%who
%who_ls
%whos
%xdel
%xmode
%env
End of explanation
"""


# %run: Execute python code
# Run another nothebook entirely
%run ../sample_files/hello_world.ipynb

"""
Explanation: %run
End of explanation
"""


# loads content of a file into the cell
# %load ../sample_files/hello_world.py
if __name__ == "__main__":
  print("Hello World!")

"""
Explanation: %load
End of explanation
"""


# %time will give you information about a single run of the code in your cell.
%time
import time
for _ in range(1000):
  time.sleep(0.01)# sleep for 0.01 seconds

# %timeit uses the Python timeit module which runs a statement 100,000 times (by default) and then provides the mean of the fastest three times.
import numpy
%timeit numpy.random.normal(size=100)

"""
Explanation: %time & timesit
End of explanation
"""


%matplotlib inline
import matplotlib.pyplot as plt
x = range(1000)
y = [i ** 2 for i in x]
plt.plot(x,y)
plt.show();

%config InlineBackend.figure_format = 'retina'
plt.plot(x,y)
plt.show();

"""
Explanation: Highres Output
End of explanation
"""


%%!
%%HTML
%%SVG
%%bash
%%capture
%%debug
%%file
%%html
%%javascript
%%js
%%latex
%%perl
%%prun
%%pypy
%%python
%%python2
%%python3
%%ruby
%%script
%%sh
%%svg
%%sx
%%system
%%time
%%timeit
%%writefile

from IPython.display import Image
Image(filename='../sample_files/xkcd_estimation.png')

from IPython.display import Image
Image(url='http://python.org/images/python-logo.gif')

from IPython.display import YouTubeVideo
YouTubeVideo('1j_HxD4iLn8')

import antigravity

"""
Explanation: Available Cell Magics
End of explanation
"""


