This file contains hidden or 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/python | |
# encoding:utf8 | |
# vlshow.py | |
# Copyright (C) 2006 Joachim Breitner | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# |
This file contains hidden or 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 -*- | |
# 抓大盤日成交量 | |
# By Toomore | |
from datetime import datetime, timedelta | |
import urllib2, logging, csv, re | |
class ggm(object): | |
def __init__(self,year,savef): |
This file contains hidden or 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 -*- | |
# 抓取最近上市或是上櫃公司資料 | |
# By Toomore | |
class iiqy(object): | |
def __init__(self, t, page): | |
''' | |
t: |
This file contains hidden or 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 | |
import datetime | |
import time | |
end = datetime.datetime(2010,11,6,11,30) | |
while 1: | |
time.sleep(0.8) | |
print '\r\n' * 30 |
This file contains hidden or 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 -*- | |
from datetime import datetime | |
from datetime import timedelta | |
intime = datetime(2011,02,15) # 入伍時間 | |
outtime = datetime(2012,01,16) # 退伍時間 | |
def cd(d): | |
''' 倒數天數 ''' |
This file contains hidden or 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 -*- | |
try: | |
import gtk, pygtk, os, os.path, pynotify | |
pygtk.require('2.0') | |
except: | |
print "Error: need python-notify, python-gtk2 and gtk" | |
from datetime import datetime |
This file contains hidden or 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 requests | |
text = u'這是一封測試簡訊 This a test SMS.' | |
endpoint = 'https://rest.nexmo.com/sms/json' | |
data = { | |
'username': '{yours}', | |
'password': '{yours}', |
This file contains hidden or 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
2012/12/15 | |
修正 上傳檔案名稱 | |
2012/12/08 | |
修正 同步上傳作品到 Facebook 相簿 | |
2012/11/30 | |
新增 建立 攝影活動 服務 | |
2012/11/11 |
This file contains hidden or 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
from pymongo import Connection | |
from pymongo.master_slave_connection import MasterSlaveConnection | |
Master = Connection() | |
Slaves = [Connection('127.0.0.1', 27018), Connection('127.0.0.1', 27019)] | |
db = MasterSlaveConnection(Master, Slaves).YOUR_dbs | |
print db.collection_names() |
This file contains hidden or 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 requests | |
import re | |
import sys | |
if __name__ == '__main__': | |
''' How to use. | |
python ./plurkbot.py {username} {password} {saysomething} | |
''' |
OlderNewer