Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Lectures
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HPC Core Facility
Teaching Infrastructure
Sample Course
Teach
Modules
Lectures
Commits
5d5bdcc7
Commit
5d5bdcc7
authored
1 year ago
by
Philipp Risius
Browse files
Options
Downloads
Patches
Plain Diff
edit showcase notebook
parent
a5d50f94
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
environment.yml
+1
-0
1 addition, 0 deletions
environment.yml
source/Showcase/showcase.ipynb
+160
-21
160 additions, 21 deletions
source/Showcase/showcase.ipynb
with
161 additions
and
21 deletions
environment.yml
+
1
−
0
View file @
5d5bdcc7
...
@@ -7,6 +7,7 @@ dependencies:
...
@@ -7,6 +7,7 @@ dependencies:
# Jupyter notebook, -lab, and plugins
# Jupyter notebook, -lab, and plugins
-
jupyter
-
jupyter
-
jupyterlab
-
jupyterlab
-
jupyterlab-deck
# Scientific stack
# Scientific stack
-
matplotlib
-
matplotlib
-
numpy
-
numpy
...
...
This diff is collapsed.
Click to expand it.
source/Showcase/showcase.ipynb
+
160
−
21
View file @
5d5bdcc7
...
@@ -6,7 +6,19 @@
...
@@ -6,7 +6,19 @@
"metadata": {
"metadata": {
"jupyter": {
"jupyter": {
"outputs_hidden": true
"outputs_hidden": true
}
},
"nbgrader": {
"grade": false,
"grade_id": "cell-25b0524e59662f1b",
"locked": true,
"schema_version": 3,
"solution": false,
"task": false
},
"slideshow": {
"slide_type": "slide"
},
"tags": []
},
},
"source": [
"source": [
"# Showcase of nbgrader Features"
"# Showcase of nbgrader Features"
...
@@ -15,7 +27,20 @@
...
@@ -15,7 +27,20 @@
{
{
"cell_type": "markdown",
"cell_type": "markdown",
"id": "fd8395f8-7c55-4ff3-9f65-305fb14c6c87",
"id": "fd8395f8-7c55-4ff3-9f65-305fb14c6c87",
"metadata": {},
"metadata": {
"nbgrader": {
"grade": false,
"grade_id": "cell-1439f3c0b51560ec",
"locked": true,
"schema_version": 3,
"solution": false,
"task": false
},
"slideshow": {
"slide_type": "slide"
},
"tags": []
},
"source": [
"source": [
"## Read-Only Cells"
"## Read-Only Cells"
]
]
...
@@ -24,48 +49,143 @@
...
@@ -24,48 +49,143 @@
"cell_type": "code",
"cell_type": "code",
"execution_count": null,
"execution_count": null,
"id": "317bf900-a253-427c-b462-f46906223f16",
"id": "317bf900-a253-427c-b462-f46906223f16",
"metadata": {},
"metadata": {
"nbgrader": {
"grade": false,
"grade_id": "cell-71c74b9043ed9fef",
"locked": true,
"schema_version": 3,
"solution": false,
"task": false
},
"slideshow": {
"slide_type": "fragment"
},
"tags": []
},
"outputs": [],
"outputs": [],
"source": []
"source": [
"import jupyterquiz"
]
},
},
{
{
"cell_type": "markdown",
"cell_type": "markdown",
"id": "2c76fb6c-c223-4378-8bb8-e93dc7598942",
"id": "2c76fb6c-c223-4378-8bb8-e93dc7598942",
"metadata": {},
"metadata": {
"nbgrader": {
"grade": false,
"grade_id": "cell-b7434118bcc90455",
"locked": true,
"schema_version": 3,
"solution": false,
"task": false
},
"slideshow": {
"slide_type": "slide"
},
"tags": []
},
"source": [
"source": [
"## Manually graded cells"
"## Manually graded cells"
]
]
},
},
{
{
"cell_type": "code",
"cell_type": "markdown",
"execution_count": null,
"id": "9bb543ea-7672-48f5-b61c-131c9360a93d",
"id": "a9bc8ade-2bd7-4d2a-a517-b6aee50fc49c",
"metadata": {
"metadata": {},
"nbgrader": {
"outputs": [],
"grade": false,
"source": []
"grade_id": "cell-129cf502b2aedc2a",
"locked": true,
"schema_version": 3,
"solution": false,
"task": false
},
"slideshow": {
"slide_type": "slide"
},
"tags": []
},
"source": [
"Two options for manually graded cells:\n",
" * set a read-only task to be done elsewhere\n",
" * provide space for an answer\n",
" * both options can be markdown or code cells"
]
},
},
{
{
"cell_type": "markdown",
"cell_type": "markdown",
"id": "1011509a-9018-4bcb-9bd6-ab28746312c0",
"id": "1011509a-9018-4bcb-9bd6-ab28746312c0",
"metadata": {},
"metadata": {
"nbgrader": {
"grade": false,
"grade_id": "cell-d93e59d2d06c7c1c",
"locked": true,
"schema_version": 3,
"solution": false,
"task": false
},
"tags": []
},
"source": [
"source": [
"## Automatically graded cells"
"## Automatically graded cells"
]
]
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
null
,
"execution_count":
2
,
"id": "859cec0c-0ed2-48e0-8e3b-a5354b517652",
"id": "859cec0c-0ed2-48e0-8e3b-a5354b517652",
"metadata": {},
"metadata": {
"nbgrader": {
"grade": false,
"grade_id": "cell-2c76f686a2e2422f",
"locked": false,
"schema_version": 3,
"solution": true,
"task": false
},
"tags": []
},
"outputs": [],
"outputs": [],
"source": []
"source": [
"# This is an autograded cell\n",
"\n",
"### BEGIN SOLUTION\n",
"\n",
"def fib(n):\n",
" \"\"\"calculate the n-th fibonacci number.\"\"\"\n",
" return 1 if 0 <= n <= 1 else fib(n-1) + fib(n-2)\n",
"\n",
"### END SOLUTION"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "0e9bbfd5-94f1-4b85-94d5-29151a89963c",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# This test is visible\n",
"assert fib(0) == 1\n",
"\n",
"# This is an autotest. It will evaluate using the solution\n",
"### AUTOTEST fib(1)\n",
"\n",
"### BEGIN HIDDEN TESTS\n",
"# These tests are hidden. Students won't see them.\n",
"\n",
"### END HIDDEN TESTS"
]
},
},
{
{
"cell_type": "markdown",
"cell_type": "markdown",
"id": "977d17b7-9643-42d1-9eb8-5c657a76fa9e",
"id": "977d17b7-9643-42d1-9eb8-5c657a76fa9e",
"metadata": {},
"metadata": {},
"source": [
"source": [
"## Quizzes"
"## Quizzes
(thanks to jupyterquiz)
"
]
]
},
},
{
{
...
@@ -84,6 +204,9 @@
...
@@ -84,6 +204,9 @@
"tags": []
"tags": []
},
},
"source": [
"source": [
"* Quizzes are converted to json and embedded as spans\n",
"* the converted version is \"invisible\"\n",
"\n",
"#### Quiz\n",
"#### Quiz\n",
"* (SC) What are ungraded quizzes good for?\n",
"* (SC) What are ungraded quizzes good for?\n",
" + This\n",
" + This\n",
...
@@ -94,11 +217,27 @@
...
@@ -94,11 +217,27 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"id": "49d89943-fcd2-49b8-850c-886b73075a8a",
"id": "b7e97aee-911e-448a-be5a-0ab4a7f71ab2",
"metadata": {},
"metadata": {
"outputs": [],
"tags": []
"source": []
},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'jupyterquiz' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[4], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mjupyterquiz\u001b[49m\u001b[38;5;241m.\u001b[39mdisplay_quiz(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m#quiz0\u001b[39m\u001b[38;5;124m'\u001b[39m)\n",
"\u001b[0;31mNameError\u001b[0m: name 'jupyterquiz' is not defined"
]
}
],
"source": [
"jupyterquiz.display_quiz('#quiz0')"
]
}
}
],
],
"metadata": {
"metadata": {
...
...
%% Cell type:markdown id:9774c4db-446a-4736-9b81-3147f7f2bb86 tags:
%% Cell type:markdown id:9774c4db-446a-4736-9b81-3147f7f2bb86 tags:
# Showcase of nbgrader Features
# Showcase of nbgrader Features
%% Cell type:markdown id:fd8395f8-7c55-4ff3-9f65-305fb14c6c87 tags:
%% Cell type:markdown id:fd8395f8-7c55-4ff3-9f65-305fb14c6c87 tags:
## Read-Only Cells
## Read-Only Cells
%% Cell type:code id:317bf900-a253-427c-b462-f46906223f16 tags:
%% Cell type:code id:317bf900-a253-427c-b462-f46906223f16 tags:
```
python
```
python
import
jupyterquiz
```
```
%% Cell type:markdown id:2c76fb6c-c223-4378-8bb8-e93dc7598942 tags:
%% Cell type:markdown id:2c76fb6c-c223-4378-8bb8-e93dc7598942 tags:
## Manually graded cells
## Manually graded cells
%%
Cell
type
:
code
id
:
a
9b
c8ade
-
2
bd7
-
4
d2a
-
a517
-
b6aee50fc49c
tags
:
%% Cell type:
markdown
id:9b
b543ea-7672-48f5-b61c-131c9360a93d
tags:
```
python
Two options for manually graded cells:
```
*
set a read-only task to be done elsewhere
*
provide space for an answer
*
both options can be markdown or code cells
%% Cell type:markdown id:1011509a-9018-4bcb-9bd6-ab28746312c0 tags:
%% Cell type:markdown id:1011509a-9018-4bcb-9bd6-ab28746312c0 tags:
## Automatically graded cells
## Automatically graded cells
%% Cell type:code id:859cec0c-0ed2-48e0-8e3b-a5354b517652 tags:
%% Cell type:code id:859cec0c-0ed2-48e0-8e3b-a5354b517652 tags:
```
python
```
python
# This is an autograded cell
### BEGIN SOLUTION
def
fib
(
n
):
"""
calculate the n-th fibonacci number.
"""
return
1
if
0
<=
n
<=
1
else
fib
(
n
-
1
)
+
fib
(
n
-
2
)
### END SOLUTION
```
%% Cell type:code id:0e9bbfd5-94f1-4b85-94d5-29151a89963c tags:
```
python
# This test is visible
assert
fib
(
0
)
==
1
# This is an autotest. It will evaluate using the solution
### AUTOTEST fib(1)
### BEGIN HIDDEN TESTS
# These tests are hidden. Students won't see them.
### END HIDDEN TESTS
```
```
%% Cell type:markdown id:977d17b7-9643-42d1-9eb8-5c657a76fa9e tags:
%% Cell type:markdown id:977d17b7-9643-42d1-9eb8-5c657a76fa9e tags:
## Quizzes
## Quizzes
(thanks to jupyterquiz)
%% Cell type:markdown id:3a8fa6dd-8e96-4e34-9e6a-d44d56bf0af1 tags:
%% Cell type:markdown id:3a8fa6dd-8e96-4e34-9e6a-d44d56bf0af1 tags:
*
Quizzes are converted to json and embedded as spans
*
the converted version is "invisible"
#### Quiz
#### Quiz
*
(SC) What are ungraded quizzes good for?
*
(SC) What are ungraded quizzes good for?
+
This
+
This
-
That
-
That
#### End Quiz
#### End Quiz
%% Cell type:code id:
49d89943-fcd2-49b8-850c-886b73075a8a
tags:
%% Cell type:code id:
b7e97aee-911e-448a-be5a-0ab4a7f71ab2
tags:
```
python
```
python
jupyterquiz
.
display_quiz
(
'
#quiz0
'
)
```
```
%% Output
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[4], line 1
----> 1 jupyterquiz.display_quiz('#quiz0')
NameError: name 'jupyterquiz' is not defined
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment