- 博客(7)
- 收藏
- 关注
原创 python 下载远程图片并生成缩略图
[code="python"] #coding=utf-8 from PIL import Image import os import os.path import StringIO import re import datetime import urllib def thumbnail(filename, size=(50, 50), output_filename=Non...
2014-06-25 14:33:07 376
原创 thrift --
[code="c"] shared.thrift --------------- ** * This Thrift file can be included by other Thrift files that want to share * these definitions. */ namespace cpp shared namespace java shared n...
2014-06-19 12:38:36 103
原创 set list dict tuple
字典(dict) dict 用 {} 包围 dict.keys(),dict.values(),dict.items() hash(obj)返回obj的哈希值,如果返回表示可以作为dict的key del 或 dict.pop可以删除一个item,clear清除所有的内容 sorted(dict)可以吧dict排序 dict.get()可以查找没存在的key,dict.[]不...
2014-06-18 11:39:16 74
原创 mongo 地理信息查询 空间坐标
$maxDistance距离单位默认为米: 1. 邻域查询($near) >db.xqpoint.find({"geom.coordinates":{$near:[122,52]}}) 上述查询语句查询点[122,52]附近的点,MongoDB默认返回附近的100个点,并按距离排序。你也可以用limit()指定返回的结果数量,如:>db.xqpoint.find({"g...
2014-06-12 18:59:44 372
原创 flask nginx.conf
[code="xml"] user nobody nobody; worker_processes 2; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; ev...
2014-06-09 16:18:20 182
原创 php nginx ci 部署nginx.conf
[code="xml"] user root; worker_processes 8; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; pid logs/nginx.pid; events { ...
2014-06-09 16:16:02 115
原创 thrift-0.9.0安装 zhuan
thrift-0.9.0安装 博客分类: scribe http://wiki.apache.org/thrift/ThriftInstallation Basic requirements A relatively POSIX-compliant *NIX system Cygwin or MinGW can be used on Windows g++ 3.3...
2014-06-09 16:05:13 156
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人