Update cheatsheets

This commit is contained in:
ivuorinen
2024-12-31 00:17:28 +00:00
parent aa60befad7
commit 489c6fbf29
5 changed files with 86 additions and 18 deletions

25
tldr/jupyter-lab Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# jupyter lab
> Interactive development environment for Jupyter notebooks.
> More information: <https://jupyterlab.readthedocs.io/en/stable/>.
- Start JupyterLab:
`jupyter lab`
- Open a specific notebook:
`jupyter lab {{path/to/notebook.ipynb}}`
- Start JupyterLab in a specific directory:
`jupyter lab --notebook-dir {{path/to/directory}}`
- Start JupyterLab in debug mode:
`jupyter lab --debug`

View File

@@ -3,23 +3,10 @@ syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# jupyter lab
# jupyterlab
> Interactive development environment for Jupyter notebooks.
> More information: <https://jupyterlab.readthedocs.io/en/stable/>.
> This command is an alias of `jupyter lab`.
- Start JupyterLab:
- View documentation for the original command:
`jupyter lab`
- Open a specific notebook:
`jupyter lab {{path/to/notebook.ipynb}}`
- Start JupyterLab in a specific directory:
`jupyter lab --notebook-dir {{path/to/directory}}`
- Start JupyterLab in debug mode:
`jupyter lab --debug`
`tldr jupyter lab`

26
tldr/lit Normal file
View File

@@ -0,0 +1,26 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# lit
> LLVM integrated tester for executing LLVM and Clang style test suites, summarizing results.
> Part of LLVM.
> More information: <https://www.llvm.org/docs/CommandGuide/lit.html>.
- Run a specified test case:
`lit {{path/to/test_file.test}}`
- Run all test cases in a specified directory:
`lit {{path/to/test_suite}}`
- Run all test cases and check the wall time for each cases, then report to summary output:
`lit {{path/to/test_suite}} --time-tests`
- Run individual tests with Valgrind (memory check and memory leak test):
`lit {{path/to/test_file.test}} --vg --vg-leak --vg-args={{args_to_valgrind}}`

View File

@@ -9,4 +9,4 @@ source: https://github.com/tldr-pages/tldr.git
- View documentation for the original command:
`tldr -p linux awk`
`tldr awk`

30
tldr/tuc Normal file
View File

@@ -0,0 +1,30 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# tuc
> Cut text (or bytes) where a delimiter matches, then keep the desired parts.
> A more user-friendly and powerful version of `cut` with sensible defaults.
> More information: <https://github.com/riquito/tuc>.
- Cut and rearrange fields:
`echo "foo bar baz" | tuc -d '{{ }}' -f {{3,2,1}}`
- Replace the delimiter `space` with an arrow:
`echo "foo bar baz" | tuc -d ' ' -r ' ➡ '`
- Keep a range of fields:
`echo "foo bar baz" | tuc -d ' ' -f {{2:}}`
- Cut using regular expressions:
`echo "a,b, c" | tuc -e '{{[, ]+}}' -f {{1,3}}`
- Emit JSON output:
`echo "foo bar baz" | tuc -d '{{ }}' --json`