Skip to content

Instantly share code, notes, and snippets.

View lseongjoo's full-sized avatar

Lee Seongjoo lseongjoo

  • CodeBasic
  • Seoul, Korea
View GitHub Profile
@lseongjoo
lseongjoo / bigpy-2015-07-19.py
Last active August 29, 2015 14:25
웹 API 요청 질문 관련 (2015-07-19)
# coding: utf-8
"""
https://www.facebook.com/bigpython
"""
import requests
response = requests.get('http://api.openhangul.com/dic', {'api_key':20141107174448, 'q':u'좋다'})
# content-length
cLen = response.headers['Content-Length']
# Get the content of the HTTP response
@lseongjoo
lseongjoo / console_arg_to_unicode.py
Created August 18, 2015 09:41
콘솔의 인코딩 정보를 활용해 명령줄 인자를 유니코드로 변환하기
# coding: utf-8
# @LeeSeongjoo
import sys
if __name__ == '__main__':
# 명령줄 인자를 유니코드로 변환
uargv = [arg.decode(sys.stdin.encoding) for arg in sys.argv[1:]]
print(uargv)
# coding: utf-8
"""
주신 질문에 대한 해결책을 제안합니다.
빅파이: 빅데이터를 위한 파이썬
www.facebook.com/bigpython
"""
import pandas as pd
from pandas import Series, DataFrame
@lseongjoo
lseongjoo / archive.py
Last active March 7, 2016 23:44
파이썬 파일 압축
# coding: utf-8
"""
빅파이, 빅데이터를 위한 파이썬
facebook.com/bigpython
이성주 seongjoo@codebasic.co
>>> print('테스트1', file=open('테스트1.txt', 'w'))
>>> print('테스트2', file=open('테스트2.txt', 'w'))
>>> 파일목록 = ['테스트1.txt', '테스트2.txt']
>>> export_to_zip('test.zip', 파일목록)
@lseongjoo
lseongjoo / imagenet1000_clsid_to_human.txt
Created December 13, 2017 12:54 — forked from yrevar/imagenet1000_clsidx_to_labels.txt
text: imagenet 1000 class id to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@lseongjoo
lseongjoo / coro_life.py
Created June 7, 2018 05:34 — forked from ramalho/coro_life.py
John Conway's Game of Life implemented with coroutines, by Brett Slatkin
#!/usr/bin/env python3
# Copyright 2014 Brett Slatkin, Pearson Education Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@lseongjoo
lseongjoo / 한글과유니코드.md
Created May 13, 2019 04:53 — forked from Pusnow/한글과유니코드.md
한글과 유니코드

한글과 유니코드

유니코드에서 한글을 어떻게 다루는지를 정리하였다.

유니코드

  • 유니코드(Unicode)는 전 세계의 모든 문자를 컴퓨터에서 일관되게 표현하고 다룰 수 있도록 설계된 산업 표준 (위키 백과)
  • 단순히 문자마다 번호를 붙임
  • 계속 업데이트되며 현재는 Unicode Version 9.0.0 이 최신이다.

UTF

  • 유니코드를 실제 파일 등에 어떻게 기록할 것인지를 표준화한 것이다.
@lseongjoo
lseongjoo / pydeep.md
Last active March 14, 2023 01:12
딥러닝 환경 설정

Codebasic (c) 2023

다음 문서는 아래 플랫폼별 딥러닝 소프트웨어 라이브러리 설치 절차를 안내합니다.

플랫폼

  1. Windows (x86-64bit)
  2. 유닉스 계열 (Unix-Like)
    1. Mac (Apple Silicon/Intel x86-64bit)
  3. Linux (x86-64bit)
@lseongjoo
lseongjoo / pyml.md
Last active March 14, 2023 00:48
기계학습 환경 설정

Codebasic (c) 2023

다음 문서는 아래 플랫폼별 기계학습 소프트웨어 라이브러리 설치 절차를 안내합니다.

플랫폼

  1. Windows (x86-64bit)
  2. 유닉스 계열 (Unix-Like)
    1. Mac (Apple Silicon/Intel x86-64bit)
  3. Linux (x86-64bit)
@lseongjoo
lseongjoo / install-nanum-fonts-on-ubuntu.md
Created September 27, 2022 00:25 — forked from tiglek/install-nanum-fonts-on-ubuntu.md
Ubuntu 한글 글꼴 설치