Skip to content

Instantly share code, notes, and snippets.

View ClaudeSeo's full-sized avatar
👀
1C3R

Dongmyeong Seo ClaudeSeo

👀
1C3R
View GitHub Profile
@ClaudeSeo
ClaudeSeo / alacritty.yml
Last active May 23, 2022 11:57 — forked from yoonhoGo/alacritty.yml
alacritty settings
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Import additional configuration files
#
# Imports are loaded in order, skipping all missing files, with the importing
# file being loaded last. If a field is already present in a previous import, it
# will be replaced.
#
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
🌞 Morning 563 commits ███████▊░░░░░░░░░░░░░ 37.0%
🌆 Daytime 341 commits ████▋░░░░░░░░░░░░░░░░ 22.4%
🌃 Evening 99 commits █▎░░░░░░░░░░░░░░░░░░░ 6.5%
🌙 Night 520 commits ███████▏░░░░░░░░░░░░░ 34.1%
@ClaudeSeo
ClaudeSeo / enum_test-1.py
Created January 1, 2017 16:19
pyhton enum 타입 사용
# -*- coding: utf-8 -*-
from enum import Enum
USER_TYPE = Enum('USER_TYPE', 'user admin super')
print USER_TYPE.user
'''
>>> <USER_TYPE.user: 1>
'''
@ClaudeSeo
ClaudeSeo / enum_test-2.py
Last active January 1, 2017 16:18
python enum 타입 사용
# -*- coding: utf-8 -*-
def enum(**enums):
return type('Enum', (), enums)
USER_TYPE = enum(user=1, admin=2, super=3)
print USER_TYPE.admin
@ClaudeSeo
ClaudeSeo / comma_number_with_locale.py
Created December 7, 2016 03:28
locale 모듈을 사용하여 천 단위마다 컴마로 구분하기
import locale
n = 12345
# 시스템 기본 locale 적용
locale.setlocale(locale.LC_ALL, '')
locale.format('%.2f', n, True)
'''
>>> 12,345.00
'''
@ClaudeSeo
ClaudeSeo / comma_number.py
Last active December 7, 2016 03:33
천 단위마다 컴마로 구분하기
'{:,d}'.format(12345)
'{:,.2f}'.format(12345.12)
'''
>>> 12,345
>>> 12,345.12
'''
@ClaudeSeo
ClaudeSeo / c_plus_study.cpp
Last active November 23, 2016 05:53
C++ 연습
/*
* Created by Claude.Seo
* 2016.11.23
*/
#include <iostream>
using namespace std;
class Restraunt {
private:
# -*- coding: utf-8 -*-
import requests
BASE_URL = 'https://...'
success_count = 0
FILE_LIST = [
'/external/css/font-awesome/font-awesome-4.6.1.min.css',
'/external/css/jqueryui/jquery-ui-1.11.4.min.css',
]
@ClaudeSeo
ClaudeSeo / url_parse.py
Created November 14, 2016 08:37
cloudflare에서 서빙중인 파일들을 파일들을 검색하여 다운로드 및 url 목록을 만든다
# -*- coding: utf-8 -*-
import os
import re
import requests
SEARCH_FOLDER='./app'
def download_file(url):
local_filename = url.split('/')[-1]
@ClaudeSeo
ClaudeSeo / logging-5.py
Created November 5, 2016 09:27
python logging post-5
import logging
import logging.handlers
logger = logging.getLogger('mylogger')
logger.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(levelname)s : %(filename)s : %(lineno)s %(asctime)s : %(message)s')
file_max_size = 10 * 1024 * 1024