中文翻译:梁山 英文原文:Adam Wiggins
如今,软件通常会作为一种服务来交付,它们被称为网络应用程序,或“软件即服务”(SaaS)。“十二要素应用程序”(12-Factor App)为构建如下的SaaS应用提供了方法论:
- 使用标准化流程自动配置,从而使新的开发者花费最少的学习成本加入这个项目;
- 和操作系统之间尽可能的划清界限,在各个系统中提供最大的可移植性;
- 适合部署在现代的云计算平台,从而在服务器和系统管理方面节省资源;
| # -*- coding: gbk -*- | |
| __author__ = 'harmy' | |
| import glob | |
| def main(): | |
| guild_master = {} | |
| guild_member_count = {} | |
| with open("update_guild.sql", "w+") as f: | |
| #插入tbl_guild_member表 | |
| for txt_file in glob.glob("*.txt"): |
| import os, shutil, glob | |
| [os.mkdir(file[:-4]) for file in glob.glob("*.tga")] | |
| [shutil.move(file, file[:-4]) for file in glob.glob("*.tga")] |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import os | |
| import sys | |
| import zipfile | |
| print "Processing File " + sys.argv[1] | |
| file=zipfile.ZipFile(sys.argv[1],"r"); |
| while datetime.today() <= "2012-12-21": | |
| work_hard() | |
| play_hard() | |
| sleep() | |
| if(life is not None): | |
| print "hello world!" |
| #encoding=gbk | |
| import datetime | |
| __author__ = 'harmy' | |
| import os, sys, shutil, csv, shelve, multiprocessing | |
| from multiprocessing import Process | |
| if len(sys.argv) != 4: | |
| print "用法: hequ.py 老区1数据路径 老区2数据路径 新区区id" | |
| exit(1) | |
| import os, shutil, glob | |
| for file in glob.glob("*.jpg"): | |
| print "processing %s..." % file | |
| try: | |
| shutil.rmtree(file[:-4]) | |
| except: | |
| pass | |
| os.mkdir(file[:-4]) | |
| os.system("convert.exe -crop 512x512 -quality 75%% -scene 1 %s %s\%%d.jpg" % (file, file[:-4])) |
| # CC-BY-NC-3.0 | |
| import json | |
| from twisted.protocols.basic import LineReceiver | |
| from twisted.internet import defer | |
| class Request(object): | |
| def __init__(self, protocol, method): | |
| self.protocol = protocol | |
| self.method = method |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdbool.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> | |
| #include <netdb.h> | |
| #include <jansson.h> |
| #!/bin/sh | |
| ### | |
| ### Settings | |
| ### | |
| ZMQ_VERSION="zeromq-2.2.0" | |
| MONGREL2_VERSION="mongrel2-1.7.5" | |
| PREV_DIR=$PWD | |
| SRC_DIR=$HOME/src |
中文翻译:梁山 英文原文:Adam Wiggins
如今,软件通常会作为一种服务来交付,它们被称为网络应用程序,或“软件即服务”(SaaS)。“十二要素应用程序”(12-Factor App)为构建如下的SaaS应用提供了方法论: