1 2 3 4 5 ··· 9 下一页
摘要: 颜色对照表: <?xml version="1.0" encoding="utf-8"?> <resources> <color name="purple_200">#FFBB86FC</color> <color name="purple_500">#FF6200EE</color> <color 阅读全文
posted @ 2022-02-26 22:06 JunCode 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 方法一 HTML标签 markdown是支持html语言的,可以使用img标签插入图片。 但是使用这种方法时每次插入图片都要修改,比较麻烦。可以通过更改CSS样式的方法来更改插入图片的默认位置。 方法二 CSS样式 修改markdown编辑器的主题,在css文件中添加以下样式 p .md-image 阅读全文
posted @ 2021-12-20 10:23 JunCode 阅读(1123) 评论(0) 推荐(0) 编辑
摘要: Pandas DataFrame 是一个表格,我们可以对DataFrame的列数据或者行数据进行筛选 选取 DataFrame 的列 选取单列 column = df["column_name"] column = df.loc[:,"column_name"] column = df.loc[:, 阅读全文
posted @ 2021-08-17 11:01 JunCode 阅读(765) 评论(0) 推荐(0) 编辑
摘要: 参考:https://www.cnblogs.com/traditional/p/12422934.html 使用 yield yield 返回的是一个迭代器,所以要用列表推导式将所有元素提取到列表中去。 def flatten(l: list)-> iter: """将列表扁平化""" for _ 阅读全文
posted @ 2021-08-17 10:25 JunCode 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 使用 curl 进行post 请求,在json数据中添加变量 参数 -X :定义请求方式 -H:添加请求头 -d: 添加请求的数据 添加json的请求数据 方法一: curl -X POST -H "Content-Type: application/json" -d '{"field":"data 阅读全文
posted @ 2021-06-04 14:11 JunCode 阅读(2379) 评论(0) 推荐(0) 编辑
摘要: 安装 flask-cors pip install flask-cors 设置允许跨域 开启全局允许跨域 示例 from flask_cors import CORS CORS(app, supports_credentials=True) CORS 的参数 参数 类型 Head字段 说明 默认 r 阅读全文
posted @ 2021-04-28 14:04 JunCode 阅读(4511) 评论(0) 推荐(0) 编辑
摘要: 将pandas 数据转换为 dict 这里将pandas 的dataframe 转化为 dict 使用的是 to_dict() 方法 这里放一部分源码: def to_dict(self, orient="dict", into=dict): Convert the DataFrame to a d 阅读全文
posted @ 2021-04-22 16:29 JunCode 阅读(1081) 评论(0) 推荐(0) 编辑
摘要: mongo shell 操作 aggregate 使用mongo db 的 aggregate 进行聚合操作,改操作传入的参数是一个数组 aggregate 操作的参数 match 相当于 mysql 的 where,传入的是筛选条件 示例: {$match : { 'os': 'win' } } 阅读全文
posted @ 2021-04-12 13:40 JunCode 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 获取GET请求参数 from Flask import request args = request.args 获取POST请求参数 获取 form 表单数据 from Flask import request args = request.form 将 form 表单的数据转为字典 args = 阅读全文
posted @ 2021-04-08 17:32 JunCode 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 所有默认的生命周期函数 • applicationWillFinishLaunching • applicationDilFinishLaunching • applicationWillBecomeActive • applicationDidBecomeActive • applicationW 阅读全文
posted @ 2020-11-26 12:10 JunCode 阅读(280) 评论(0) 推荐(0) 编辑
1 2 3 4 5 ··· 9 下一页