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 { InjectionKey, provide, inject } from "vue"; | |
/** | |
* 型を指定しつつprovide/injectできる関数を生成する。 | |
* 親のコンポーネントでprovideを行い、子孫コンポーネントでinjectを行うことで、 | |
* 離れているコンポーネント間のデータの受け渡しが簡単になる。 | |
* | |
* @example | |
* // 親コンポーネント |
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
#!/bin/bash | |
set -euo pipefail | |
# HEADから過去5回分のコミットを探索し、カウンタープルリクエスト対象のブランチを決定 | |
attempts=5 | |
branches="" | |
for ((i = 0; i < attempts; i++)); do | |
commit_ref="HEAD" | |
for ((j = 0; j < i; j++)); do |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 subprocess | |
from pathlib import Path | |
lab = Path("01.lab.txt").read_text() | |
i = 0 | |
out_labs = [] | |
for l in lab.splitlines(): | |
a, b, c = l.split() | |
if c == "pau": |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 pathlib import Path | |
import numpy | |
from scipy.spatial.distance import cdist | |
def load_vector(path_format: Path): | |
predicted_vectors = [] | |
true_speaker_nums = [] | |
for speaker_num in range(100): |
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 pathlib import Path | |
from typing import Union, Sequence | |
import librosa | |
import numpy | |
from librosa.effects import _signal_to_frame_nonsilent | |
from matplotlib import pyplot | |
from tqdm import tqdm |
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 multiprocessing | |
import threading | |
import time | |
import timeout_decorator | |
def countup(): | |
for i in range(1, 10): | |
time.sleep(1) |
NewerOlder