command
cat access_log |cut -d " " -f4|sort |uniq -c |sort -n -r
PS: cut -d " " -f4 equals to awk -F " " '{print $4}'
command
cat access_log |cut -d " " -f4|sort |uniq -c |sort -n -r
PS: cut -d " " -f4 equals to awk -F " " '{print $4}'
https://www.keakon.net/2012/12/03/Tornado%E4%BD%BF%E7%94%A8%E7%BB%8F%E9%AA%8C
jinja渲染模版时,参数中的非ASCII内容必须是unicode类型
所以以下写法均会抛出UnicodeDecodeError
template.render(name="校长")template.render(re={"name": "校长"})
- jinja模版中,字符串字面量如
{{ }},local变量等中显示给出字符串数据可以是str或unicode,即{{ "校长" }}和{{ u"校长" }}都是正确的,{% set a, b = '校长', u'校长' %}- 传给jinja模版中的python变量中的字符串数据必须是unicode,这些变量包括global变量、context变量和filters函数返回的值
Docker搭建开发环境
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| from flask import request, url_for | |
| from flask.ext.api import FlaskAPI, status, exceptions | |
| app = FlaskAPI(__name__) | |
| notes = { |