Skip to content

Instantly share code, notes, and snippets.

View kokospapa8's full-sized avatar
πŸ•
koko

Jinwook Baek kokospapa8

πŸ•
koko
View GitHub Profile
@kokospapa8
kokospapa8 / python_doc.list
Created September 19, 2015 08:16
Python doc
redit
https://www.reddit.com/r/python
python ecosystem
http://mirnazim.org/writings/python-ecosystem-introduction/
python iaq
http://norvig.com/python-iaq.html
@kokospapa8
kokospapa8 / docker_cheat.md
Created September 20, 2017 05:53 — forked from nacyot/docker_cheat.md
도컀(Docker) 치트 μ‹œνŠΈ

Docker 치트 μ‹œνŠΈ

ν•œκ΅­μ–΄ λ²ˆμ—­(초벌) : nacyot

μ™œ Dockerλ₯Ό μ‚¬μš©ν•΄μ•Όν•˜λŠ”κ°€?

Why Should I Care (For Developers)

"λ‚˜μ—κ²Œ Docker의 λ§€λ ₯은 κ°„λ‹¨νžˆ 격리된 ν™˜κ²½μ„ λ§Œλ“€ 수 μžˆλ‹€λŠ” 것과, κ·ΈλŸ¬ν•œ ν™˜κ²½μ„ μž¬μ‚¬μš©ν•  수 μžˆλ‹€λŠ” 점이닀."λŸ°νƒ€μž„ ν™˜κ²½μ„ ν•œ 번 λ§Œλ“€μ–΄ νŒ¨ν‚€μ§€λ‘œ λ§Œλ“€λ©΄, 이 νŒ¨ν‚€μ§€λ₯Ό λ‹€λ₯Έ μ–΄λ–€ λ¨Έμ‹ μ—μ„œλ„ λ‹€μ‹œ μ‚¬μš©ν•  수 μžˆλ‹€. λ˜ν•œ μ—¬κΈ°μ„œ μ‹€ν–‰λ˜λŠ” λͺ¨λ“  것은 마치 가상머신과 같이 ν˜ΈμŠ€νŠΈλ‘œλΆ€ν„° κ²©λ¦¬λ˜μ–΄μžˆλ‹€. 무엇보닀도 이런 λͺ¨λ“  일듀이 λΉ λ₯΄κ³  κ°„λ‹¨νžˆ κ°€λŠ₯ν•˜λ‹€.

@kokospapa8
kokospapa8 / time measuring decorator
Created June 27, 2018 11:41
Time measure decorator for coroutine
```
from sanic.log import logger
from insanic.conf import settings
from functools import wraps
from time import time
def measure_time(f):
@wraps(f)
@kokospapa8
kokospapa8 / pyenv-virtualenv.md
Last active April 11, 2020 03:52
pyenv virtualenv setup

pyenv

assuming pyenv is already installed

install

brew install pyenv-virtualenv
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
@kokospapa8
kokospapa8 / git_cheat.md
Created April 11, 2020 12:39
Git cheatsheet

when you see

fatal: refusing to merge unrelated histories

this might help git pull --allow-unrelated-histories

@kokospapa8
kokospapa8 / Kafka cheatsheet
Last active May 5, 2020 07:44
kafka cheatsheet
Docker
- list
kafka-topics --list --bootstrap-server="PLAINTEXT://kafka0:9092"
- create
kafka-topics --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic test
-
https://kafka.apache.org/quickstart
https://www.typography.com
https://fonts.adobe.com
https://freetypography.com
from django.core.cache import cache, caches
from core.signals import update_db_on_cache_set
from django.conf import settings
DEFAULT_CACHE_ALIAS = 'default'
def _get_cache(cache_alias):
# did this because debug toolbar does not track caches when not using just cache.
# So, caches["default"] is not tracked
# -*- coding: utf-8 -*-
from django.conf import settings
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
DEFAULT_TITLE=""
DEFAULT_DESCRIPTION=""
DEFAULT_KEYWORDS=""
DEFAULT_LOGO="img/web/log.png"
# init array with size 10
arr = [0] * 10
arr = [None] * 10
# μ†Œμˆ˜μ  μ•„λž˜
print('%.5f' % num)