subtitle
django 缓存redis 使用 django 缓存redis 使用
对于一些计算量比较大值,可能希望缓存在内存里边。。。 先安装 #sudo aptitude install redis-server #pip install django-redis django的setting.py里面 """
2016-12-25
给mysql的查询结果添加一个字段 给mysql的查询结果添加一个字段
给数据库的查询结果,想添加一个日期字段,可以在python转换,但是需要再次遍历查询的结果…有字段日期,然后,想看到2018-01-01还有多少天 mysql> select str_to_date("2018-01-01", "%Y
2016-12-22
python excel表格日期读取 python excel表格日期读取
有时候,cvs转换excel,或者excel转换csv的时候,时区日期的格式就容易出现问题了 python openpyxl读取表格时候,日期处理 def getdate(x, tz=None): """ convert
2016-12-20
supervisor celery redis配置使用 supervisor celery redis配置使用
记录个supervisor的使用配置文件 使用supervisord 部署监控,挂掉后自动重启 #pip install supervisor #echo_supervisord_conf > supervisord.con
2016-12-15
关于redis安全 关于redis安全
使用redis的时候,不注意,很容易就被人拿到shell啊。。。 redis,刚开始在线上运用的时候,就会有好多问题没有注意到。很容易,给漏出问题。让人有机会搞到shell。 xxx@debian:~/bash$ redis-cli -h
2016-12-10
python pip 版本配套安装 python pip 版本配套安装
有些库要版本对应安装才有效果啊 之前安装celery 与redis的时候,总是出现版本不对应的情况 额额,原来pip还可以版本指定搭配安装 pip install “celery[librabbitmq,redis,msgpack]” 如
2016-11-24
go的实现类似python的yield go的实现类似python的yield
go的实现类似python的yield python的yield, In [13]: def fib(): ...: a, b = 0, 1 ...: while True: ...:
2016-11-15
django使用flat与不使用的区别 django使用flat与不使用的区别
django使用flat与不使用flat的区别 In [14]: ProductCategory.objects.filter(product_id__in=list(product_category_list)).values_list
2016-10-29
python selenium phantomjs python selenium phantomjs
python 使用selenium 不打开浏览器 python 使用selenium打开浏览器,如果在没有按照桌面的linux里面,貌似就无法使用了?还好有phantomjs python selenium phantomjs 打开 def
2016-10-23
4 / 6