feat(listings): enhance code listings with improved styling and copy functionality

- Add callout-code configuration to _quarto-html.yml
- Enable code-copy and code-overflow features for better UX
- Update example listing format in introduction
- Provides enhanced visual styling for code listings
- Improves accessibility and usability of code examples
This commit is contained in:
Vijay Janapa Reddi
2025-08-04 03:15:39 -04:00
parent f142835029
commit 36cfb3ef37
2 changed files with 4 additions and 23 deletions

View File

@@ -26,7 +26,8 @@ project:
preview:
browser: true
navigate: true
# No site-wide title - each page defines its own
render:
- contents/core/introduction/introduction.qmd
website:
# High-level navigation enhancements
@@ -554,7 +555,7 @@ custom-numbered-blocks:
label: "Self-Check: Answer"
group: quiz-answer
callout-resource-slides:
label: "Slides"
label: "Listing"
group: resource-slides
callout-resource-videos:
label: "Videos"
@@ -563,10 +564,8 @@ custom-numbered-blocks:
label: "Exercises"
group: resource-exercises
callout-chapter-connection:
label: "Chapter connections"
label: "Chapter connections"
group: chapter-connection
callout-code:
label: "Code"
group: code-listing
group: chapter-connection
group: code-listing

View File

@@ -24,24 +24,6 @@ As machine learning becomes deeply embedded in the fabric of modern technology,
Artificial Intelligence (AI) has emerged as one of the most transformative forces in human history. From the moment we wake up to when we go to sleep, AI systems invisibly shape our world. They manage traffic flows in our cities, optimize power distribution across electrical grids, and enable billions of wireless devices to communicate seamlessly. In hospitals, AI analyzes medical images and helps doctors diagnose diseases. In research laboratories, it accelerates scientific discovery by simulating molecular interactions and processing vast datasets from particle accelerators. In space exploration, it helps rovers navigate distant planets and telescopes detect new celestial phenomena.
testing @lst-mlp_layer_matrix
::: {.content-visible when-format="html"}
::: {#lst-mlp_layer_matrix lst-cap="**Dense Layer Implementation**: Neural networks perform weighted sum and activation functions across layers using matrix operations through The code. This emphasizes the core computational pattern in multi-layer perceptrons."}
```{.python}
def mlp_layer_matrix(X, W, b):
# X: input matrix (batch_size × num_inputs)
# W: weight matrix (num_inputs × num_outputs)
# b: bias vector (num_outputs)
H = activation(matmul(X, W) + b)
# One clean line of math
return H
```
:::
:::
Throughout history, certain technologies have fundamentally transformed human civilization, defining their eras. The 18th and 19th centuries were shaped by the Industrial Revolution, where steam power and mechanization transformed how humans could harness physical energy. The 20th century was defined by the Digital Revolution, where the computer and internet transformed how we process and share information. Now, the 21st century appears to be the era of Artificial Intelligence, a shift noted by leading thinkers in technological evolution [@brynjolfsson2014second; @domingos2015master].
The vision driving AI development extends far beyond the practical applications we see today. We aspire to create systems that can work alongside humanity, enhancing our problem-solving capabilities and accelerating scientific progress. Imagine AI systems that could help us understand consciousness, decode the complexities of biological systems, or unravel the mysteries of dark matter. Consider the potential of AI to help address global challenges like climate change, disease, or sustainable energy production. This is not just about automation or efficiency—it's about expanding the boundaries of human knowledge and capability.