Skip to content

Instantly share code, notes, and snippets.

View bigfang's full-sized avatar
🔥
🌵🐙🐳🍒🍉🎮

bigfang bigfang

🔥
🌵🐙🐳🍒🍉🎮
View GitHub Profile
@bigfang
bigfang / dumbdb.py
Created November 13, 2012 05:01
数据库insert和update操作封装,可以改进的地方有:减少连接次数,DB和Store合体,简化update...
from functools import partial
import MySQLdb
ip = '192.168.1.42'
class DB(object):
@bigfang
bigfang / 50音
Created December 4, 2012 05:36
日语50音图
あ ア a い イ i う ウ u え エ e お オ o
か カ ka き キ ki く ク ku け ケ ke こ コ ko
さ サ sa し シ shi す ス su せ セ se そ ソ so
た タ ta ち チ chi つ ツ tsu て テ te と ト to
な ナ na に ニ ni ぬ ヌ nu ね ネ ne の ノ no
は ハ ha ひ ヒ hi ふ フ fu へ ヘ he ほ ホ ho
ま マ ma み ミ mi む ム mu め メ me も モ mo
や ヤ ya い イ i ゆ ユ yu え エ e よ ヨ yo
ら ラ ra り リ ri る ル ru れ レ re ろ ロ ro
わ わ wa い イ i う ウ u え エ e を オ o
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700);
html {
color:#000;
background:#FFF;
}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td {
margin:0;
padding:0;
@bigfang
bigfang / dumblog.py
Created February 21, 2017 05:02
dumb logger
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import logging
from logging.handlers import RotatingFileHandler
from datetime import datetime
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bigfang
bigfang / locind.ipynb
Last active January 30, 2018 07:14
论坛用户的地区和行业分布情况
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bigfang
bigfang / pivotheat.ipynb
Last active January 31, 2018 05:30
透视表与热力图
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bigfang
bigfang / corr.ipynb
Last active February 19, 2018 14:03
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bigfang
bigfang / swagger-json-to-html.py
Created January 25, 2019 09:48
swagger json to html
#!/usr/bin/python
"""
Usage:
python swagger-json-to-html.py < /path/to/api.json > doc.html
curl http://localhost:5000/spec-json | python swagger-json-to-html.py > doc.html
"""
import json, sys
@bigfang
bigfang / autocopy.user.js
Last active April 13, 2020 14:43
user script :: autocopy
// ==UserScript==
// @name autocopy
// @namespace https://bigfang.github.io
// @description Auto copy selected text
// @match *://*/*
// @run-at document-end
// @grant GM_setClipboard
// ==/UserScript==
if (typeof GM_setClipboard != 'function') alert('Your UserScript client has no GM_setClipboard support');