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 / guide.md
Last active July 25, 2017 14:11
Python 2.x Encoding cheatsheet
@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 / learn_crawl.py
Last active September 21, 2018 03:12
Learn crawling
'''
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
@kimdwkimdw
kimdwkimdw / naver.key.user.js
Last active September 6, 2021 08:16
네이버 웹툰 키보드 방향키 사용하기
// ==UserScript==
// @name Naver Webtoon 잉여
// @version 0.3
// @description 네이버웹툰 잉여
// @author [email protected]
// @match https://comic.naver.com/webtoon/detail*
// @source https://gist.github.com/kimdwkimdw/a24321570711861b0d16bcf38e06cf3e
// @downloadURL https://gist.github.com/kimdwkimdw/a24321570711861b0d16bcf38e06cf3e/raw/9d57b5e450abe2ed100a630da9f725a52b841283/naver.key.user.js
// ==/UserScript==
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())
// 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"))
@kimdwkimdw
kimdwkimdw / T_A.py
Created May 5, 2018 10:50
PoC for a bug in `PyTorch 0.4.0` related to IDE(eq. PyCharm)
class A(object):
def p1(self):
"""
This is P1
:return: nothing
"""
def p2(self):
"""
This is P2
@kimdwkimdw
kimdwkimdw / numba_vectorize.py
Created March 12, 2019 13:10
Numba with right way
import timeit
statements = \
"""
import numpy as np
from numba import vectorize
def python_f(x,y):
if x > y:
@kimdwkimdw
kimdwkimdw / Mixamo.js
Created September 18, 2019 06:21 — forked from gnuton/Mixamo.js
Script which downloads all mixamo animations for one character.
// Mixamo Animation downloadeer
// The following script make use of mixamo2 API to download all anims for a single character that you choose.
// The animations are saved with descriptive long names instead of the short ones used by default by mixamo UI.
//
// This script has been written by [email protected] and the author is not responsible of its usage
//
// How to use this script
// 1. Browse mixamo.com
// 2. Log in
// 3. Open JS console (F12 on chrome)
const r = 3;
const comb = [-1, -0.5, 0, 0.5, 1];
let final_combinations = [];
( ( (f) => f(f) )
( (f) => (r, v) => {
if (r) for (let c in comb) { v.push(comb[c]); f(f)(r-1, v); v.pop(); }
else final_combinations.push(v.slice());
}