Skip to content

Commit

Permalink
Merge pull request #6 from gdsfactory/add_colab
Browse files Browse the repository at this point in the history
Add run colab
  • Loading branch information
joamatab authored Sep 11, 2023
2 parents 22621fc + db512dc commit fdb9835
Show file tree
Hide file tree
Showing 10 changed files with 9,475 additions and 37 deletions.
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

0 comments on commit fdb9835

Please sign in to comment.