default-45.json 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. {
  2. "cells": [
  3. {
  4. "id": "cell_1",
  5. "cell_type": "code",
  6. "execution_count": 1,
  7. "metadata": {
  8. "tags": []
  9. },
  10. "outputs": [
  11. {
  12. "name": "stdout",
  13. "output_type": "stream",
  14. "text": ["hello world\n", "0\n", "1\n", "2\n"]
  15. },
  16. {
  17. "name": "stderr",
  18. "output_type": "stream",
  19. "text": ["output to stderr\n"]
  20. },
  21. {
  22. "name": "stdout",
  23. "output_type": "stream",
  24. "text": ["some more stdout text\n"]
  25. }
  26. ],
  27. "source": [
  28. "import sys\n",
  29. "sys.stdout.write('hello world\\n')\n",
  30. "sys.stdout.flush()\n",
  31. "for i in range(3):\n",
  32. " sys.stdout.write('%s\\n' % i)\n",
  33. " sys.stdout.flush()\n",
  34. "sys.stderr.write('output to stderr\\n')\n",
  35. "sys.stderr.flush()\n",
  36. "sys.stdout.write('some more stdout text\\n')\n",
  37. "sys.stdout.flush()"
  38. ]
  39. },
  40. {
  41. "id": "cell_2",
  42. "cell_type": "markdown",
  43. "metadata": {
  44. "tags": []
  45. },
  46. "source": [
  47. "# Markdown Cell\n",
  48. "\n",
  49. "$ e^{ \\pm i\\theta } = \\cos \\theta \\pm i\\sin \\theta + \\beta $\n",
  50. "\n",
  51. "*It* **really** is!"
  52. ]
  53. },
  54. {
  55. "id": "cell_3",
  56. "cell_type": "raw",
  57. "metadata": {
  58. "tags": []
  59. },
  60. "source": ["Raw Cell\n", "\n", "Second line"]
  61. },
  62. {
  63. "id": "cell_4",
  64. "cell_type": "code",
  65. "execution_count": 2,
  66. "metadata": {
  67. "tags": []
  68. },
  69. "outputs": [
  70. {
  71. "ename": "SyntaxError",
  72. "evalue": "invalid syntax (<ipython-input-2-6c5185427360>, line 1)",
  73. "output_type": "error",
  74. "traceback": [
  75. "\u001b[0;36m File \u001b[0;32m\"<ipython-input-2-6c5185427360>\"\u001b[0;36m, line \u001b[0;32m1\u001b[0m\n\u001b[0;31m this is a syntax error\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
  76. ]
  77. }
  78. ],
  79. "source": ["this is a syntax error"]
  80. },
  81. {
  82. "id": "cell_5",
  83. "cell_type": "code",
  84. "execution_count": null,
  85. "metadata": {
  86. "tags": []
  87. },
  88. "outputs": [],
  89. "source": ["print('test')"]
  90. },
  91. {
  92. "id": "cell_6",
  93. "cell_type": "code",
  94. "execution_count": 4,
  95. "metadata": {
  96. "tags": []
  97. },
  98. "outputs": [
  99. {
  100. "data": {
  101. "text/latex": [
  102. "The mass-energy equivalence is described by the famous equation\n",
  103. " \n",
  104. "$$E=mc^2$$\n",
  105. " \n",
  106. "discovered in 1905 by Albert Einstein. \n",
  107. "In natural units ($c$ = 1), the formula expresses the identity\n",
  108. " \n",
  109. "\\begin{equation}\n",
  110. "E=m\n",
  111. "\\end{equation}"
  112. ],
  113. "text/plain": ["<IPython.core.display.Latex object>"]
  114. },
  115. "execution_count": 4,
  116. "metadata": {},
  117. "output_type": "execute_result"
  118. }
  119. ],
  120. "source": [
  121. "from IPython.display import Latex\n",
  122. "Latex('''The mass-energy equivalence is described by the famous equation\n",
  123. " \n",
  124. "$$E=mc^2$$\n",
  125. " \n",
  126. "discovered in 1905 by Albert Einstein. \n",
  127. "In natural units ($c$ = 1), the formula expresses the identity\n",
  128. " \n",
  129. "\\\\begin{equation}\n",
  130. "E=m\n",
  131. "\\\\end{equation}''')"
  132. ]
  133. },
  134. {
  135. "id": "cell_7",
  136. "cell_type": "code",
  137. "execution_count": null,
  138. "metadata": {
  139. "collapsed": true
  140. },
  141. "outputs": [],
  142. "source": []
  143. }
  144. ],
  145. "metadata": {
  146. "anaconda-cloud": {},
  147. "kernelspec": {
  148. "display_name": "Python [default]",
  149. "language": "python",
  150. "name": "python3"
  151. },
  152. "language_info": {
  153. "codemirror_mode": {
  154. "name": "ipython",
  155. "version": 3
  156. },
  157. "file_extension": ".py",
  158. "mimetype": "text/x-python",
  159. "name": "python",
  160. "nbconvert_exporter": "python",
  161. "pygments_lexer": "ipython3",
  162. "version": "3.5.2"
  163. }
  164. },
  165. "nbformat": 4,
  166. "nbformat_minor": 5
  167. }