mirror of
https://github.com/catppuccin/catppuccin
synced 2024-11-22 03:23:04 +00:00
119 lines
78 KiB
Text
119 lines
78 KiB
Text
|
{
|
|||
|
"metadata": {
|
|||
|
"kernelspec": {
|
|||
|
"name": "python",
|
|||
|
"display_name": "Python (Pyodide)",
|
|||
|
"language": "python"
|
|||
|
},
|
|||
|
"language_info": {
|
|||
|
"codemirror_mode": {
|
|||
|
"name": "python",
|
|||
|
"version": 3
|
|||
|
},
|
|||
|
"file_extension": ".py",
|
|||
|
"mimetype": "text/x-python",
|
|||
|
"name": "python",
|
|||
|
"nbconvert_exporter": "python",
|
|||
|
"pygments_lexer": "ipython3",
|
|||
|
"version": "3.8"
|
|||
|
}
|
|||
|
},
|
|||
|
"nbformat_minor": 5,
|
|||
|
"nbformat": 4,
|
|||
|
"cells": [
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"source": [
|
|||
|
"# Introduction to the JupyterLab and Jupyter Notebooks\n",
|
|||
|
"\n",
|
|||
|
"This is a short introduction to two of the flagship tools created by [the Jupyter Community](https://jupyter.org).\n",
|
|||
|
"\n",
|
|||
|
"> **⚠️Experimental!⚠️**: This is an experimental interface provided by the [JupyterLite project](https://jupyterlite.readthedocs.io/en/latest/). It embeds an entire JupyterLab interface, with many popular packages for scientific computing, in your browser. There may be minor differences in behavior between JupyterLite and the JupyterLab you install locally. You may also encounter some bugs or unexpected behavior. To report any issues, or to get involved with the JupyterLite project, see [the JupyterLite repository](https://github.com/jupyterlite/jupyterlite/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc).\n",
|
|||
|
"\n",
|
|||
|
"## JupyterLab 🧪\n",
|
|||
|
"\n",
|
|||
|
"**JupyterLab** is a next-generation web-based user interface for Project Jupyter. It enables you to work with documents and activities such as Jupyter notebooks, text editors, terminals, and custom components in a flexible, integrated, and extensible manner. It is the interface that you're looking at right now.\n",
|
|||
|
"\n",
|
|||
|
"**For an overview of the JupyterLab interface**, see the **JupyterLab Welcome Tour** on this page, by going to `Help -> Welcome Tour` and following the prompts.\n",
|
|||
|
"\n",
|
|||
|
"> **See Also**: For a more in-depth tour of JupyterLab with a full environment that runs in the cloud, see [the JupyterLab introduction on Binder](https://mybinder.org/v2/gh/jupyterlab/jupyterlab-demo/HEAD?urlpath=lab/tree/demo).\n",
|
|||
|
"\n",
|
|||
|
"## Jupyter Notebooks 📓\n",
|
|||
|
"\n",
|
|||
|
"**Jupyter Notebooks** are a community standard for communicating and performing interactive computing. They are a document that blends computations, outputs, explanatory text, mathematics, images, and rich media representations of objects.\n",
|
|||
|
"\n",
|
|||
|
"JupyterLab is one interface used to create and interact with Jupyter Notebooks.\n",
|
|||
|
"\n",
|
|||
|
"**For an overview of Jupyter Notebooks**, see the **JupyterLab Welcome Tour** on this page, by going to `Help -> Notebook Tour` and following the prompts.\n",
|
|||
|
"\n",
|
|||
|
"> **See Also**: For a more in-depth tour of Jupyter Notebooks and the Classic Jupyter Notebook interface, see [the Jupyter Notebook IPython tutorial on Binder](https://mybinder.org/v2/gh/ipython/ipython-in-depth/HEAD?urlpath=tree/binder/Index.ipynb).\n",
|
|||
|
"\n",
|
|||
|
"## An example: visualizing data in the notebook ✨\n",
|
|||
|
"\n",
|
|||
|
"Below is an example of a code cell. We'll visualize some simple data using two popular packages in Python. We'll use [NumPy](https://numpy.org/) to create some random data, and [Matplotlib](https://matplotlib.org) to visualize it.\n",
|
|||
|
"\n",
|
|||
|
"Note how the code and the results of running the code are bundled together."
|
|||
|
],
|
|||
|
"metadata": {},
|
|||
|
"id": "a35eeb9f-df70-4ab1-a243-2d2025888eb0"
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"source": [
|
|||
|
"from matplotlib import pyplot as plt\n",
|
|||
|
"import numpy as np\n",
|
|||
|
"\n",
|
|||
|
"# Generate 100 random data points along 3 dimensions\n",
|
|||
|
"x, y, scale = np.random.randn(3, 100)\n",
|
|||
|
"fig, ax = plt.subplots()\n",
|
|||
|
"\n",
|
|||
|
"# Map each onto a scatterplot we'll create with Matplotlib\n",
|
|||
|
"ax.scatter(x=x, y=y, c=scale, s=np.abs(scale)*500)\n",
|
|||
|
"ax.set(title=\"Some random data, created with JupyterLab!\")\n",
|
|||
|
"plt.show()"
|
|||
|
],
|
|||
|
"metadata": {
|
|||
|
"trusted": true
|
|||
|
},
|
|||
|
"execution_count": 1,
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"output_type": "display_data",
|
|||
|
"data": {
|
|||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAA9hAAAPYQGoP6dpAADYYUlEQVR4nOzdd3wcxfn48c/sXlMvlmTJslzl3rEdgwvYxlRTDHFoScD0JEBCKAlOAgECIaRQvkBov9BJAIPpmG5sgzu4V7nJRbJ6l67tzu+Pk2Sf1U7S3anNOy+9gvf2ZubqPjflGSGllCiKoiiKoig9htbRDVAURVEURVHCSwWAiqIoiqIoPYwKABVFURRFUXoYFQAqiqIoiqL0MCoAVBRFURRF6WFUAKgoiqIoitLDqABQURRFURSlh1EBoKIoiqIoSg+jAkBFURRFUZQeRgWAiqIoiqIoPYwKABVFURRFUXoYFQAqiqIoiqL0MCoAVBRFURRF6WFUAKgoiqIoitLDqABQURRFURSlh1EBoKIoiqIoSg+jAkBFURRFUZQeRgWAiqIoiqIoPYwKABVFURRFUXoYFQAqiqIoiqL0MCoAVBRFURRF6WFUAKgoiqIoitLDqABQURRFURSlh1EBoKIoiqIoSg+jAkBFURRFUZQeRgWAiqIoiqIoPYwKABVFURRFUXoYFQAqiqIoiqL0MCoAVBRFURRF6WFUAKgoiqIoitLDqABQURRFURSlh1EBoKIoiqIoSg+jAkBFURRFUZQeRgWAiqIoiqIoPYwKABWlE1mwYAEDBgzo6Ga06N5770UI0dHNUI4zYMAAF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X7O616OgoKD+WP/+/Rt9bKeddpo87bTT6v+9dOlSCcgxY8bIsWPHykceeUTedddd0uFwyKFDh8rq6moppZRZWVkSkE888YRfeS6XSyYkJMhrrrmmxcdZVVUlx44dK3v16iX/8Ic/yGeeeUZeeeWVUgghf/Ob39SX2dx3S91t//jHP5p9TgL5bNU9T0OHDpXx8fHyrrvuko888ogcM2aM1DStvt0nPldLly5ttm6l+1IBoNImn3/+udR1Xeq6Lk855RT5u9/9Tn722Wd+Fyoppdy4caME5HXXXed3/I477pCA/Prrr+uP9e/fXwJy5cqV9cc+++wzCciIiAiZnZ1df/zZZ59t8OV1+umnyzFjxkin01l/zDRNOXXqVDlkyJBmH0/dF3FsbKzMz8/3u83r9UqXy+V3rKSkRPbu3bv+QnF8Gb169ZLFxcX1x99//30JyA8//LD+2Pjx42VaWposLS2tP/b5559LwC8AfO+99yQgH3jgAb/658+fL4UQcs+ePfXHAGm32+sv0sc/T6mpqbK8vLz++MKFC/0u6E2ZN2+edDgcfs/99u3bpa7rDQLAuovr8c466yw5aNAgv2OjRo3yu2jXcTqdfgG9lL7n1G63y/vvv7/Zdjbl1FNPlTExMX7tl9L3vqhTF3BcfvnlfuccOHBA6rouH3zwQb/jW7ZskRaLxe94Y4/9oYcekkIIv7pvuummBs+blFKuWLFCAvL111/3O/7pp5/6Hc/Pz5c2m03OnTvX7zH84Q9/kECLAeCiRYskILdv3y6llPKDDz6QdrtdXnDBBfLSSy+tP2/s2LHyoosuqv/3iQGglE2/jnXnzpkzx6+Nv/3tb6Wu637v+cYEIwBMT0/3e7+/9dZbEpCPP/54/bFTTjlFTpkyxa+8xYsXN/heaepx/uUvf5FRUVFy9+7dfsfvuusuqeu6PHjwoJSy+e+WQAPAQD9bdd+h77zzTv2xsrIymZaWJidMmOB3rgoAFTUErLTJGWecwap
|
|||
|
"text/plain": [
|
|||
|
"<pyolite.display.Image at 0x97d2f0>"
|
|||
|
]
|
|||
|
},
|
|||
|
"metadata": {}
|
|||
|
}
|
|||
|
],
|
|||
|
"id": "fe55883a-6887-43dd-9498-5333a51799e2"
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"source": [
|
|||
|
"## Next steps 🏃\n",
|
|||
|
"\n",
|
|||
|
"This is just a short introduction to JupyterLab and Jupyter Notebooks. See below for some more ways to interact with tools in the Jupyter ecosystem, and its community.\n",
|
|||
|
"\n",
|
|||
|
"### Other notebooks in this demo\n",
|
|||
|
"\n",
|
|||
|
"Here are some other notebooks in this demo. Each of the items below corresponds to a file or folder in the **file browser to the left**.\n",
|
|||
|
"\n",
|
|||
|
"- [**`Lorenz.ipynb`**](Lorenz.ipynb) uses Python to demonstrate interactive visualizations and computations around the [Lorenz system](https://en.wikipedia.org/wiki/Lorenz_system). It shows off basic Python functionality, including more visualizations, data structures, and scientific computing libraries.\n",
|
|||
|
"- [**`sqlite.ipynb`**](sqlite.ipynb) demonstrates how an in-browser sqlite kernel to run your own SQL commands from the notebook. It uses the [jupyterlite/xeus-sqlite-kernel](https://github.com/jupyterlite/xeus-sqlite-kernel).\n",
|
|||
|
"\n",
|
|||
|
"### Other sources of information in Jupyter\n",
|
|||
|
"\n",
|
|||
|
"- **More on using JupyterLab**: See [the JupyterLab documentation](https://jupyterlab.readthedocs.io/en/stable/) for more thorough information about how to install and use JupyterLab.\n",
|
|||
|
"- **More interactive demos**: See [try.jupyter.org](https://try.jupyter.org) for more interactive demos with the Jupyter ecosystem.\n",
|
|||
|
"- **Learn more about Jupyter**: See [the Jupyter community documentation](https://docs.jupyter.org) to learn more about the project, its community and tools, and how to get involved.\n",
|
|||
|
"- **Join our discussions**: The [Jupyter Community Forum](https://discourse.jupyter.org) is a place where many in the Jupyter community ask questions, help one another, and discuss issues around interactive computing and our ecosystem."
|
|||
|
],
|
|||
|
"metadata": {},
|
|||
|
"id": "b9670d85-ef29-4dfd-b4b5-e76d279c1f1a"
|
|||
|
}
|
|||
|
]
|
|||
|
}
|