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
#include <stdio.h> | |
#include <stdbool.h> | |
int main() { | |
//bool hours12 = false; | |
bool hours12 = true; | |
int hour, minute; | |
scanf("%d%d", &hour, &minute); | |
int currentTime = hour * 100 + minute; |
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
>>> def triple_input_number(): | |
... x = input() | |
... try: | |
... n = int(x) | |
... return n * 3 | |
... except: | |
... pass | |
... | |
>>> triple_input_number() | |
3 |
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
>>> for n in range(3, 20, 3): | |
... print(f'{n:2d}') | |
... | |
3 | |
6 | |
9 | |
12 | |
15 | |
18 |
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
create table "pets" ( | |
"ID" integer not null, | |
"Name" text not null, | |
"Animal" text, | |
primary key("ID") | |
); |
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
# ์ต๊ณ ๋ผ๊ณ ์๊ฐํ๋ ์ฌ๋กฏ๋จธ์ ํ์ํ๊ธฐ | |
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)) |

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 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' |
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
# https://www.facebook.com/groups/pythonkorea/permalink/4703346156415175/ | |
s = 'program' | |
L = list(s) | |
for _ in s: | |
L = [L.pop(-1)] + L | |
print(''.join(L)) |
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
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 |
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
# 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.") |
OlderNewer