You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

notebook_tips.py 3.5 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. # ---
  2. # jupyter:
  3. # jupytext_format_version: '1.2'
  4. # kernelspec:
  5. # display_name: Python 3
  6. # language: python
  7. # name: python3
  8. # language_info:
  9. # codemirror_mode:
  10. # name: ipython
  11. # version: 3
  12. # file_extension: .py
  13. # mimetype: text/x-python
  14. # name: python
  15. # nbconvert_exporter: python
  16. # pygments_lexer: ipython3
  17. # version: 3.5.2
  18. # ---
  19. # ## Show LaTeX equation
  20. #
  21. #
  22. from IPython.core.display import HTML
  23. HTML("""
  24. <style>
  25. div.cell { /* Tunes the space between cells */
  26. margin-top:1em;
  27. margin-bottom:1em;
  28. }
  29. div.text_cell_render h1 { /* Main titles bigger, centered */
  30. font-size: 2.2em;
  31. line-height:1.4em;
  32. text-align:center;
  33. }
  34. div.text_cell_render h2 { /* Parts names nearer from text */
  35. margin-bottom: -0.4em;
  36. }
  37. div.text_cell_render { /* Customize text cells */
  38. font-family: 'Times New Roman';
  39. font-size:1.5em;
  40. line-height:1.4em;
  41. padding-left:3em;
  42. padding-right:3em;
  43. }
  44. </style>
  45. """)
  46. from IPython.display import Latex
  47. Latex(r"""\begin{eqnarray}
  48. \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\
  49. \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\
  50. \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\
  51. \nabla \cdot \vec{\mathbf{B}} & = 0
  52. \end{eqnarray}""")
  53. # %%latex
  54. \begin{align}
  55. \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\
  56. \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\
  57. \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\
  58. \nabla \cdot \vec{\mathbf{B}} & = 0
  59. \end{align}
  60. # \begin{align}
  61. # \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\
  62. # \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\
  63. # \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\
  64. # \nabla \cdot \vec{\mathbf{B}} & = 0
  65. # \end{align}
  66. #
  67. # \begin{equation}
  68. # E = F \cdot s
  69. # \end{equation}
  70. #
  71. # \begin{eqnarray}
  72. # F & = & sin(x) \\
  73. # G & = & cos(x)
  74. # \end{eqnarray}
  75. #
  76. # \begin{align}
  77. # g &= \int_a^b f(x)dx \label{eq1} \\
  78. # a &= b + c \label{eq2}
  79. # \end{align}
  80. #
  81. # See (\ref{eq1})
  82. # ## Audio
  83. #
  84. from IPython.display import Audio
  85. Audio(url="http://www.nch.com.au/acm/8k16bitpcm.wav")
  86. # +
  87. import numpy as np
  88. max_time = 3
  89. f1 = 220.0
  90. f2 = 224.0
  91. rate = 8000.0
  92. L = 3
  93. times = np.linspace(0,L,rate*L)
  94. signal = np.sin(2*np.pi*f1*times) + np.sin(2*np.pi*f2*times)
  95. Audio(data=signal, rate=rate)
  96. # -
  97. # ## External sites
  98. # + {"scrolled": true}
  99. from IPython.display import IFrame
  100. IFrame('https://jupyter.org', width='100%', height=350)
  101. # -
  102. # ## JupyterLab
  103. # +
  104. import numpy as np
  105. from pprint import pprint
  106. pp = pprint
  107. a = np.array([1, 2, 3])
  108. pp(a)
  109. # -
  110. # ### [jupyter-matplotlib](https://github.com/matplotlib/jupyter-matplotlib)
  111. #
  112. #
  113. # ```
  114. # # Installing Node.js 5.x on Ubuntu / Debian
  115. # curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
  116. # sudo apt-get install -y nodejs
  117. #
  118. # pip install ipympl
  119. #
  120. # # If using JupyterLab
  121. # # Install nodejs: https://nodejs.org/en/download/
  122. # jupyter labextension install @jupyter-widgets/jupyterlab-manager
  123. # jupyter labextension install jupyter-matplotlib
  124. # ```
  125. # ## References
  126. #
  127. # * https://nbviewer.jupyter.org/github/ipython/ipython/blob/master/examples/IPython%20Kernel/Index.ipynb

机器学习越来越多应用到飞行器、机器人等领域,其目的是利用计算机实现类似人类的智能,从而实现装备的智能化与无人化。本课程旨在引导学生掌握机器学习的基本知识、典型方法与技术,通过具体的应用案例激发学生对该学科的兴趣,鼓励学生能够从人工智能的角度来分析、解决飞行器、机器人所面临的问题和挑战。本课程主要内容包括Python编程基础,机器学习模型,无监督学习、监督学习、深度学习基础知识与实现,并学习如何利用机器学习解决实际问题,从而全面提升自我的《综合能力》。