上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 55 下一页

2020年9月24日

Vue(项目配置iview的upload插件上传文件 )+ Python flask 上传文件

摘要: 前端效果展示 前端代码 1、ivew upload组件 <Upload type="drag" // 支持拖拽 multiple // 支持多文件上传 :max-size="10240000" // 设置上传最大量 :action="'https://upload.qiniup.com'" // 七 阅读全文

posted @ 2020-09-24 16:26 星河赵 阅读(1885) 评论(0) 推荐(0) 编辑

2020年8月27日

uwsgi 常见配置

摘要: uwsgi常见配置 [uwsgi] master=true chdir=/home/op/gameserver_data # 项目目录地址 virtualenv=/home/op/gameserver_data/venv/ # 虚拟环境地址 wsgi-file=goldfinger.py plugi 阅读全文

posted @ 2020-08-27 16:45 星河赵 阅读(934) 评论(0) 推荐(1) 编辑

2020年7月28日

Supervisor进程组的使用

摘要: 说明 因为后端服务一般我们会多开几个服务进程进行API接口的提供,在使用Supervisor进行进程管理的时候,会经常需要对相关进程进行管理。 所以我们可以把同一个相同的所属的进程组进行归类: 创建对应的需要包含的进程配置文件: [include] files = /etc/supervisor/c 阅读全文

posted @ 2020-07-28 18:23 星河赵 阅读(1542) 评论(0) 推荐(0) 编辑

2020年7月22日

Python 多线程、多进程、协成的使用

摘要: 写在前面将列表分割供多进程、多线程使用 def list_fund(listTemp, n): """ 将列表平均分成N块 :param listTemp: :param n: :return: """ resules = [] for i in range(0, len(listTemp), n) 阅读全文

posted @ 2020-07-22 13:49 星河赵 阅读(329) 评论(0) 推荐(0) 编辑

2020年7月1日

mongo 常用查询方法 pymongo mongoengine

摘要: 1.mongoengine 查询返回指定列(指定字段) scalar from models import UserDayStat, UserDetails userdaystat = UserDayStat.objects(date="2020-06-30", day_age=0).scalar( 阅读全文

posted @ 2020-07-01 16:58 星河赵 阅读(1340) 评论(0) 推荐(0) 编辑

2020年6月4日

ssh-pass 使用无需输入密码

摘要: 在Linux后台中,经常会用到ssh、scp等命令。需要进行认证,手动输入密码,是交互式的过程。当将ssh、scp等命令做成自动化脚本时,可能需要非交互式的登录过程,此时可以用sshpass。 安装方式 1.在基于 RedHat/CentOS 的系统中,首先需要启用 EPEL 仓库并使用 yum 命 阅读全文

posted @ 2020-06-04 18:06 星河赵 阅读(976) 评论(0) 推荐(0) 编辑

curl 发送post请求

摘要: 1. curl 发送post请求 curl http://127.0.2.1:5353/user/get_macro_data -X POST -d '{"num": "7"}' --header "Content-Type: application/json" 2.curl 发送post请求 js 阅读全文

posted @ 2020-06-04 14:04 星河赵 阅读(2637) 评论(0) 推荐(0) 编辑

2020年5月18日

python实现socketserver处理多连接 相关逻辑

摘要: 1.收发字符串处理 # 接收字符处理 b转str # json_str = str(self.data, encoding="utf8") json_str = self.data.decode("utf-8") # 发送字符处理 str转b data.encode() 阅读全文

posted @ 2020-05-18 15:01 星河赵 阅读(477) 评论(0) 推荐(0) 编辑

2020年4月30日

使用supervisor 进行进程管理时调整最大文件打开数

摘要: [supervisord] logfile=/tmp/supervisord.log ; 日志文件,默认是 $CWD/supervisord.log logfile_maxbytes=50MB ; 日志文件大小,超出会 rotate,默认 50MB logfile_backups=10 ; 日志文件 阅读全文

posted @ 2020-04-30 11:30 星河赵 阅读(808) 评论(0) 推荐(0) 编辑

2020年4月27日

python str与bytes之间的转换

摘要: # bytes object b = b"example" # str object s = "example" # str to bytes bytes(s, encoding = "utf8") # bytes to str str(b, encoding = "utf-8") # an alt 阅读全文

posted @ 2020-04-27 19:01 星河赵 阅读(1578) 评论(0) 推荐(0) 编辑

上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 55 下一页

导航