- open typst source in neovim:
nvim main.typ
- open typst watch in a separate terminal buffer to be able to see error messages
:e term://typst watch %
| " standard key bindings | |
| inoremap jk <Esc> | |
| nnoremap <Space> : | |
| nnoremap <Enter> gwap | |
| vnoremap <Enter> gw | |
| " paste/yank from/to system clipboard | |
| set clipboard+=unnamedplus | |
| nnoremap <leader>p "+p |
| # 0 is too far from ` ;) | |
| set -g base-index 1 | |
| setw -g pane-base-index 1 | |
| #set -g default-terminal screen-256color | |
| set -g status-keys vi | |
| set -g history-limit 10000 | |
| setw -g mode-keys vi |
| import torch | |
| import torch.nn as nn | |
| from torch.utils.data import Dataset, DataLoader | |
| import xarray as xr | |
| import glob | |
| from tqdm import tqdm | |
| # ----------------------- | |
| # Dataset | |
| # ----------------------- |
| # load venv_cdsapi, which is a standard python venv plus `pip install cdsapi` | |
| # and also needs ~/.cdsapirc with lines: | |
| # url: https://cds.climate.copernicus.eu/api | |
| # key: <CDS API KEY> | |
| import os | |
| import numpy as np | |
| import cdsapi | |
| import xarray as xr |
| Description='eduroam' | |
| Interface=wlp0s20f3 | |
| Connection=wireless | |
| IP=dhcp | |
| Security=wpa-configsection | |
| ESSID=eduroam | |
| WPAConfigSection=( | |
| 'ssid="eduroam"' | |
| 'key_mgmt=WPA-EAP' | |
| 'pairwise=CCMP TKIP' |
| /* See LICENSE file for copyright and license details. */ | |
| /* | |
| * appearance | |
| * | |
| * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html | |
| */ | |
| static char font[] = "pragmatapro:pixelsize=16:weight=medium:antialias=true:autohint=true"; | |
| static int borderpx = 2; |
| #!/bin/bash | |
| # | |
| # Record screen and microphone audio | |
| # Stefan Siegert 2020, adapted from code by Steven Gordon | |
| # | |
| # Example usage: | |
| # screencast intro-to-datacomms | |
| # The audio and screen will be recorded. Press 'z' to stop. | |
| # Two files will be created: intro-to-datacomms-audio.flac, intro-to-datacomms-screen.mp4 |
To create a screencast using Linux command line tools I have used the methods outlined on this page:
https://sandilands.info/sgordon/multimedia-on-linux-command-line
(Ctrl-F screencast)
This might not be the easiest method, but it was simple enough for me and uses only tools that I had installed already.
| # Example 3.12 | |
| x = c(0.02, 0.19, 0.27, 0.28, 0.32, 0.50, 1.08, 1.42, 2.23) | |
| # Example 3.13 | |
| x = c(-0.63, 0.18, -0.84, 1.60, 0.33, -0.82, 0.49, 0.74, 0.58) | |
| y = c(-0.31, 1.51, 0.39, -0.62, -2.21, 1.12, -0.04, -0.02, 0.94) | |
| # Example 3.16 | |
| x = c(0.38, 0.59, 0.06, 0.08, 0.22, 1.45, 0.61, 0.27, 0.48, 0.07) | |
| B = 1000 |