Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
groups:
actions:
patterns: ["*"]
26 changes: 26 additions & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Check links

on:
pull_request:
push:
branches: [main]
schedule:
- cron: "0 4 1 * *" # monthly, to catch links that break over time
workflow_dispatch:

jobs:
lychee:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- name: Check links
uses: lycheeverse/lychee-action@v2
with:
# The book's Markdown pages and notebooks, plus the learner notebooks
# in notebooks/ and solutions-NO-PEEKING/.
args: --no-progress "./**/*.md" "./**/*.ipynb"
fail: true
env:
# Authenticated requests avoid GitHub rate limits.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Colab's "base_uri" in notebook cell metadata, not a link.
^https://localhost:8080/$
40 changes: 38 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,38 @@
# no pre-commit
repos: []
ci:
autoupdate_schedule: monthly

# Don't touch the datasets the lessons read.
exclude: ^array-oriented-programming/data/

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace

- repo: https://github.com/codespell-project/codespell
rev: v2.4.3
hooks:
- id: codespell
args:
- "-I"
- "codespell.txt"
# Skip base64 blobs (images in notebook outputs and attachments).
- "--ignore-regex"
- "[A-Za-z0-9+/]{60,}"
# documen.tician.de hosts the PyOpenCL docs.
- "--uri-ignore-words-list"
- "documen"

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.20.0
hooks:
- id: blacken-docs
additional_dependencies: [black]
2 changes: 1 addition & 1 deletion array-oriented-programming/1-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Now `mag3d` can be used in exactly the same ways as `euclidean`, because they're
mag3d(px, py, pz)
```

Python's `is` keyword tells you whether two varible names refer to the same object (as opposed to just being equal to the same value).
Python's `is` keyword tells you whether two variable names refer to the same object (as opposed to just being equal to the same value).

```{code-cell} ipython3
mag3d is euclidean
Expand Down
4 changes: 2 additions & 2 deletions array-oriented-programming/2-arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def array_forces(m, x, p):
return total_force
```

The array-oriented solution is very concise—maybe even "dense"—and it invovles special NumPy functions such as [np.triu_indices](https://numpy.org/doc/stable/reference/generated/numpy.triu_indices.html) for the $n (n - 1) / 2$ combinatorics and [advanced slicing](https://numpy.org/doc/stable/user/basics.indexing.html#advanced-indexing) in square brackets (`[` `]`).
The array-oriented solution is very concise—maybe even "dense"—and it involves special NumPy functions such as [np.triu_indices](https://numpy.org/doc/stable/reference/generated/numpy.triu_indices.html) for the $n (n - 1) / 2$ combinatorics and [advanced slicing](https://numpy.org/doc/stable/user/basics.indexing.html#advanced-indexing) in square brackets (`[` `]`).

+++

Expand Down Expand Up @@ -438,7 +438,7 @@ imperative_squares(original)
```

```{code-cell} ipython3
import dis # dissasembler; shows us the Python virtual machine instructions
import dis # disassembler; shows us the Python virtual machine instructions
```

```{code-cell} ipython3
Expand Down
2 changes: 1 addition & 1 deletion array-oriented-programming/_config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#######################################################################################
# A default configuration that will be loaded for all jupyter books
# See the documentation for help and more options:
# See the documentation for help and more options:
# https://jupyterbook.org/customize/config.html

#######################################################################################
Expand Down
2 changes: 1 addition & 1 deletion array-oriented-programming/img/history-of-bindings-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added codespell.txt
Empty file.
2 changes: 1 addition & 1 deletion notebooks/mandelbrot-on-all-accelerators.ipynb

Large diffs are not rendered by default.

Loading