Skip to content

Instantly share code, notes, and snippets.

View ychoi-kr's full-sized avatar
๐Ÿ˜€

Yong Choi ychoi-kr

๐Ÿ˜€
View GitHub Profile
en ko ja ru
Apple ์‚ฌ๊ณผ ใ‚Šใ‚“ใ” ะฏะฑะปะพะบะพ
Chair ์˜์ž ๆค…ๅญ ะกั‚ัƒะป
Table ํ…Œ์ด๋ธ” ใƒ†ใƒผใƒ–ใƒซ ะกั‚ะพะป
Pen ํŽœ ใƒšใƒณ ะ ัƒั‡ะบะฐ
Book ์ฑ… ๆœฌ ะšะฝะธะณะฐ
Computer ์ปดํ“จํ„ฐ ใ‚ณใƒณใƒ”ใƒฅใƒผใ‚ฟใƒผ ะšะพะผะฟัŒัŽั‚ะตั€
Phone ํ•ธ๋“œํฐ ้›ป่ฉฑ ะขะตะปะตั„ะพะฝ
Television ํ…”๋ ˆ๋น„์ „ ใƒ†ใƒฌใƒ“ ะขะตะปะตะฒะธะดะตะฝะธะต
Car ์ž๋™์ฐจ ่ปŠ ะœะฐัˆะธะฝะฐ
@ychoi-kr
ychoi-kr / srt.py
Created November 5, 2023 09:37
whisper scripts
# modified script from https://github.com/openai/whisper/discussions/98#discussioncomment-3725983
from datetime import timedelta
import os
import sys
import whisper
def transcribe_audio(path):
model = whisper.load_model("large")
print("Whisper model loaded.")
@ychoi-kr
ychoi-kr / choose_license_ko.dot
Last active November 26, 2022 12:42
๋ผ์ด์„ ์Šค ์„ ํƒ ๊ฒฐ์ • ํŠธ๋ฆฌ(https://wikidocs.net/180842)
digraph {
love_something [label="๊ณต์œ ํ•˜๊ณ  ์‹ถ์€\n๊ฒƒ์ด ์žˆ๋‚˜์š”?" style="filled" fillcolor="orange"]
did_you_make_it [label="์ง์ ‘\n๋งŒ๋“ค์—ˆ๋‚˜์š”?" shape=diamond style="filled" fillcolor="yellow"]
is_it_in_the_public_domain [label="ํผ๋ธ”๋ฆญ ๋„๋ฉ”์ธ์—\n์†ํ•ด ์žˆ๋‚˜์š”?" shape=diamond style="filled" fillcolor="yellow"]
public_domain [label="์ด ์ž‘ํ’ˆ์€ ํผ๋ธ”๋ฆญ\n๋„๋ฉ”์ธ์— ์žˆ์Šต๋‹ˆ๋‹ค.\n์ž์œ ๋กญ๊ฒŒ ๊ณต์œ ํ•˜์„ธ์š”." shape=rect style="rounded,filled" fillcolor="green" fontcolor="white" URL="https://ko.wikipedia.org/wiki/ํผ๋ธ”๋ฆญ_๋„๋ฉ”์ธ"]
did_you_improve_or_modify [label="๋‹น์‹ ์ด ์ฐฝ์กฐ์ ์ธ\n๋ฐฉ์‹์œผ๋กœ ๊ฐœ์„ ํ•˜๊ฑฐ๋‚˜\n์ˆ˜์ •ํ–ˆ๋‚˜์š”?" shape=diamond style="filled" fillcolor="yellow"]
is_it_shared_with_an_open_content_license [label="๊ณต๊ฐœ ์ฝ˜ํ…ํŠธ\n๋ผ์ด์„ ์Šค๋กœ\n๊ณต์œ ๋˜๋‚˜์š”?" shape=diamond style="filled" fillcolor="yellow"]
share_freely_under_the_license_terms [label="๋ผ์ด์„ ์Šค ์กฐ๊ฑด์—\n๋”ฐ๋ผ ์ž์œ ๋กญ๊ฒŒ\n๊ณต์œ " style="filled" fillcolor="pink"]
you_hold_a_copyright [label="๋‹น์‹ ์ด ์ž‘ํ’ˆ์— ๋Œ€ํ•œ\n์ €์ž‘๊ถŒ์„ ๋ณด์œ ํ•ฉ๋‹ˆ๋‹ค.\nํƒ€์ธ์˜ ์ฑ„ํƒ, ๋ณ€๊ฒฝ,\n์žฌ๋ฐฐํฌ๋ฅผ ๊ธˆ์ง€ํ•ฉ๋‹ˆ๋‹ค." shape=rect style="rounded,filled" fillcolor="red"]
pirate [label="์ €์ž‘๊ถŒ์€ ๊ท€ํ•˜์˜ ๊ณต์ • ์‚ฌ์šฉ\n๊ถŒ๋ฆฌ๋ฅผ ์นจํ•ดํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.\n๊ทธ๋Ÿฌ๋‚˜ ํ•ด์ ์œผ๋กœ ๊ธฐ์†Œ๋  ์ˆ˜\n์žˆ์Šต๋‹ˆ๋‹ค." shap
# https://www.facebook.com/groups/pythonkorea/permalink/4703346156415175/
s = 'program'
L = list(s)
for _ in s:
L = [L.pop(-1)] + L
print(''.join(L))
@ychoi-kr
ychoi-kr / install_konlpy.py
Created November 26, 2021 10:24
KoNLPy ์ตœ์‹  ๋ฒ„์ „ ์„ค์น˜
import os
from urllib.parse import urlparse
import urllib.request
import zipfile
import tempfile
from subprocess import call
zip_url = 'https://github.com/konlpy/konlpy/archive/refs/heads/master.zip'
dirname = 'konlpy-master'
@ychoi-kr
ychoi-kr / book_cover_3d.png
Last active July 7, 2021 07:23
์ƒํ™œ์ฝ”๋”ฉ ์ด๋ก ํŽธ ์†Œ๊ฐœ ๊ธ€
book_cover_3d.png
@ychoi-kr
ychoi-kr / p43-1.txt
Created June 1, 2021 08:47
๊ฐ•ํ™”ํ•™์Šต/์‹ฌ์ธต๊ฐ•ํ™”ํ•™์Šต ํŠน๊ฐ• ํŽธ์ง‘
# ์ตœ๊ณ ๋ผ๊ณ  ์ƒ๊ฐํ•˜๋Š” ์Šฌ๋กฏ๋จธ์‹  ํ‘œ์‹œํ•˜๊ธฐ
nSelected = nPosReward + nNegReward
for i in range(d):
print('Machine number ' + str(i+1) + ' was selected ' + str(nSelected[i]) + ' times')
print('Conclusion: Best machine is machine number ' + str(np.argmax(nSelected) + 1))
@ychoi-kr
ychoi-kr / ex03-1_create_pets_table.sql
Last active October 11, 2023 01:08
SQLite๋กœ ๊ฐ€๋ณ๊ฒŒ ๋ฐฐ์šฐ๋Š” ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค - ์—ฐ์Šต ๋ฌธ์ œ ํ•ด๋‹ต
create table "pets" (
"ID" integer not null,
"Name" text not null,
"Animal" text,
primary key("ID")
);
>>> for n in range(3, 20, 3):
... print(f'{n:2d}')
...
3
6
9
12
15
18
@ychoi-kr
ychoi-kr / gist:cf61a7da0ae064439f5fa9bbb00773ce
Last active May 19, 2021 04:10
simple type inference with try-except in python
>>> def triple_input_number():
... x = input()
... try:
... n = int(x)
... return n * 3
... except:
... pass
...
>>> triple_input_number()
3