This file contains hidden or 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
source ~/dev/tmp/zsh-async/async.zsh | |
# autoload -Uz async && async | |
BASE_PROMPT=$PROMPT | |
prompt_precmd() { | |
if [[ -n "$PRE_PROMPT" ]]; then | |
PROMPT="$PRE_PROMPT" | |
fi | |
async_stop_worker prompt_async_worker |
This file contains hidden or 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
; Quake-style WezTerm toggle for AutoHotkey | |
; I referred to https://github.com/ehpc/quake-windows-bash. Thank you. | |
#SingleInstance force | |
global ProgramName := "wezterm-gui.exe" | |
global WinTitle := "ahk_exe " . ProgramName | |
!w:: | |
{ | |
if WinExist(WinTitle) | |
WinGetMinMax(WinTitle) = -1 ? WinRestore(WinTitle) : WinMinimize(WinTitle) |
This file contains hidden or 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
{ | |
"figure": { | |
"prefix": "figure", | |
"body": [ | |
"\\begin{figure}[htb]", | |
" \\centering", | |
" \\includegraphics[width=\\textwidth]{figures/${1}}", | |
" \\caption{${2}}", | |
" \\label{fig:${3}}", | |
"\\end{figure}", |
This file contains hidden or 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
import time | |
from contextlib import contextmanager | |
@contextmanager | |
def timer(msg=''): | |
start = time.time() | |
yield | |
print(f'{msg} {time.time() - start:.4f}') |
This file contains hidden or 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
FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu20.04 | |
ENV DEBIAN_FRONTEND=noninteractive | |
ENV PYTHONUNBUFFERED=1 | |
RUN set -eux; \ | |
apt-get update && \ | |
apt-get install -y --no-install-recommends \ | |
curl git gcc g++ wget bzip2 \ | |
libgl1-mesa-dev libopencv-dev cmake ffmpeg \ | |
python3-dev python3-pip && \ |
This file contains hidden or 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
[tool.black] | |
line-length = 119 | |
skip-string-normalization = true | |
[tool.isort] | |
profile = "black" | |
line_length = 119 |