View generate_ghost_station.js
// http://m.podty.me/pod/MU993
copy($("li[data-src]")
.map((idx,e)=>[[$(e).find("p").text(),$(e).attr("data-src")]])
.map((idx,e)=>`wget -O "${e[0]}.mp3" ${e[1]}`).toArray().join("\n"))
View mac_cp949_utf8.py
from glob import glob
for filename in glob("[!utf8_]*"):
with open(filename, encoding="cp949") as fr, \
open("utf8_" + filename, encoding="utf-8", mode="w") as fw:
fw.writelines(fr.readlines())
View naver.key.user.js
// ==UserScript==
// @name Naver Webtoon 잉여
// @version 0.1
// @description 네이버웹툰 잉여
// @author kimdwkimdw@gmail.com
// @match http://comic.naver.com/webtoon/detail.nhn*
// @source https://gist.github.com/kimdwkimdw/a24321570711861b0d16bcf38e06cf3e
// @downloadURL https://gist.github.com/kimdwkimdw/a24321570711861b0d16bcf38e06cf3e/raw/9d57b5e450abe2ed100a630da9f725a52b841283/naver.key.user.js
// ==/UserScript==
View robert.sh
# available in iTerm2 >= 3.0.0
curl -sL http://bit.ly/robert_park | imgcat
View learn_crawl.py
'''
how to crawl data?
'''
base_url = "https://www.sw.or.kr/intro/i_imm_list.jsp?searchType=&searchKeyword=&page=1&pageSize=2000&areaDvsn=&funcClsf=&bsnsType=&indtClsf="
import urllib2
from HTMLParser import HTMLParser
parser = HTMLParser()
import codecs
View CalculatingPR.java
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Scanner;
View base.js
function getArticleAfterArticle(article_id)
{
var EndArticle = false;
$.ajax({
url: "/more",
dataType: 'JSON',
data: {
last_article_id : article_id
},
View guide.md
View cv2_test.py
import numpy as np # http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
import cv2 # http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml')
img = cv2.imread('people.jpg')
emoji = cv2.imread('small_emoji.png')
faces = face_cascade.detectMultiScale(gray, 1.3, 5)
View mbti_population.py
# coding: utf-8
# https://groups.google.com/d/topic/jaylang/ziJKc6DhZNU/discussion
# population: http://books.google.co.kr/books?id=p_lo1_tL_YIC&lpg=PA147&ots=mfTqm8Sl_a&pg=PA147#v=onepage&q&f=false
# couple: http://www.google.com/url?q=http%3A%2F%2Fmindwatching.kr%2Fentry%2F%25EB%258B%25B9%25EC%258B%25A0%25EC%259D%2598-%25EC%2597%25B0%25EC%2595%25A0%25EA%25B0%2580-%25EC%2598%25A4%25EB%259E%2598%25EA%25B0%2580%25EC%25A7%2580-%25EB%25AA%25BB%25ED%2595%2598%25EB%258A%2594-%25EC%259D%25B4%25EC%259C%25A0-1&sa=D&sntz=1&usg=AFQjCNHlNOMK_BajlBKXFhTxF7KoLVN2aA
ratio = [11.6,13.8,1.5,2.1,5.4,8.8,4.4,3.3,4.3,8.5,8.1,3.2,8.7,12.3,2.5,1.8]
type = ['ISTJ','ISFJ','INFJ','INTJ','ISTP','ISFP','INFP','INTP','ESTP','ESFP','ENFP','ENTP','ESTJ','ESFJ','ENFJ','ENTJ']
probs = [ (r1*r2/(100**2),
len([type[i1][i] for i in range(4)