Skip to content

Commit f3cf30f

Browse files
committed
add: Freva Intro for Expect Hackathon
1 parent 4860e1b commit f3cf30f

19 files changed

Lines changed: 9274 additions & 0 deletions

‎talks/FrevaIntro_Expect_26/FrevaIntro.ipynb‎

Lines changed: 786 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env bash
2+
3+
# Build FrevaIntro.ipynb as the Reveal.js deck index.slides.html.
4+
set -euo pipefail
5+
6+
script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
7+
source_notebook="${script_dir}/FrevaIntro.ipynb"
8+
style_notebook="${script_dir}/style.ipynb"
9+
output_name="index"
10+
merged_notebook="$(mktemp "${script_dir}/.merged-slides.XXXXXX.ipynb")"
11+
12+
cleanup() {
13+
rm -f -- "${merged_notebook}"
14+
}
15+
trap cleanup EXIT
16+
17+
for required_file in "${source_notebook}" "${style_notebook}"; do
18+
if [[ ! -f "${required_file}" ]]; then
19+
echo "Missing required file: ${required_file}" >&2
20+
exit 1
21+
fi
22+
done
23+
24+
if ! command -v nbmerge >/dev/null 2>&1; then
25+
echo "nbmerge is required. Install it once with: python -m pip install nbmerge" >&2
26+
exit 1
27+
fi
28+
29+
nbmerge "${style_notebook}" "${source_notebook}" > "${merged_notebook}"
30+
31+
jupyter nbconvert "${merged_notebook}" \
32+
--to slides \
33+
--output "${output_name}" \
34+
--output-dir "${script_dir}" \
35+
--TagRemovePreprocessor.enabled=True \
36+
--TagRemovePreprocessor.remove_input_tags=hide_input \
37+
--SlidesExporter.reveal_transition=fade \
38+
--SlidesExporter.reveal_theme=simple \
39+
--SlidesExporter.reveal_scroll=True
40+
41+
echo "Slides generated: ${script_dir}/index.slides.html"
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
h1 {
2+
font-size: 1.8em !important;
3+
}
4+
5+
.output_wrapper {
6+
height: 300px; /* Set the desired height */
7+
overflow-y: scroll; /* Enable vertical scrolling */
8+
border: 1px solid #ccc; /* Optional: Add a border for visibility */
9+
padding: 10px; /* Optional: Add padding */
10+
}
11+
12+
.output {
13+
overflow-y: auto; /* Ensure the output area can scroll */
14+
}
15+
16+
17+
img {
18+
display: block;
19+
margin-left: auto;
20+
margin-right: auto;
21+
max-height: 65vh;
22+
}
23+
24+
.reveal p,
25+
.reveal li,
26+
.reveal pre,
27+
div.hl-ipython3 pre,
28+
.reveal div.highlight pre {
29+
color: black;
30+
}
31+
32+
.reveal pre {
33+
max-height: 60vh !important;
34+
overflow-y: auto !important;
35+
}
36+
37+
div.prompt,
38+
div.jp-InputPrompt,
39+
div.jp-InputArea-prompt,
40+
div.jp-OutputPrompt,
41+
div.jp-OutputArea-prompt {
42+
display: none !important;
43+
}
44+
45+
.reveal .slides {
46+
max-width: 95% !important;
47+
width: 65% !important;
48+
margin: auto !important;
49+
padding: 0 2em;
50+
text-align: center;
51+
}
52+
53+
.reveal .slides section,
54+
.reveal .slides section p {
55+
max-width: 1000px;
56+
margin: 0 auto !important;
57+
text-align: center;
58+
}
59+
60+
.reveal img {
61+
display: block;
62+
margin-left: auto;
63+
margin-right: auto;
64+
}
65+
66+
div.output_area {
67+
max-height: 60vh;
68+
overflow-y: auto !important;
69+
overflow-x: auto;
70+
background: #1e1e1e; /* optional: helps visibility */
71+
padding: 0.5em;
72+
border: 1px solid #666;
73+
border-radius: 4px;
74+
}

0 commit comments

Comments
 (0)