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 typing import Dict, Any, List, Tuple | |
import torch | |
from torch import Tensor | |
def auto_index_select(value_tensor: Tensor, index_tensor: Tensor): | |
index_tensor = index_tensor.squeeze() | |
sizes = value_tensor.size() | |
for dim, dim_size in enumerate(sizes): |
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
\newcommand\todo[1]{\textcolor{red}{#1}} | |
\newcommand\g[1]{\textcolor{gray}{#1}} | |
\newcommand*{\scale}[2][4]{\scalebox{#1}{$#2$}}% | |
\newcommand*{\resize}[2]{\resizebox{#1}{!}{$#2$}}% | |
\newcommand\ko[1]{ | |
\begin{CJK}{UTF8}{} % require \usepackage{CJKutf8} | |
\CJKfamily{mj} | |
#1 | |
\end{CJK} | |
} |
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 typing import Tuple, List | |
try: | |
import matplotlib.pyplot as plt | |
from matplotlib import cm | |
from matplotlib.ticker import LinearLocator | |
from mpl_toolkits.mplot3d import Axes3D | |
except ImportError: | |
pass | |
import numpy as np |
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 random | |
T = 596 | |
R, C = 37, 16 | |
numbers = list(range(1, T + 1)) | |
random.shuffle(numbers) | |
sets = [] | |
for _set in range(R): |
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
sudo apt update | |
sudo apt install -y build-essential zlib1g-dev libssl-dev | |
wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.8p1.tar.gz | |
tar -xvf openssh-9.8p1.tar.gz | |
cd openssh-9.8p1 | |
./configure | |
make |
OlderNewer