Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add run colab #6

Merged
merged 3 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ git-rm-merged:
docs:
jb build docs

clean:
nbstripout --drop-empty-cells notebooks/*.ipynb

.PHONY: docs
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# PIC training

You can [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/gdsfactory/gdsfactory-photonics-training)

Or Install gdsfactory locally on your computer.

## 1. Install Python

- [ ] Make sure you have python 3.10 or 3.11 installed on your computer. Here is the [anaconda](https://www.anaconda.com/download/) installer.
Expand Down
19 changes: 18 additions & 1 deletion notebooks/10_layout.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "30a37197",
"metadata": {},
"source": [
"# Component\n",
"# Layout tutorial (short)\n",
"\n",
"A `Component` is like an empty canvas, where you can add polygons, references to other Components and ports (to connect to other components)\n",
"\n",
Expand All @@ -14,6 +14,22 @@
"In gdsfactory **all dimensions** are in **microns**"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b066ee6c",
"metadata": {},
"outputs": [],
"source": [
"try:\n",
" import google.colab\n",
" is_running_on_colab = True\n",
" !pip install gdsfactory klayout > /dev/null\n",
" \n",
"except ImportError:\n",
" is_running_on_colab = False"
]
},
{
"cell_type": "markdown",
"id": "2bc35b51",
Expand All @@ -35,6 +51,7 @@
"from gdsfactory.generic_tech import get_generic_pdk\n",
"\n",
"gf.config.rich_output()\n",
"gf.CONF.display_type = 'klayout'\n",
"\n",
"PDK = get_generic_pdk()\n",
"PDK.activate()\n",
Expand Down
Loading
Loading