正则表达式中,group()用来提出分组截获的字符串,()用来分组 例如: 1 import re 2 a = "123abc456" 3 print re.search( "([0-9]*)([a-z]*)([0-9]*)" ,a).group( 0 ) #123abc456,返回整体 4 pri ...
分类:
编程语言 时间:
2021-06-15 17:51:42
阅读次数:
0
from turtle import * def square(size=50, rbg='blue'): pencolor(rbg) for i in range(4): fd(size) left(90) setup(800,600) speed(0) for i in range(10): s ...
分类:
其他好文 时间:
2021-06-15 17:36:49
阅读次数:
0
from matplotlib import pyplot as mp import tensorflow as tf from tensorflow import keras from tensorflow.keras import datasets ,layers ,optimizers def ...
分类:
其他好文 时间:
2021-06-15 17:35:48
阅读次数:
0
def encode(matched, priors, variances): """Encode the variances from the priorbox layers into the ground truth boxes we have matched (based on jaccard ...
分类:
其他好文 时间:
2021-06-15 17:35:17
阅读次数:
0
一、改变原始数组的方法: 1、pop() 删除 arrayObject 的最后一个元素,把数组长度减 1,并且返回它删除的元素的值。如果数组已经为空,则 pop() 不 改变数组,并返回 undefined 值。arrayObject.pop() 。 2、push() push() 方法可把它的参数 ...
分类:
编程语言 时间:
2021-06-13 10:56:48
阅读次数:
0
import redisr = redis.Redis(host="0.0.3.40",password="123123&*",port=6379,db=4,decode_responses=True)#字符 string k-v#哈希 hash#字符串 string k-v {"name":111 ...
分类:
编程语言 时间:
2021-06-13 10:56:05
阅读次数:
0
1 分组求TopN 一、先看数据: 使用HiveSQL常用的方式为: Select * from table, row_number() over(partition by item order by score desc) rank where rank<=2; 二、输出结果为: 三、解析:row ...
分类:
数据库 时间:
2021-06-13 10:48:09
阅读次数:
0
CBV 基于类的视图 FBV 基于函数的视图 CBV: 1 项目目录下: 2 urlpatterns = [ 3 path('login1/',views.Login.as_view()) #.as_view()固定格式,自 4 ] 5 #.as_view()固定格式,自匹配类中的下面的方法(须自定 ...
分类:
其他好文 时间:
2021-06-13 10:43:11
阅读次数:
0
Java流程控制 用户交互Scanner package com.zhang.scanner; import java.util.Scanner; public class Demo01 { public static void main(String[] args) { //创建一个扫描器对象,接 ...
分类:
其他好文 时间:
2021-06-13 10:37:55
阅读次数:
0
为某些原因,需要读取d.lib后缀的文件, os.listdir() 语法:os.listdir(path) 函数用途:输出路径下所有文件的文件名 import os path = "E:/vs_code/qtVideo/lib" datanames = os.listdir(path) for i ...
分类:
编程语言 时间:
2021-06-13 10:37:18
阅读次数:
0