Skip to content

Instantly share code, notes, and snippets.

View koyokr's full-sized avatar

Younghun Ko koyokr

View GitHub Profile
@koyokr
koyokr / asdf.py
Last active November 12, 2023 15:01
!pip install mysql-connector-python
import mysql.connector
# DB 연결
cnx = mysql.connector.connect(
user=os.getenv('DB_USER'),
password=os.getenv('DB_PASSWORD'),
host='localhost',
database='giveangel'
@koyokr
koyokr / dir2.py
Last active April 14, 2023 18:19
ide가 없어
import inspect
from pprint import pprint
def dir2(obj, dir_=True):
result = [obj.__name__ if hasattr(obj, '__name__') else obj.__class__.__name__]
try:
result.append(str(inspect.signature(obj)))
except (ValueError, TypeError):
pass
if doc := inspect.getdoc(obj):
import imghdr
import os
import re
import sys
import shutil
from datetime import datetime
from typing import Generator, List, NamedTuple, NoReturn, Tuple
from xml.etree import ElementTree
from html2text import HTML2Text
  1. 구글 드라이브 때문이니까 구글 드라이브를 삭제한다.

  2. 검색 앱의 아이콘 캐시를 지운다. 아래 경로로 가서 100, 125, 150 같은 어떤 폴더가 있을텐데 난 삭제했다.

C:\Users\koyo\AppData\Local\Packages\Microsoft.Windows.Search_cw5n1h2txyewy\LocalState\AppIconCache
  1. 재부팅
@koyokr
koyokr / tecogan conda
Last active April 5, 2021 08:00
install requirements of tecogan
conda install tensorflow-gpu=1.15 tensorflow-estimator=1.15 numpy=1.17 scipy scikit-image matplotlib pandas Keras opencv ipython
conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch
@font-face {
font-family: "나눔고딕";
src: local("Source Han Sans K");
}
@font-face {
font-family: "NanumGothic";
src: local("Source Han Sans K");
}
@font-face {
font-family: "맑은 고딕";
@koyokr
koyokr / .ps1
Last active September 22, 2018 00:53
$version = code --list-extensions --show-versions | out-string
@koyokr
koyokr / .clj
Created September 6, 2018 02:36
#(loop [coll []
n 1]
(if (> n %)
coll
(recur (conj coll (case n
1 1
2 1
(apply + (take-last 2 coll))))
(inc n))))
Get-Content -Path hosts | Add-Content -Path C:\Windows\System32\drivers\etc\hosts
/*
Put this file in /static/js/load-photoswipe.js
Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/
*/
/* TODO: Make the share function work */
(function(d) {
/*
Initialise Photoswipe
*/