Skip to content

Instantly share code, notes, and snippets.

View 21jun's full-sized avatar
๐Ÿ‰

lee1jun 21jun

๐Ÿ‰
View GitHub Profile
@hydra.main(version_base=None, config_path=".", config_name="config")
def main(cfg):
#> 1. Initialize
parser = HfArgumentParser((ModelArguments, DataTrainingArguments, TrainingArguments))
# Convert OmegaConf to Dict
hf_args = OmegaConf.to_container(cfg.hf, resolve=True)
# add -- in front of keys
from datasets import load_dataset
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
import soundfile as sf
import torch
import jiwer
import fastwer
# librispeech_eval = load_dataset("librispeech_asr", "clean", split="test")
librispeech_eval = load_dataset(
@21jun
21jun / alg.md
Created November 30, 2020 11:03

Algorithm

+ this will be highlighted in green
- this will be highlighted in red

์‚ฌ์ „

# -*- coding: utf-8 -*-
"""
Course: Numerical Analysis
Assignment 4
17011675 Lee Won Jun
Department of Software.
Python 3.6
"""
GlowScript 2.9 VPython
# ์–ด๋ฆฐ์™•์ž์˜ ๋ณ„
B_612 = sphere(pos=vector(0,0,0), radius = 3,color=color.yellow, texture=textures.earth)
B_612.v = vector(0,0,0)
# ์–ด๋ฆฐ์™•์ž
prince = sphere(pos=vector(4,0,0),radius=0.5,color=color.blue, make_trail=True)
prince.mass = 15
@21jun
21jun / kosep.py
Last active July 16, 2019 15:40
ํ•œ๊ธ€ ๋ฌธ์žฅ ๋ถ„์ ˆ ์ˆ˜ํ–‰ ์Šคํฌ๋ฆฝํŠธ
import sys
import argparse
from nltk.tokenize import sent_tokenize
from konlpy.tag import Mecab
def parse_arguments():
parser = argparse.ArgumentParser()
parser.add_argument('--input', type=str, help ="input file path")
parser.add_argument('--out', type=str, help ="write file?",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#include<stdio.h>
#define MAX_CITIES 6
#define MIN(a, b) a < b ? a : b
int main()
{
int A[MAX_CITIES] = { 0, 1, 3, 6 ,11, 17 };
int H[MAX_CITIES] = { 0, 2, 5, 1, 5, 0 };
int M[MAX_CITIES] = { 0 };
#define WIN32_LEAN_AND_MEAN
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
int global = 1;
DWORD WINAPI ThreadFunc(LPVOID);
// DWORD๋Š” ๋”๋ธ”์›Œ๋“œ = long
// WINAPI : Windows์˜ API
// LPVOID : ms์—์„œ ์‚ฌ์šฉํ•˜๋Š” void*
#include<stdio.h>
void selectionSort(int a[], int n) {
int i, j, min, tmp;
for ( i = 0; i < n-1; i++)
{
min = i;
for ( j = i+1; j < n; j++)
{
if (a[j] < a[min]) min = j;
}