JWT认证 官网:https://github.com/jpadilla/django-rest-framework-jwt 在用户注册或登录后,我们想记录用户的登录状态,或者为用户创建身份认证的凭证。我们不再使用Session认证机制,而使用Json Web Token(本质就是token)认证机 ...
分类:
其他好文 时间:
2021-04-24 13:24:49
阅读次数:
0
读取图片使用函数cv2.imread(filepath,flags)读入一副图片filepath:要读入图片的完整路径flags:读入图片的标志cv2.IMREAD_COLOR:默认参数,读入一副彩色图片,忽略alpha通道cv2.IMREAD_GRAYSCALE:读入灰度图片cv2.IMREAD_ ...
分类:
编程语言 时间:
2021-04-24 13:21:35
阅读次数:
0
文章目录python脚本调用shell命令os.system()os.popen()subprocess.call()subprocess.Popen()commandspython脚本传参数给shell命令python脚本获取命令行用户输入参数python传参数给shell命令python传参数给 ...
分类:
编程语言 时间:
2021-04-24 13:19:00
阅读次数:
0
定义组件名的方式有两种: 1.使用 kebab-case(短横线分隔命名) 当使用 kebab-case (短横线分隔命名) 定义一个组件时,你也必须在引用这个自定义元素时使用 kebab-case,例如 <my-component-name>。 2.使用 PascalCase (首字母大写命名) ...
分类:
其他好文 时间:
2021-04-24 11:57:32
阅读次数:
0
最常用的get、post方法 1.get请求方法 带请求参数: import requests ''' URL Parameters 请求方式: URL参数 例如: 以get 方式请求http://httpbin.org/get?first_name=hello&last_name=word ''' ...
分类:
编程语言 时间:
2021-04-24 11:56:41
阅读次数:
0
1.算术运算符 2.比较运算符 3.赋值运算符 4.位运算符 & 按位与运算符:参与运算的两个值,如果两个相应位都为1,则该位的结果为1,否则为0 | 按位或运算符:只要对应的二个二进位有一个为1时,结果位就为1 ^ 按位异或运算符:当两对应的二进位相异时,结果为1 ~ 按位取反运算符:对数据的每个 ...
分类:
编程语言 时间:
2021-04-24 11:49:24
阅读次数:
0
tarjan 模板 int low[N],dfn[N],Stack[N],belong[N]; //最小下表,时间戳,一个用数组模拟的栈 //belong[x]表示x所属的强连通分量的编号 int idx,top;//,动态时间戳,栈顶 int scc; //scc表示强连通分量的个数 bool i ...
分类:
其他好文 时间:
2021-04-23 12:23:00
阅读次数:
0
运算符 - 算数运算符 + - * # 加减乘 / # 小数商 // # 整数商 % # 余数 ** # 幂运算(5 ** 3 --> 5 * 5 * 5) 运算符 - 增强运算符 # 在算数运算符基础上,增加了为自身赋值的功能 += -= *= /= //= %= **= # data1 += 5 ...
分类:
编程语言 时间:
2021-04-23 12:22:46
阅读次数:
0
一、字符串的表示和存储 字符串是字符的序列,每个字符都有有一个数字作为标识,同时会有一个将标识转换为存储字节的编码方案; s = 'hello world python' for c in s: print(c, end=' ') h e l l o w o r l d p y t h o n AC ...
分类:
编程语言 时间:
2021-04-23 12:20:35
阅读次数:
0
一、讲解 二、代码 import tensorflow as tf from tensorflow.python.keras import datasets, layers, optimizers, Sequential, metrics from tensorflow.python import ...
分类:
其他好文 时间:
2021-04-23 12:19:22
阅读次数:
0