This file contains 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 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 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 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 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 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 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 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 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