# 2019-Jul-02 ## Hi Long time no see!! ## update pycharm to newest ``` https://www.jetbrains.com/pycharm/download/download-thanks.html?platform=windows&code=PCC ``` ## python & automation ### https://selenium-python.readthedocs.io/ ## pip erercise ``` pip list ``` ### jupyter (notebook) #### ipython notebook #### .ipynb ``` pip install --upgrade ipython matplotlib pyreadline pandas numpy pip install --upgrade ipython[notebook] ``` ### 'python -m pip install --upgrade pip' ### for OSX ``` which python2.7 ``` ### should be /Library/Frameworks/Python.Frameworks/.... ### for OSX ``` python2.7 -m pip install --upgrade pip ``` ### for windows ``` c:\python27\python -m pip install --upgrade pip ``` ### major.minor.bugfix ``` pip search tensorflow ``` ``` cd C:\Users\mark\cht_python_notebook c:\python27\Scripts\jupyter-notebook ``` ## jupyter ### alt+enter ==>new a cell (and calculate current cell) ### ctrl+enter ==> calculate current cell ### demo code ``` # matplotlib inline import matplotlib.pyplot as plt x = range(0,20) plt.plot(x,x) plt.show() ``` ### inside terminal ``` who x = 5 y = 7 z = x**y ``` ### ``` https://getmdl.io/customize/index.html ``` ``` https://c3js.org/examples.html ``` ``` https://vaadin.com/components/demo-apps/data-entry ``` ### scipy framework #### https://scipy.org/ ``` a1 = np.array(l1) a2 = np.array(l2) a1+a2, a1-a2, a1*a2, a1/a2 ``` ### https://cs.nyu.edu/~mohri/mlbook/ ``` x1 = np.array([2,4,6,8]) x2 = np.array([8,6,4,2]) x1*x2 ``` ``` array1 = np.array([[1,2,3],[4,5,6]]) print array1 print array1.transpose() print array1.transpose().shape print array1.shape ``` ``` array1.dot(array1.transpose()) array1.transpose().dot(array1) ``` ### https://www.gnu.org/software/octave/ ### https://zeppelin.apache.org/ ### https://cloud.google.com/datalab/ ### https://colab.research.google.com/notebooks/welcome.ipynb#recent=true ### https://www.sympy.org/en/index.html ``` Max(1,x) ``` ### https://scikit-learn.org/ ### exec program #### ctrl+shift+F10 ### ctrl+alt+L #### foramt program ### ctrl+shoft+F #### search within project ### shift*2 #### open dialog to search everywhere ``` x = 5 print 'x=%d,x id=%s' % (x, str(id(x))) x = 6 print 'x=%d,x id=%s' % (x, str(id(x))) l1 = [5] print type(l1) print 'content inside l1=%d, l1 id=%s' % (l1[0], str(id(l1))) l1[0] = 6 print 'content inside l1=%d, l1 id=%s' % (l1[0], str(id(l1))) class person: def __init__(self, age): self.x = age pass pass p1 = person(5) print("p1.age=%d, p1 id=%s" % (p1.age, str(id(p1)))) ```