Skip to content

Instantly share code, notes, and snippets.

View jeakwon's full-sized avatar

Jea Kwon jeakwon

View GitHub Profile
@jeakwon
jeakwon / setup.py
Created February 18, 2019 02:03
setup.py with markdown
from setuptools import setup, find_packages
with open('README.md', encoding='utf-8') as f:
long_description = f.read()
setup(
name = 'ypcc',
version = '0.6.6',
long_description = long_description,
long_description_content_type='text/markdown',
description = 'ccpy',
@jeakwon
jeakwon / array.py
Created February 14, 2019 02:46
array print example
import numpy as np
arr = np.array([
[1,2],
[3,4],
])
print(arr)
@jeakwon
jeakwon / setup.cfg
Created February 12, 2019 09:18
setup.cfg for pip install package
[metadata]
description-file = README.md
@jeakwon
jeakwon / setup.py
Last active February 12, 2019 10:12
pip install build
from setuptools import setup, find_packages
setup(
name = 'ccpy',
version = '0.1',
description = 'ccpy',
author = 'jeakwon',
author_email = 'onlytojay@gmail.com',
url = 'https://github.com/jeakwon/ccpy',
download_url = 'https://github.com/jeakwon/ccpy/archive/0.0.tar.gz',
@jeakwon
jeakwon / desktop.py
Last active February 12, 2019 02:12
Desktop path snippet
import os
def get_file_from_desktop(filename):
filepath = os.path.expanduser('~/Desktop')
fullpath = get_file(filepath,filename)
return fullpath
@jeakwon
jeakwon / hangul.py
Created February 5, 2019 06:56
주피터 노트북 한글 표시
from matplotlib import font_manager, rc
font_name = font_manager.FontProperties(fname="c:/Windows/Fonts/malgun.ttf").get_name()
rc('font', family=font_name)
@jeakwon
jeakwon / to_json.py
Created February 1, 2019 13:37
python save dict as json file
import json
def to_json(dictionary, filename):
with open(filename,'w') as fp:
json.dump(dictionary, fp,sort_keys=True, indent=4,ensure_ascii=False)