Skip to content

Commit

Permalink
updates for recent VS Code
Browse files Browse the repository at this point in the history
  • Loading branch information
philtweir committed Sep 8, 2021
1 parent 021574d commit 54554d8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions 006-latency/Latency.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,21 @@
"source": [
"## Starting VSCode\n",
"\n",
"At a command line, create a new folder somewhere under your home directory, and clone the Python course into it:\n",
"**Either**, go to https://github.com/flaxandteal/python-course and, under the *Code* menu, download ZIP. Extract it somewhere handy. Then open VSCode from your Windows/Linux/Mac desktop and, from the *File* menu, select *Open Folder*. Navigate to where you extracted the ZIP, and select the **006-latency** subfolder."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"**Or** at a command line, create a new folder somewhere under your home directory, and clone the Python course into it:\n",
"\n",
" git clone https://github.com/flaxandteal/python-course\n",
" cd python-course\n",
" git checkout professional\n",
" \n",
"Head to the 006-latency folder:\n",
"\n",
Expand All @@ -56,6 +66,13 @@
"Open the `006-latency` directory from the file menu."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![Screenshot from VS Code](vscode-screenshot.png)"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down Expand Up @@ -191,7 +208,7 @@
}
},
"source": [
"Since some of you may have a CS background and I do not, I am going to to take a risk and theme this session on measuring latency between a server and client. Please ignore the simplistic methodology - if you find a few minutes spare, feel free to improve the approach! However, the aim here is to look at the code and algorithms.\n",
"This session is themed on measuring latency between a server and client. Please bear in mind that this uses a fairly rough approach to accuracy - if you find a few minutes spare, feel free to improve the approach! However, the aim here is to look at the code and algorithms.\n",
"\n",
"More broadly, for those who are coming from an engineering end, I can say from experience that if you start to scale up your number of simulations, you will be looking for bottlenecks and profiling. There are better, tailored utilities for doing so, but this should give you an idea about how to think about the problem."
]
Expand All @@ -212,7 +229,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"On the right hand side, you will see an icon of a ladybird-like bug. Click it, and notice that the left-hand side changes to a set of panels:\n",
"On the right hand side, you will see an icon of a play button / ladybird-like bug. Click it, and notice that the left-hand side changes to a set of panels:\n",
"\n",
"* Variables\n",
"* Watch\n",
Expand Down Expand Up @@ -691,7 +708,7 @@
}
},
"source": [
"Hit F5, or go to `Run->Run`\n",
"Hit F5, or go to `Run->Run Without Debugging`\n",
"\n",
"If you get a dialog saying \"`Run Settings`\", choose \"`Execute in a new dedicated Python console`\" and continue."
]
Expand Down Expand Up @@ -788,7 +805,7 @@
}
},
"source": [
"First we introduce the concept of a *generator*. This is a Python construct that embeds a loop in quite a few possible places. Mostly you will see them used to create lists and dicts. The format is (for basic use):"
"First we introduce the concept of a *list comprehension*. This is a Python construct that embeds a loop in quite a few possible places. Mostly you will see them used to create lists and dicts. The format is (for basic use):"
]
},
{
Expand Down
Binary file added 006-latency/vscode-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 54554d8

Please sign in to comment.