Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| FROM ubuntu:20.04 | |
| RUN apt update && DEBIAN_FRONTEND="noninteractive" apt install -y \ | |
| python3 build-essential | |
| WORKDIR /root |
| # Save as ~/.mailcap. Then use run-mailcap to: | |
| # | |
| # - open files by `run-mailcap --action=view <file>`, or | |
| # - view them in the terminal by `run-mailcap --action=cat <file>`. | |
| # | |
| # Useful | |
| # | |
| # - in mutt by `set mailcap_file $HOME/.mailcap` | |
| # - in Vim by adding to your vimrc | |
| # |
| def soft_dice_loss(y_true, y_pred, epsilon=1e-6): | |
| ''' | |
| Soft dice loss calculation for arbitrary batch size, number of classes, and number of spatial dimensions. | |
| Assumes the `channels_last` format. | |
| # Arguments | |
| y_true: b x X x Y( x Z...) x c One hot encoding of ground truth | |
| y_pred: b x X x Y( x Z...) x c Network output, must sum to 1 over c channel (such as after softmax) | |
| epsilon: Used for numerical stability to avoid divide by zero errors | |
| #!/usr/bin/perl -w | |
| # 作者: 洪朝貴 http://www.cyut.edu.tw/~ckhung/, 2001. | |
| # 趙惟倫 <bluebat@member.fsf.org>, 2012. | |
| # 功能: 讓使用者下象棋的程式. 純粹只是版面安排及棋子移動; | |
| # 沒有電腦下棋的功能. | |
| # 需求: 系統內應有 ncurses 程式庫, 及 perl 的 curses 模組. | |
| # 操作說明: 用方向鍵移動遊標, 用空間棒撿起/放下棋子, | |
| # 按 s 將目前盤面存檔. 所存檔案, 下次可作為命令列參數 | |
| # 其他: 在彩色終端機上可顯示彩色 (例如 cxterm-color 或 linux | |
| # console); 在黑白終端機上 (例如 MS Windows 的 telnet) |
| for line in yourString:gmatch("([^\n]*)\n?") do | |
| -- do something | |
| end |