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
% npm install ethercalc | |
npm http GET https://registry.npmjs.org/ethercalc | |
npm http 200 https://registry.npmjs.org/ethercalc | |
npm http GET https://registry.npmjs.org/ethercalc/-/ethercalc-0.20120408.192847.tgz | |
npm http 200 https://registry.npmjs.org/ethercalc/-/ethercalc-0.20120408.192847.tgz | |
npm http GET https://registry.npmjs.org/zappa | |
npm http GET https://registry.npmjs.org/redis | |
npm http GET https://registry.npmjs.org/uuid-pure | |
npm http GET https://registry.npmjs.org/node-uuid | |
npm http GET https://registry.npmjs.org/express |
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/python | |
import gtk, sys | |
def tohex(c): | |
#Convert to hex string | |
#little hack to fix bug | |
s = ['#',hex(int(c[0]*256))[2:].zfill(2),hex(int(c[1]*256))[2:].zfill(2),hex(int(c[2]*256))[2:].zfill(2)] | |
for item in enumerate(s): | |
if item[1]=='100': | |
s[item[0]]='ff' | |
print s |
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
% curl -I wiki.python.org.tw | |
HTTP/1.0 200 OK | |
Server: nginx/1.1.19 | |
Date: Wed, 29 Aug 2012 01:42:17 GMT | |
Content-Type: text/html; charset=utf-8 | |
Vary: Cookie, User-Agent | |
X-Cache: MISS from cuisinart.iis.sinica.edu.tw | |
X-Cache-Lookup: MISS from cuisinart.iis.sinica.edu.tw:80 | |
Via: 1.0 cuisinart.iis.sinica.edu.tw:80 (squid/2.6.STABLE21) | |
Connection: close |
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
% curl -I wiki.python.org.tw | |
HTTP/1.0 200 OK | |
Server: nginx/1.1.19 | |
Date: Wed, 29 Aug 2012 01:42:17 GMT | |
Content-Type: text/html; charset=utf-8 | |
Vary: Cookie, User-Agent | |
X-Cache: MISS from cuisinart.iis.sinica.edu.tw | |
X-Cache-Lookup: MISS from cuisinart.iis.sinica.edu.tw:80 | |
Via: 1.0 cuisinart.iis.sinica.edu.tw:80 (squid/2.6.STABLE21) | |
Connection: close |
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
% ruby sub_update.rb | |
# output after ruby publisher.rb | |
Update form: UPDATE 89, routing key is data.update | |
% ruby sub_logger.rb | |
# output after ruby publisher.rb | |
Log: UPDATE 89, routing key is data.update | |
Log: CREATE 90, routing key is data.create | |
% ruby publisher.rb |
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
Successfully installed askbot django-followit unidecode oauth2 python-openid pystache django-celery django-robots | |
django-keyedcache django html5lib django-kombu django-countries pytz Jinja2 akismet Lamson markdown2 | |
django-recaptcha-works Coffin South django-threaded-multihost httplib2 django-picklefield celery | |
chardet mock nose python-daemon python-dateutil anyjson kombu pyparsing lockfile amqpli |
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
from tempfile import NamedTemporaryFile | |
def tempfile_path(): | |
with NamedTemporaryFile(delete=False) as f: | |
return f.name | |
def main(): | |
print tempfile_path() | |
if __name__ == '__main__': |
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
class Out(object): | |
o = 2 | |
class In(object): | |
i = 1 | |
def main(): | |
o = Out() | |
print o.In.i | |
# 1 |
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
# encoding: utf8 | |
# Kanban of Python Taiwan in Early November | |
# Python Quest #2 | |
dates = ['1 year, 10 months, 15 days', | |
'2 years, 1 month, 15 days', | |
'1 month, 15 days', | |
'1 yesr', | |
'2 months', | |
'15 days', |
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
from deployment.cuisine import * | |
from fabric.api import * | |
from fabric.context_managers import * | |
from fabric.utils import puts | |
from fabric.colors import red, green | |
import simplejson | |
import os |
OlderNewer