上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页
摘要: 1 python简单发送get请求 2 python简单发送post请求(json) 如下,发送图片网络地址请求AI人工智能服务器提供相似图片集返回的请求 阅读全文
posted @ 2018-05-28 16:33 Adamanter 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 1 nginx反向代理 正向代理浏览器,反向代理web服务器 假设阿里云服务器地址:demo.adamant.com dns解析 默认80端口,ip地址xxx.xx.xxx.xxx server { listen 80; server_name localhost; client_max_body_ 阅读全文
posted @ 2018-05-28 11:45 Adamanter 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 1 GET get请求,flask:user_name = request.args.get('user_name') 2 POST 携带一般数据data 3 POST 携带json数据 4 POST <!--?xml version="1.0" encoding="UTF-8"?--> 传cook 阅读全文
posted @ 2018-05-26 17:34 Adamanter 阅读(5853) 评论(0) 推荐(0) 编辑
摘要: 1 渲染模板 阅读全文
posted @ 2018-05-26 17:24 Adamanter 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 1 datetime 2 简单封装以及获取毫秒级别时间差和微秒级别时间差 阅读全文
posted @ 2018-05-26 17:22 Adamanter 阅读(21128) 评论(0) 推荐(0) 编辑
摘要: 1 nginx+flask 这个用于服务器代码直接测试用,程序停启频繁,flask run就可以 2 nginx + uwsgi + flask 这个用于服务器生产环境,不轻易停止启动,要用uwsgi 启动 3 nginx + uwsgi + flask +API网关:kong 当web服务器上需要 阅读全文
posted @ 2018-05-26 17:09 Adamanter 阅读(498) 评论(0) 推荐(0) 编辑
摘要: markdown语法,临时记录,复制修改 阅读全文
posted @ 2018-05-26 16:37 Adamanter 阅读(736) 评论(0) 推荐(0) 编辑
摘要: 1 安装 pip install Flask-PyMongo chapip list | grep pymongo 2 集成进入flask框架 app中配置: 'MONGO_URI': 'mongodb://localhost:27017/sydc', 'MONGO_USERNAME': 'root 阅读全文
posted @ 2018-05-26 16:33 Adamanter 阅读(601) 评论(0) 推荐(0) 编辑
摘要: 1 安装和启动 安装:apt-get install mongodb 启动:sudo mongod 可视化工具robomogo:https://robomongo.org/download 2 创建数据库管理员和给数据库设置用户名和密码 创建mongodb数据库管理员 > use adminswit 阅读全文
posted @ 2018-05-26 16:22 Adamanter 阅读(119) 评论(0) 推荐(0) 编辑
摘要: (1)查看阿里云服务器环境 ssh root@47.92.xxx.7 你自己的阿里云IP地址 uname -a Linux adamanter 4.4.0-105-generic #128-Ubuntu SMP Thu Dec 14 12:42:11 UTC 2017 x86_64 x86_64 x 阅读全文
posted @ 2018-05-26 14:39 Adamanter 阅读(336) 评论(0) 推荐(0) 编辑
摘要: (1)在提交之前,你本地代码先backup!!! (2)github先建仓库 去https://github.com登录账户去创建仓库helloworld(你代码工程名字),你本地的文件比如helloworld里面的文件会进入这个文件夹里面 生成仓库地址比如:https://github.com/s 阅读全文
posted @ 2018-05-26 13:31 Adamanter 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 一:保证flask程序是OK的,hello world 也OK 二:配置uwsgi文件 以/data/www/syapi项目为例 /data/www/syapi/sy_uwsgi.ini uwsgi 配置参数 注意我的socket叫做syapi.sock [uwsgi]socket = /tmp/s 阅读全文
posted @ 2018-05-17 21:00 Adamanter 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 通过WebRequest创建一个请求后,你可以通过请求来获取HttpWebResponse。通过HttpWebResponse.StatusCode来判断当前错误,也可以得到一些精确的消息。代码详细列表: 成员名称 说明 Continue 等效于 HTTP 状态 100。Continue 指示客户端 阅读全文
posted @ 2018-05-05 16:38 Adamanter 阅读(361) 评论(0) 推荐(0) 编辑
摘要: (1)sqlalchemy.exc.DataError DataError: (pymysql.err.DataError) (1406, u"Data too long for column 'img_url' at row 1") [SQL: u'INSERT INTO classificati 阅读全文
posted @ 2018-05-03 23:22 Adamanter 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 案例表: 1 # coding=utf-8 2 from flask_sqlalchemy import SQLAlchemy 3 4 db = SQLAlchemy() 5 6 7 tags_class = db.Table('tags_classifications', 8 db.Column( 阅读全文
posted @ 2018-05-03 23:18 Adamanter 阅读(1321) 评论(0) 推荐(0) 编辑
摘要: class Article(db.Model): __tablename__ = "article" id =db.Column(db.Integer,primary_key=True, autoincrement=True) title = db.Column(db.String(100), nu 阅读全文
posted @ 2018-05-03 23:01 Adamanter 阅读(232) 评论(0) 推荐(0) 编辑
摘要: Here: redis install for mac https://www.cnblogs.com/feijl/p/6879929.html 阅读全文
posted @ 2018-04-28 10:14 Adamanter 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 第一步生成公私钥: 生成公钥:ssh-keygen(一路回车) 默认在/root/.ssh下有两个文件id_rsaid_rsa.pub查看公钥:cat /root/.ssh/id_rsa.pub 第二步公钥交给技术部运维邮箱,私钥自己保存在电脑里 itsupport@ncic.ac.cn;opsde 阅读全文
posted @ 2018-03-08 15:29 Adamanter 阅读(1279) 评论(0) 推荐(0) 编辑
摘要: 异常名称描述 BaseException 所有异常的基类 SystemExit 解释器请求退出 KeyboardInterrupt 用户中断执行(通常是输入^C) Exception 常规错误的基类 StopIteration 迭代器没有更多的值 GeneratorExit 生成器(generator)发生异常来通知退出 SystemExit Python 解... 阅读全文
posted @ 2018-02-06 09:35 Adamanter 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 仓库地址: git@gitlab.xxxxx.com:root/xxx.git 准备工作 打开/etc/hosts在末尾另起一行,添加一行下的边内容保存,退出(可以复制粘贴)命令vim /etc/hosts 添加内容10.18.95.7 gitlab.xxxxx.com生成公钥:ssh-keygen 阅读全文
posted @ 2018-01-29 20:23 Adamanter 阅读(146) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页