Skip to content

Commit

Permalink
Add explainer on VS Code & integrated shells.
Browse files Browse the repository at this point in the history
  • Loading branch information
hmgaudecker committed Oct 21, 2024
1 parent 8363526 commit f2891ba
Show file tree
Hide file tree
Showing 206 changed files with 809 additions and 805 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 7a3f3702ef6aa2e178f1c7a7ee9fb4df
config: 344bde04b5a5065795964779e05167af
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified _downloads/03cf54646b1727213dca6409173da726/debugging-pdbp.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified _downloads/3793951a17990cd6feb257c3fe80858f/projects-setup.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified _downloads/5140db96ccdfb8ce7cbb85ed14c1d041/projects-paths.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified _downloads/632263fe7c244d00de46295397df23b0/pandas-rules.pdf
Binary file not shown.
Binary file not shown.
Binary file modified _downloads/6af7b7987d7b9db774a5e6a322d671a5/git-introduction.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified _downloads/797a90c46f861a8856f79d051a71ab66/pandas-merging.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified _downloads/83be5425c95a0fd95b0bf3cc42d1e254/git-pre_commits.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified _downloads/a5cd74a273b58b2a37c0fb61b0829873/pandas-datatypes.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified _downloads/cb575c6779071de1750436c36c0f21ab/pandas-selection.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added _images/interpreter_annotated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,35 @@
"[screencast](https://electure.uni-bonn.de/static/mh_default_org/engage-player/fdb5d582-02db-4ccb-818a-d415de3bef61/7d268b7a-8dc1-4db2-94d0-7755876969eb/288d688d-84a4-4b70-9a31-31ea4ba16d38.mp4)\n",
"and these are the [slides](python_installation_execution-executing_py_shell.pdf).\n",
"\n",
"\n",
"```{note} \n",
"VS Code uses a different mechanism to activate environments. So in case you are using\n",
"a terminal integrated in VS Code, `conda activate epp` will have no effect.\n",
"Instead:\n",
"\n",
"1. Open a Python file in the project\n",
"1. Press `Ctrl+Shift+P` to open the command palette, type \"Python: Select Interpreter\",\n",
" and select the `epp` environment\n",
"1. Make sure the correct interpreter is selected (see screenshot below)\n",
"1. Open a new shell\n",
"\n",
"![](./interpreter_annotated.png)\n",
"\n",
"```\n",
"\n",
"\n",
"\n",
"## Quiz"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": [
"remove-input"
]
},
"outputs": [],
"source": [
"from jupyterquiz import display_quiz\n",
Expand Down
14 changes: 7 additions & 7 deletions background/file_systems/objectives_materials.html
Original file line number Diff line number Diff line change
Expand Up @@ -566,13 +566,13 @@ <h2>Additional Materials<a class="headerlink" href="#additional-materials" title
<h2>Quiz<a class="headerlink" href="#quiz" title="Link to this heading">#</a></h2>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<div class="output text_html"><div id="oCPwGRPQqQdC" data-shufflequestions="False"
<div class="output text_html"><div id="qHpsDqunzwzp" data-shufflequestions="False"
data-shuffleanswers="True"
data-preserveresponses="false"
data-numquestions="1000000"
data-maxwidth="600"
style="border-radius: 10px; text-align: left"> <style>
#oCPwGRPQqQdC {
#qHpsDqunzwzp {
--jq-multiple-choice-bg: #345995;
--jq-mc-button-bg: #fafafa;
--jq-mc-button-border: #e0e0e0e0;
Expand Down Expand Up @@ -742,7 +742,7 @@ <h2>Quiz<a class="headerlink" href="#quiz" title="Link to this heading">#</a></h
background-color: var(--jq-correct-color);
}
}
</style></div><script type="application/javascript">var questionsoCPwGRPQqQdC=[{"question": "In which of the following Operating Systems can you find\n the following path \"/Users/username/Documents\"?", "type": "multiple_choice", "answers": [{"answer": "Linux-based OS", "correct": false, "feedback": "Incorrect. While Linux-based OS\n use almost the same ."}, {"answer": "MacOS", "correct": true, "feedback": "Correct."}, {"answer": "Windows", "correct": false, "feedback": "Incorrect. Windows uses a different File System\n than this. Windows File System starts with the physical drive\n (e.g. C:\\) and then uses backslashes \"\\\" to separate the\n directories."}]}, {"question": "What are the key differences\n between UNIX-based and Windows-based File Systems?", "type": "many_choice", "answers": [{"answer": "Windows-systems use backslashes \"\\\" to separate\n directories,\n while UNIX-based systems use forward slashes \"/\".", "correct": true, "feedback": "Correct."}, {"answer": "Windows-systems have a more nested structure, with a\n larger number\n of directories.", "correct": false, "feedback": "Incorrect. The directories are not necessarily more\n numerous or nested in Windows."}, {"answer": "Windows-systems have a separate directory tree for each\n physical drive,\n while UNIX-based systems have a single directory tree.", "correct": true, "feedback": "Correct. For example many computers have a C:\\ and a\n D:\\ drive."}, {"answer": "Windows-systems have a single directory tree, while\n UNIX-based\n systems have a separate directory tree for each physical drive.", "correct": false, "feedback": "Incorrect. The answer is the opposite of this."}]}, {"question": "J\u00f6rn, Maria and Vinayak are working on a project together. J\u00f6rn is\n running Windows\n on his laptop,\n while Maria and Vinayak have laptops that run MacOS. For reasons that will\n become apparent\n to you in the next lectures of this course, they need to decide whether to\n use paths\n with forward slashes \"/\" or\n backslashes \"\\\" to separate directories, and they cannot\n each use the path type\n that is native to their\n operating system. What do you think they should do?", "type": "multiple_choice", "answers": [{"answer": "They should use forward slashes \"/\".", "correct": true, "feedback": "Correct. The reason for this is that while\n UNIX-based systems cannot use backslashes \"\\\" in paths,\n modern Windows-based systems can use forward slashes \"/\".\n In fact, forward slashes are the \"standard\" for OS and\n programming languages. The story behind why Windows uses\n backslashes \"\\\" is quite interesting if you want to\n google it."}, {"answer": "They should use backslashes \"\\\".", "correct": false, "feedback": "Incorrect. The reason for this is that UNIX-based\n systems cannot use backslashes \"\\\" in paths."}, {"answer": " It does not really matter which they use,\n as long as they are consistent.", "correct": false, "feedback": "Incorrect. It is very important to be consistent,\n but\n it does matter\n which type of path they use, because UNIX-based\n systems cannot use backslashes \"\\\" in paths."}]}, {"question": " What is the root directory,\n and how is it\n represented in a UNIX-based system?", "type": "multiple_choice", "answers": [{"answer": "The root directory is the directory that\n contains all other directories (the top-level\n directory in the folder structure),\n and is represented by a forward slash \"/\" in UNIX.", "correct": true, "feedback": "Correct."}, {"answer": "The root directory is the directory\n that contains all other directories (the top-level\n directory in the folder structure),\n and is represented by a backslash \"\\\" in UNIX.", "correct": false, "feedback": "Incorrect. The correct symbol is a forward\n slash \"/\"."}, {"answer": "The root directory is the directory that\n contains all the user files, and is represented\n by a forward slash \"/\" in UNIX.", "correct": false, "feedback": "Incorrect. The root directory contains all\n directories, not\n only the user files."}, {"answer": "The root directory is the directory that\n contains all other directories\n (the top-level\n directory in the folder structure),\n and is represented by \" C:\\ \".", "correct": false, "feedback": "Incorrect. \" C:\\ \" is the root directory in\n Windows-based File Systems,\n not in UNIX-based systems."}]}];
</style></div><script type="application/javascript">var questionsqHpsDqunzwzp=[{"question": "In which of the following Operating Systems can you find\n the following path \"/Users/username/Documents\"?", "type": "multiple_choice", "answers": [{"answer": "Linux-based OS", "correct": false, "feedback": "Incorrect. While Linux-based OS\n use almost the same ."}, {"answer": "MacOS", "correct": true, "feedback": "Correct."}, {"answer": "Windows", "correct": false, "feedback": "Incorrect. Windows uses a different File System\n than this. Windows File System starts with the physical drive\n (e.g. C:\\) and then uses backslashes \"\\\" to separate the\n directories."}]}, {"question": "What are the key differences\n between UNIX-based and Windows-based File Systems?", "type": "many_choice", "answers": [{"answer": "Windows-systems use backslashes \"\\\" to separate\n directories,\n while UNIX-based systems use forward slashes \"/\".", "correct": true, "feedback": "Correct."}, {"answer": "Windows-systems have a more nested structure, with a\n larger number\n of directories.", "correct": false, "feedback": "Incorrect. The directories are not necessarily more\n numerous or nested in Windows."}, {"answer": "Windows-systems have a separate directory tree for each\n physical drive,\n while UNIX-based systems have a single directory tree.", "correct": true, "feedback": "Correct. For example many computers have a C:\\ and a\n D:\\ drive."}, {"answer": "Windows-systems have a single directory tree, while\n UNIX-based\n systems have a separate directory tree for each physical drive.", "correct": false, "feedback": "Incorrect. The answer is the opposite of this."}]}, {"question": "J\u00f6rn, Maria and Vinayak are working on a project together. J\u00f6rn is\n running Windows\n on his laptop,\n while Maria and Vinayak have laptops that run MacOS. For reasons that will\n become apparent\n to you in the next lectures of this course, they need to decide whether to\n use paths\n with forward slashes \"/\" or\n backslashes \"\\\" to separate directories, and they cannot\n each use the path type\n that is native to their\n operating system. What do you think they should do?", "type": "multiple_choice", "answers": [{"answer": "They should use forward slashes \"/\".", "correct": true, "feedback": "Correct. The reason for this is that while\n UNIX-based systems cannot use backslashes \"\\\" in paths,\n modern Windows-based systems can use forward slashes \"/\".\n In fact, forward slashes are the \"standard\" for OS and\n programming languages. The story behind why Windows uses\n backslashes \"\\\" is quite interesting if you want to\n google it."}, {"answer": "They should use backslashes \"\\\".", "correct": false, "feedback": "Incorrect. The reason for this is that UNIX-based\n systems cannot use backslashes \"\\\" in paths."}, {"answer": " It does not really matter which they use,\n as long as they are consistent.", "correct": false, "feedback": "Incorrect. It is very important to be consistent,\n but\n it does matter\n which type of path they use, because UNIX-based\n systems cannot use backslashes \"\\\" in paths."}]}, {"question": " What is the root directory,\n and how is it\n represented in a UNIX-based system?", "type": "multiple_choice", "answers": [{"answer": "The root directory is the directory that\n contains all other directories (the top-level\n directory in the folder structure),\n and is represented by a forward slash \"/\" in UNIX.", "correct": true, "feedback": "Correct."}, {"answer": "The root directory is the directory\n that contains all other directories (the top-level\n directory in the folder structure),\n and is represented by a backslash \"\\\" in UNIX.", "correct": false, "feedback": "Incorrect. The correct symbol is a forward\n slash \"/\"."}, {"answer": "The root directory is the directory that\n contains all the user files, and is represented\n by a forward slash \"/\" in UNIX.", "correct": false, "feedback": "Incorrect. The root directory contains all\n directories, not\n only the user files."}, {"answer": "The root directory is the directory that\n contains all other directories\n (the top-level\n directory in the folder structure),\n and is represented by \" C:\\ \".", "correct": false, "feedback": "Incorrect. \" C:\\ \" is the root directory in\n Windows-based File Systems,\n not in UNIX-based systems."}]}];
// Make a random ID
function makeid(length) {
var result = [];
Expand Down Expand Up @@ -1491,8 +1491,8 @@ <h2>Quiz<a class="headerlink" href="#quiz" title="Link to this heading">#</a></h
Someone more knowledgeable could make this better ;-) */

function try_show() {
if(document.getElementById("oCPwGRPQqQdC")) {
show_questions(questionsoCPwGRPQqQdC, oCPwGRPQqQdC);
if(document.getElementById("qHpsDqunzwzp")) {
show_questions(questionsqHpsDqunzwzp, qHpsDqunzwzp);
} else {
setTimeout(try_show, 200);
}
Expand All @@ -1501,8 +1501,8 @@ <h2>Quiz<a class="headerlink" href="#quiz" title="Link to this heading">#</a></h
{
// console.log(element);

//console.log("oCPwGRPQqQdC");
// console.log(document.getElementById("oCPwGRPQqQdC"));
//console.log("qHpsDqunzwzp");
// console.log(document.getElementById("qHpsDqunzwzp"));

try_show();
}
Expand Down
Loading

0 comments on commit f2891ba

Please sign in to comment.