View T_A.py
class A(object):
def p1(self):
"""
This is P1
:return: nothing
"""
def p2(self):
"""
This is P2
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)