代码改变世界

python requests json/data/params 参数的区别

2020-11-20 16:02 by ZealouSnesS, 195 阅读, 0 推荐, 收藏, 编辑
摘要:To answer my own question, it appears my two examples above do the same thing and that using the json parameter does indeed set the content-type in th 阅读全文

将docker命令输出打印出来

2020-11-09 10:09 by ZealouSnesS, 1006 阅读, 0 推荐, 收藏, 编辑
摘要:RUN echo $(ls -1 /tmp/dir) 阅读全文

prometheus 告警 gpu 卡的ecc错误

2020-07-31 17:24 by ZealouSnesS, 922 阅读, 0 推荐, 收藏, 编辑
摘要:prometheus有两个指标可以告警gpu卡的错误# HELP dcgm_ecc_dbe_volatile_total Total number of double-bit volatile ECC errors. 双位易失性ECC错误的总数 # TYPE dcgm_ecc_dbe_volatil 阅读全文

prometheus及gpu,k8s

2020-07-31 17:23 by ZealouSnesS, 1416 阅读, 0 推荐, 收藏, 编辑
摘要:prometheus及gpu,k8s 原文地址:https://www.cnblogs.com/g2thend/p/11515560.html 作者:osc_5yejhemb 时间:2019/09/12 23:09 标签:linuxdragonflyfreebsd ##一,物理节点安装配置(简单配置 阅读全文

django restframework 的 AuthenticationFailed 返回 401 还是返回 403 的问题

2020-07-13 16:47 by ZealouSnesS, 2544 阅读, 0 推荐, 收藏, 编辑
摘要:一般来说我们认为 AuthenticationFailed 就应该返回 401,然后前端根据 401 的status code来让用户重新登录。 但是如果你使用 django rest framework的话,会有一个坑: https://www.django-rest-framework.org/ 阅读全文

python 参数表,可变参数,用 json/dict 作为函数参数传入

2020-05-07 16:24 by ZealouSnesS, 1013 阅读, 0 推荐, 收藏, 编辑
摘要:import mysql.connector db_conf = { user='xx', password='yy', host='xxx.xxx.xxx.xxx', database='zz' } cnx = mysql.connector.connect( user=db_conf['user 阅读全文

sql 修改查询结果的值给接下来的查询用,但是不更改数据库中的值

2020-04-16 13:00 by ZealouSnesS, 1336 阅读, 0 推荐, 收藏, 编辑
摘要:参考: https://blog.csdn.net/qq_30815327/article/details/79714551 https://blog.csdn.net/jiwenyi163/article/details/2794038 两种方法 方案一 case when SELECT * FR 阅读全文

使用chrome全网页或部分网页截图

2020-04-15 14:24 by ZealouSnesS, 482 阅读, 0 推荐, 收藏, 编辑
摘要:1. 打开想截图的网页 2. F12或者 右键inspect 打开开发者工具 3. 在开发者工具中按下快捷键 ctrl + shift + P,打开开发者工具命令搜索框 4. 在搜索框中输入screen,弹出的几个选项就是截图,其中有全网页截图,当前屏截图,以及网页元素截图等。网页元素截图功能非常好 阅读全文

一个sql语句中用多个where

2020-04-10 10:21 by ZealouSnesS, 3425 阅读, 0 推荐, 收藏, 编辑
摘要:select SUM(case when total < 60 then 1 else 0 end) as 'studentMarks1', sum(case when total > 80 then 1 else 0 end) as 'studentMarks2' from School wher 阅读全文

sql 使用with as 语句报 “Only `SELECT` statements are allowed against this database”错误

2020-04-09 19:04 by ZealouSnesS, 1896 阅读, 0 推荐, 收藏, 编辑
摘要:with as 语句又叫CTE,公用表表达式,可以将一个sql语句的结果用一个 变量名来表示,方便后续多次引用。可以用来高性能地简化嵌套sql 参考:https://www.cnblogs.com/fygh/archive/2012/04/25/2160266.html 在使用CTE时应注意如下几点 阅读全文
上一页 1 2 3 4 5 6 7 ··· 36 下一页