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
# 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 year', | |
'2 months', |
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
import cuisine | |
from fabric.api import roles, sudo | |
apt_updated = None | |
def apt_update(force=False): | |
global apt_updated | |
if force or not apt_updated: | |
state = sudo('apt-get update -q') | |
apt_updated = True |
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 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 |
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
# 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 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
class Out(object): | |
o = 2 | |
class In(object): | |
i = 1 | |
def main(): | |
o = Out() | |
print o.In.i | |
# 1 |
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 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 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
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 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
% 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 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
% 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 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
% 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 |