{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Trade T1 Notebook Smoke Test\n", "\n", "This notebook checks `Jupyter` rendering in Gitea.\n", "\n", "Inline math: $e^{i\\\\pi} + 1 = 0$.\n", "\n", "Display math:\n", "\n", "$$\n", "\\\\sigma(x) = \\\\frac{1}{1 + e^{-x}}\n", "$$\n" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "peak amplitude: 1.0000\\n" ] }, { "data": { "image/svg+xml": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " matplotlib sine wave demo\n", " x\n", " y\n", " 0\n", " π\n", " \n", " 1.0\n", " -1.0\n", "\n" ], "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import numpy as np\\n", "import matplotlib.pyplot as plt\\n", "\\n", "x = np.linspace(0, 2 * np.pi, 200)\\n", "y = np.sin(x)\\n", "\\n", "fig, ax = plt.subplots(figsize=(6, 3))\\n", "ax.plot(x, y, color='tab:blue', linewidth=2, label='sin(x)')\\n", "ax.scatter([0, np.pi, 2 * np.pi], [0, 0, 0], color='tab:red', zorder=3)\\n", "ax.set_title('matplotlib sine wave demo')\\n", "ax.set_xlabel('x')\\n", "ax.set_ylabel('y')\\n", "ax.grid(True, alpha=0.25)\\n", "ax.legend()\\n", "print(f'peak amplitude: {y.max():.4f}')\\n", "plt.show()\\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Rendered SVG output above is embedded in the notebook, so Gitea can display it without executing Python on the server.\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.0" } }, "nbformat": 4, "nbformat_minor": 5 }