Skip to content

Instantly share code, notes, and snippets.

View kimdwkimdw's full-sized avatar
🏃‍♂️
Running & Learning

Arthur Kim kimdwkimdw

🏃‍♂️
Running & Learning
View GitHub Profile
@kimdwkimdw
kimdwkimdw / me2day_appkey_create.js
Last active August 29, 2015 13:59
me2day appkey create
/* part 1*/
var a = document.createElement("script"); a.src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"; document.body.appendChild(a);
for (var i = 6;i<=100;i++) {
setTimeout((function(ii) {
return function() {
$.ajax({
url:"http://me2day.net/api/front/appkey/create",
type:"POST",
data: {
title:"KAIST_C"+ii,

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@kimdwkimdw
kimdwkimdw / authors.txt
Last active August 29, 2015 14:01
Cover the radar
5 은하
6 Hyemin Ahn
8 Andrew Magill
10 은하
14 은하
15 syseo
34 FTA
35 은하
46 FTA
49 은하
@kimdwkimdw
kimdwkimdw / mbti_population.py
Last active August 29, 2015 14:01
MBTI population
# 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)
@kimdwkimdw
kimdwkimdw / cv2_test.py
Last active August 29, 2015 14:02
OpenCV2_test
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)
@kimdwkimdw
kimdwkimdw / base.js
Last active August 29, 2015 14:05 — forked from SsonHJ/base.js
function getArticleAfterArticle(article_id)
{
var EndArticle = false;
$.ajax({
url: "/more",
dataType: 'JSON',
data: {
last_article_id : article_id
},
@kimdwkimdw
kimdwkimdw / gzip.js
Created March 7, 2011 12:51 — forked from kig/gzip.js
TarGZ = function(){};
// Load and parse archive, calls onload after loading all files.
TarGZ.load = function(url, onload, onstream, onerror) {
var o = new TarGZ();
o.onload = onload;
o.onerror = onerror;
o.onstream = onstream;
o.load(url);
return o;
@kimdwkimdw
kimdwkimdw / gist:1593822
Created January 11, 2012 09:06
Get Longest Word From List
# available above python 2.6
from multiprocessing import Pool
def extractMaxLen( l ):
assert(len(l)>0)
elem,elemLen = l[0],len(l[0])
for idx in xrange(1, len(l)):
if len(l[idx]) > elemLen:
elem,elemLen = l[idx],len(l[idx])
@kimdwkimdw
kimdwkimdw / gist:1882555
Created February 22, 2012 06:54
Get Top 10 Favorite Photographer in Raysoda
// http://www.raysoda.com/Com/Photo/List.aspx?f=D&s=RD&d=120217
a = document.createElement('script')
a.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"
document.body.appendChild(a);
Global = [];
function tryParse( num ) {
if (num == 0 ) return;
$.ajax('http://www.raysoda.com/App/Office/List/D.aspx?s=CD&pg='+num)
.success(function(d) {
@kimdwkimdw
kimdwkimdw / gist:2017134
Created March 11, 2012 17:04
Auto "Poke Back" in Facebook
/*Try this on console in the "m.facebook.com/pokes" during you logged in*/
P=location.protocol;
a = document.createElement('script')
a.src=P+"//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"
document.body.appendChild(a);
(function ME() {
var jQuery=jQuery || undefined;
if(jQuery) {
setInterval(function () {
$.ajax(P+'//m.facebook.com/pokes').success(function(d){