-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sasha Rush
committed
Jan 6, 2024
1 parent
c0ed723
commit 941567e
Showing
4 changed files
with
173 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: double-quote-string-fixer | ||
- id: name-tests-test | ||
- id: requirements-txt-fixer | ||
- repo: https://github.com/asottile/setup-cfg-fmt | ||
rev: v2.5.0 | ||
hooks: | ||
- id: setup-cfg-fmt | ||
- repo: https://github.com/asottile/reorder-python-imports | ||
rev: v3.12.0 | ||
hooks: | ||
- id: reorder-python-imports | ||
exclude: ^(pre_commit/resources/|testing/resources/python3_hooks_repo/) | ||
args: [--py39-plus, --add-import, 'from __future__ import annotations'] | ||
- repo: https://github.com/asottile/add-trailing-comma | ||
rev: v3.1.0 | ||
hooks: | ||
- id: add-trailing-comma | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.1.0 | ||
hooks: | ||
- id: flake8 | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.8.0 | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: [types-all] | ||
exclude: ^testing/resources/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
SHELL := /bin/bash | ||
.PHONY: help check autoformat notebook html clean | ||
.DEFAULT: help | ||
|
||
# Generates a useful overview/help message for various make features | ||
help: | ||
@echo "make check" | ||
@echo " Run code style and linting (black, flake, isort) *without* changing files!" | ||
@echo "make autoformat" | ||
@echo " Run code styling (black, isort) and update in place - committing with pre-commit also does this." | ||
@echo "make notebook" | ||
@echo " Use jupytext-light to build a notebook (.ipynb) from the s4/s4.py script." | ||
@echo "make html" | ||
@echo " Use jupyter & jupytext to do the two-step conversion from the python script, to the HTML blog post." | ||
@echo "make clean" | ||
@echo " Delete the generated, top-level s4.ipynb notebook." | ||
|
||
|
||
notebook: mamba.py | ||
jupytext --to notebook mamba.py -o mamba.ipynb | ||
|
||
html: mamba.py | ||
jupytext --to notebook mamba.py -o mamba.ipynb | ||
jupyter nbconvert --to html mamba.ipynb | ||
|
||
md: mamba.py | ||
jupytext --to markdown mamba.py | ||
|
||
blog: md | ||
pandoc docs/header-includes.yaml mamba.md --katex=/usr/local/lib/node_modules/katex/dist/ --output=docs/index.html --to=html5 --css=docs/github.min.css --css=docs/tufte.css --no-highlight --self-contained --metadata pagetitle="The Annotated Mamba" | ||
|
||
clean: mamba.ipynb | ||
rm -f mamba.ipynb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Eventual version of the annotated mamba paper. Might take some time ... | ||
Eventual version of the annotated mamba paper. Might take some time ... | ||
|
||
Mamba: Linear-Time Sequence Modeling with Selective State Spaces | ||
https://arxiv.org/abs/2312.00752 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters