This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# cat /etc/init.d/test_app | |
SPAWNFCGI="/usr/bin/spawn-fcgi" | |
SPAWNAPP="/usr/local/bin/test_app/test.fcgi" | |
APPNAME="test" | |
IP="127.0.0.1" | |
PORT="9000" | |
PID="/var/run/spawn-fcgi-test.pid" | |
USER="www-data" | |
GROUP="www-data" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem Version:0.1 | |
rem ###エラーメッセージ### | |
rem ===================================================== | |
set error=ファイルが存在しないか、ファイル名・拡張子が間違っています | |
if not exist "%1" echo %error% | |
if not exist "%1" pause | |
rem ###映像・音声エンコード設定### | |
rem ===================================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########## 初期設定 ########### | |
# メモリ最大使用量 | |
SetMemoryMax(512) | |
# MultiThreads対応 | |
SetMTMode(2,0) | |
# MPEG読み込み | |
v=MPEG2Source("__vid__") | |
# WAVE読み込み |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** src/common.h Fri Jan 23 13:16:00 1970 | |
--- src/common.h Fri Jan 23 13:16:00 1970 | |
*************** | |
*** 16,21 **** | |
--- 16,22 ---- | |
#include <algorithm> | |
#include <cmath> | |
#include <sstream> | |
+ #include <iterator> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf-8 -*- | |
#!/usr/bin/env python | |
# fork: http://snippets.dzone.com/posts/show/2887 | |
# History: | |
# 0.1: first commit | |
# 0.2: add overwrite mode | |
# | |
__AUTHOR__ = 'PyYoshi' | |
__LICENCE__ = 'MIT' | |
__VERSION__ = '0.3' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf-8 -*- | |
__AUTHOR__ = 'PyYoshi' | |
__LICENCE__ = 'MIT' | |
__VERSION__ = '0.1' | |
# fork: http://www.ueblog.org/blog/entry/pythonlogging/ | |
# History: | |
# 0.1: First commit and modified... | |
# ファイルへパスなのかディレクトリへのパスなのか紛らわしいのでlogfile_pathをlogfile_dirpathに変更した。 | |
# enableがTrueかFalseで出力するか切り替えするように変更した。 | |
# start(),end()以外の出力関数の引数messageを必須に変更した。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf-8 -*- | |
class CountryCode(object): | |
Afghanistan = 'AF' | |
Albania = 'AL' | |
Algeria = 'DZ' | |
AmericanSamoa = 'AS' | |
Andorra = 'AD' | |
Angola = 'AO' | |
Anguilla = 'AI' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import logging | |
import sys | |
import os.path | |
import bz2 | |
from gensim import utils | |
from gensim.corpora import WikiCorpus, Dictionary | |
from gensim.corpora.mmcorpus import MmCorpus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
import socket | |
import socks | |
url = '' | |
_s = socket | |
s = _s.socket(socket.AF_INET, socket.SOCK_STREAM) | |
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9050) | |
socket.socket = socks.socksocket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BasicAuth{ | |
private String auth_type = "BASIC"; | |
private String login_uri = "http://www.tumblr.com/api/authenticate"; | |
private String username; | |
private String passwd; | |
BasicAuth(String email, String password){ |