Skip to content

Instantly share code, notes, and snippets.

View dreampuf's full-sized avatar

Dreampuf dreampuf

View GitHub Profile
@dreampuf
dreampuf / buyvm.net.py
Created December 12, 2012 06:47
Interval tool for check buyvm.net activate Instance send email to inform your by email
#!/usr/bin/env python
#vi: encoding=utf-8
""" Interval tool for check buyvm.net activate Instance send email to inform your by email
http://huangx.in
"""
import time
import json
import urllib2
@dreampuf
dreampuf / gist:4328605
Last active December 9, 2015 21:08
Funny JD 

诚邀顶级的java程序猿参加一项颠覆性的事业,这不是忽悠。

能力要求如下:
1、全国性大赛的获奖者(条件可以放宽)。
2、两年以上开发经验。

参与项目:
领先的无代码开发平台的完善。

回报:

@dreampuf
dreampuf / image_format.py
Created December 25, 2012 10:35
图片转透明圆图
#!/usr/bin/env python
#vi: encoding=utf-8
"""
Image Convert
"""
__author__ = "dreampuf<soddyque@gmail.com>"
from glob import iglob
@dreampuf
dreampuf / merge_subtitle.py
Last active September 2, 2017 07:16
Convert the Youtube captions to SRT file Usage : python merge_subtitle.py ~/Downloads/timedtext.xml ~/Downloads/timedtext_en.xml > ~/Downloads/James-Coplien---The-DCI-Architecture--Supporting-the-Agile-Agenda-\(hd-8235574\).Mix.srt
#!/usr/bin/env python
# -*- conding:utf-8 -*-
__author__ = "Dreampuf<soddyque@gmail.com>"
""" Convert the Youtube captions to SRT file
feature :
this script could able to merge some Youtube captions to one STR (like chinse, english mix SRT file)
@dreampuf
dreampuf / V2exRelaTopNWord.py
Created April 21, 2013 02:58
a collection of high-frequency words the v2ex subject matter
#!/usr/bin/env python
# coding: utf-8
__author__ = "soddyque@gmail.com"
import tempfile
import cPickle as pickle
from collections import Counter
from xgoogle.search import GoogleSearch
@dreampuf
dreampuf / Chinese Stop Words
Created May 9, 2013 15:30
Chinese Stop Words
,
?
@dreampuf
dreampuf / myreader.py
Created June 30, 2013 18:47
Backup my google reader records. Usage: ``` $ pip install libgreader python-daemon pony $ python myreader.py ``` Your data will save to `myreader.sqlite` file.
#!/usr/bin/env python
#vim: encoding=utf-8
"""
Backup my google reader records.
Usage:
$ pip install libgreader python-daemon pony
$ python myreader.py
@dreampuf
dreampuf / make_plda_data.py
Created July 1, 2013 06:11
make the data suit PLDA+
#!/usr/bin/env python
#vi: fileencoding=utf-8
__twitter__ = "dreampuf"
"""
Make the text data suit PLDA+
This script usage:
$ python make_data.py ../sgyy.utf-8.txt > data.txt
@dreampuf
dreampuf / graphit.sh
Created July 31, 2013 10:51
Creating requests per time graph from nginx or apache access log.
#!/bin/bash
# Origianl version : http://www.keepthingssimple.net/2012/10/creating-requests-per-time-graph-from-nginx-or-apache-access-log/
# This version is a port to Mac OSX
# dreampuf (http://huangx.in)
# useage :
# graphit.sh logfile.log
# open result-2013-06-04.png
@dreampuf
dreampuf / sh.py
Created September 18, 2013 07:10
Integrate sh into fabric. Let fabric invoke more suitable.
#vi: fileencoding=utf-8
import os
import sys
import warnings
from functools import partial
from types import ModuleType
from fabric.operations import run, sudo, local