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Jupyter Notebook\n",
|
| 8 |
+
"\n",
|
| 9 |
+
"This environment is optimized for mobile development. The classic Jupyter Notebook interface is more touch-friendly than JupyterLab.\n",
|
| 10 |
+
"\n",
|
| 11 |
+
"## Basic Usage\n",
|
| 12 |
+
"\n",
|
| 13 |
+
"- Tap a cell to select it\n",
|
| 14 |
+
"- Use the toolbar buttons to run cells\n",
|
| 15 |
+
"- Create new cells with the + button\n",
|
| 16 |
+
"- Save your work frequently"
|
| 17 |
+
]
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"cell_type": "code",
|
| 21 |
+
"execution_count": null,
|
| 22 |
+
"metadata": {},
|
| 23 |
+
"source": [
|
| 24 |
+
"# Simple test to verify the environment\n",
|
| 25 |
+
"print(\"Hello from Jupyter!\")"
|
| 26 |
+
]
|
| 27 |
+
},
|
| 28 |
+
{
|
| 29 |
+
"cell_type": "markdown",
|
| 30 |
+
"metadata": {},
|
| 31 |
+
"source": [
|
| 32 |
+
"## Available Libraries\n",
|
| 33 |
+
"\n",
|
| 34 |
+
"Let's check what libraries are available:"
|
| 35 |
+
]
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"cell_type": "code",
|
| 39 |
+
"execution_count": null,
|
| 40 |
+
"metadata": {},
|
| 41 |
+
"source": [
|
| 42 |
+
"import numpy as np\n",
|
| 43 |
+
"import pandas as pd\n",
|
| 44 |
+
"import matplotlib.pyplot as plt\n",
|
| 45 |
+
"import torch\n",
|
| 46 |
+
"import transformers\n",
|
| 47 |
+
"\n",
|
| 48 |
+
"libraries = {\n",
|
| 49 |
+
" \"NumPy\": np.__version__,\n",
|
| 50 |
+
" \"Pandas\": pd.__version__,\n",
|
| 51 |
+
" \"PyTorch\": torch.__version__,\n",
|
| 52 |
+
" \"Transformers\": transformers.__version__\n",
|
| 53 |
+
"}\n",
|
| 54 |
+
"\n",
|
| 55 |
+
"for lib, version in libraries.items():\n",
|
| 56 |
+
" print(f\"{lib}: {version}\")"
|
| 57 |
+
]
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"cell_type": "markdown",
|
| 61 |
+
"metadata": {},
|
| 62 |
+
"source": [
|
| 63 |
+
"## Simple Data Visualization\n",
|
| 64 |
+
"\n",
|
| 65 |
+
"Here's a basic example of data visualization that should work well on mobile:"
|
| 66 |
+
]
|
| 67 |
+
},
|
| 68 |
+
{
|
| 69 |
+
"cell_type": "code",
|
| 70 |
+
"execution_count": null,
|
| 71 |
+
"metadata": {},
|
| 72 |
+
"source": [
|
| 73 |
+
"# Configure matplotlib for better mobile display\n",
|
| 74 |
+
"plt.rcParams['figure.figsize'] = (8, 6) # Smaller figure size\n",
|
| 75 |
+
"plt.rcParams['font.size'] = 14 # Larger font\n",
|
| 76 |
+
"plt.rcParams['lines.linewidth'] = 3 # Thicker lines\n",
|
| 77 |
+
"plt.rcParams['axes.labelsize'] = 14 # Larger axis labels\n",
|
| 78 |
+
"plt.rcParams['axes.titlesize'] = 16 # Larger title\n",
|
| 79 |
+
"\n",
|
| 80 |
+
"# Generate sample data\n",
|
| 81 |
+
"x = np.linspace(0, 10, 30) # Fewer points for mobile\n",
|
| 82 |
+
"y = np.sin(x)\n",
|
| 83 |
+
"\n",
|
| 84 |
+
"# Create the plot\n",
|
| 85 |
+
"plt.figure()\n",
|
| 86 |
+
"plt.plot(x, y, 'o-', markersize=8)\n",
|
| 87 |
+
"plt.title('Mobile-Friendly Plot')\n",
|
| 88 |
+
"plt.xlabel('X axis')\n",
|
| 89 |
+
"plt.ylabel('Y axis')\n",
|
| 90 |
+
"plt.grid(True)\n",
|
| 91 |
+
"plt.tight_layout()\n",
|
| 92 |
+
"plt.show()"
|
| 93 |
+
]
|
| 94 |
+
},
|
| 95 |
+
{
|
| 96 |
+
"cell_type": "markdown",
|
| 97 |
+
"metadata": {},
|
| 98 |
+
"source": [
|
| 99 |
+
"## Creating a New Notebook\n",
|
| 100 |
+
"\n",
|
| 101 |
+
"To create a new notebook:\n",
|
| 102 |
+
"\n",
|
| 103 |
+
"1. Click the \"Files\" tab at the top\n",
|
| 104 |
+
"2. Navigate to the directory where you want to create the notebook\n",
|
| 105 |
+
"3. Click the \"New\" dropdown menu and select \"Python 3\"\n",
|
| 106 |
+
"\n",
|
| 107 |
+
"## Tips for Mobile Development\n",
|
| 108 |
+
"\n",
|
| 109 |
+
"- Keep code cells short and focused\n",
|
| 110 |
+
"- Use markdown cells for documentation\n",
|
| 111 |
+
"- Save your work frequently\n",
|
| 112 |
+
"- For long sessions, consider using an external keyboard"
|
| 113 |
+
]
|
| 114 |
+
}
|
| 115 |
+
],
|
| 116 |
+
"metadata": {
|
| 117 |
+
"kernelspec": {
|
| 118 |
+
"display_name": "Python 3",
|
| 119 |
+
"language": "python",
|
| 120 |
+
"name": "python3"
|
| 121 |
+
},
|
| 122 |
+
"language_info": {
|
| 123 |
+
"codemirror_mode": {
|
| 124 |
+
"name": "ipython",
|
| 125 |
+
"version": 3
|
| 126 |
+
},
|
| 127 |
+
"file_extension": ".py",
|
| 128 |
+
"mimetype": "text/x-python",
|
| 129 |
+
"name": "python",
|
| 130 |
+
"nbconvert_exporter": "python",
|
| 131 |
+
"pygments_lexer": "ipython3",
|
| 132 |
+
"version": "3.9.0"
|
| 133 |
+
}
|
| 134 |
+
},
|
| 135 |
+
"nbformat": 4,
|
| 136 |
+
"nbformat_minor": 4
|
| 137 |
+
}
|