Skip to content
Open
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
46 changes: 34 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,51 @@ This repository contains the lecture materials for Stanford's Language Modeling
These are named `lecture_XX.py`.

### Setup

uv sync
git clone https://github.com/percyliang/edtrace

``` shell
uv sync
source .venv/bin/activate
```
You can compile a lecture by running:

python execute.py -m lecture_01
``` shell
python -m edtrace.execute -m lecture_01.py
```

which generates a `var/traces/lecture_01.json` and caches any images as
appropriate.

To view it locally:
## To view it locally:

> [!NOTE]
> The next step assumes you already have Node installed on your the system

``` shell
# first clone the edtrace repo
git clone https://github.com/percyliang/edtrace

# install the dependencies for edtrace
npm install --prefix=edtrace/frontend
```
if you see warnings for vulnerabilities, please run

``` shell
npm audit fix
```

Load a local server to view at `http://localhost:5173?trace=var/traces/sample.json`:

npm run --prefix=edtrace/frontend dev
``` shell
npm run --prefix=edtrace/frontend dev
```

Deploy to the main website:

npm run --prefix=edtrace/frontend build
git add assets
git ci -am "<some message>"
git push
``` shell
git clone https://github.com/percyliang/edtrace
npm run --prefix=edtrace/frontend build
git add assets
git ci -am "<some message>"
git push
```

## Non-executable lectures

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"devDependencies": {
"vite": "^8.0.3"
"vite": "^8.0.16"
}
}