同じ方法が$\text{Xe}\LaTeX$では利用可能だと思いますが、他の実装(
LuaLaTeXなどではfontspec
パッケージを利用して利用するフォントをかんたんに指定することができる
import jax.numpy as jnp | |
from dataclasses import dataclass | |
from functools import partial | |
from jax.tree_util import register_dataclass, tree_flatten, tree_leaves | |
from jax import vmap | |
import jax | |
@partial( | |
register_dataclass, |
#!/usr/bin/env python3 | |
import sys | |
def unicode_escape(file_path): | |
try: | |
with open(file_path, 'r', encoding='utf-8') as file: | |
content = file.read() | |
escaped_content = content.encode('unicode_escape').decode('ascii') |
#!/usr/bin/env python3 | |
''' | |
Command line tool to run a command and send a message to a Slack webhook if the command fails. | |
''' | |
import subprocess | |
import urllib | |
import urllib.request | |
import urllib.parse |
/* | |
* Run `cc -Wall -Wextra -fopenmp -O3 cilksort.c -o cilksort` to compile. | |
* Recommend to use clang over gcc for performance. | |
*/ | |
/* | |
* Original code from the Cilk project | |
* | |
* Copyright (c) 2000 Massachusetts Institute of Technology | |
* Copyright (c) 2000 Matteo Frigo |
import argparse | |
from safetensors import safe_open | |
import torch | |
parser = argparse.ArgumentParser(description='Compare two safetensors') | |
parser.add_argument('tensor1', type=str, help='First tensor to compare') | |
parser.add_argument('tensor2', type=str, help='Second tensor to compare') | |
args = parser.parse_args() |
FCCpx
is a cross compiler for login node. So if you build boost on computation nodes, you should replace FCCpx
command with FCC
.
VARIANT="1_83_0"; \
wget "https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_${VARIANT}.tar.gz" && \
tar xvf "boost_${VARIANT}.tar.gz" && \
/** | |
* | |
* @param targetFunc fetch function | |
* @param opt retry options | |
* @returns | |
*/ | |
export const retryFetch = <T>( | |
targetFunc: () => Promise<T>, | |
opt?: { | |
retryCount?: number; |