Skip to content

Instantly share code, notes, and snippets.

View parkjinwoo's full-sized avatar

Park Jinwoo parkjinwoo

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>LINE TV</title>
<script type="text/javascript" src="https://www.googletagservices.com/tag/js/gpt.js"></script>
<script type="text/javascript">
window.googletag = window.googletag || {cmd: []};
googletag.defineSlot('/21635894919/NATIVE/FEED_General', 'fluid', 'ad-slot-th')
.addService(googletag.pubads());
@parkjinwoo
parkjinwoo / chosung.py
Created March 27, 2017 00:48
초성 검색 : Unicode Study
#!/usr/bin/env python
# -*- coding: utf-8 -*-
chosungs = [u'ㄱ', u'ㄲ', u'ㄴ', u'ㄷ', u'ㄸ', u'ㄹ', u'ㅁ', u'ㅂ', u'ㅃ',
u'ㅅ', u'ㅆ', u'ㅇ', u'ㅈ', u'ㅉ', u'ㅊ', u'ㅋ', u'ㅌ', u'ㅍ',
u'ㅎ']
jungsungs = [u'ㅏ', u'ㅐ', u'ㅑ', u'ㅒ', u'ㅓ', u'ㅔ', u'ㅕ', u'ㅖ', u'ㅗ',
u'ㅘ', u'ㅙ', u'ㅚ', u'ㅛ', u'ㅜ', u'ㅝ', u'ㅞ', u'ㅟ', u'ㅠ',
u'ㅡ', u'ㅢ', u'ㅣ']
jongsungs = [u'', u'ㄱ', u'ㄲ', u'ㄳ', u'ㄴ', u'ㄵ', u'ㄶ', u'ㄷ', u'ㄹ',
@parkjinwoo
parkjinwoo / offdays.py
Created December 19, 2016 07:25
offdays
#!/usr/bin/env python
import json
import datetime
import requests
def get_cal(yyyymm):
url = 'http://csearch.naver.com/content/apirender.nhn?where=nexearch&key=CalendarAnniversary'
payload = {'q': '{}월'.format(yyyymm)}
res = requests.get(url, params=payload)
@parkjinwoo
parkjinwoo / autologin.sh
Created December 19, 2016 07:24
autologin
#!/usr/bin/env bash
read -s -p 'pass: ' pass
user=username
user_file=pw
password=$(openssl enc -aes-256-cbc -in ${user_file} -a -d -salt -pass pass:${pass})
su_user=su
su_user_file=pw_su
su_password=$(openssl enc -aes-256-cbc -in ${su_user_file} -a -d -salt -pass pass:${pass})

command

  • ctrl + b + :

session

  • tmux ls
  • tmux new -s [session-name]
  • tmux a -t [session-name]
  • ctrl + b + d (detach)
  • ctrl + b + $ (rename session)
  • ctrl + d (exit)

Multi-armed Bandit

  • 변인통제: A/B Test
  • A/B Test의 문제: 장기 유지시(탐험하기) 잘 안되는 것에서 손해
  • 탐험하기(exploration)/뽑아먹기(exploitation) 딜레마
  • "Good decisions come from experience, and experience comes from bad decisions."
  • 여러 시안이 있고, 각 시안에 따라 웹 사이트의 성과에 차이가 있음
  • 가장 적은 비용으로 가장 성과가 좋은 시안을 찾고 싶다면 어떤 시안을 어떤 순서로 얼마나 많이 노출해야 할까?

A/B Testing as a MAB Algorithm

  • 정해진 기간동안은 탐험만 하기
@parkjinwoo
parkjinwoo / keybase.md
Created October 7, 2016 11:10
Keybase proof

Keybase proof

I hereby claim:

  • I am parkjinwoo on github.
  • I am parkjinwoo (https://keybase.io/parkjinwoo) on keybase.
  • I have a public key ASDa8JSwjhlcP4RrBI0DG7kabiZJXKdhll-9O7LEqYWLJwo

To claim this, I am signing this object:

# urlencode
python2 -c "import urllib, sys; print urllib.quote(sys.stdin.read())"
python3 -c "import sys; from urllib.parse import quote; print(quote(sys.stdin.read()))"
# urldecode
python2 -c "import urllib, sys; print urllib.unquote(sys.stdin.read())"
python3 -c "import sys; from urllib.parse import unquote; print(unquote(sys.stdin.read()))"
@parkjinwoo
parkjinwoo / utils.js
Last active October 23, 2015 07:51
String Utils
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory);
} else if (typeof module === 'object' && module.exports) {
module.exports = factory();
} else {
console.log('^___^;;;')
}
}(this, function () {
'use strict';