ICode9

精准搜索请尝试: 精确搜索
  • 批量重置密码2022-09-14 12:00:55

    #导入各种包 from selenium import webdriver#浏览器 from selenium.webdriver.common.by import By#选择器 from selenium.webdriver.support import expected_conditions as EC#等待条件 from selenium.webdriver.support.wait import WebDriverWait#等待 from selenium.webdri

  • Python中strftime() 函数的21个参数详细讲解2022-09-14 09:05:53

    在python中使用datetime()函数可以创建当前日期;那如何来切割日期,接下来strftime() 函数的全部参数整理如下。 一、我们先创建一个当前日期,然后再来切割 import datetimex = datetime.datetime.now()print(x) datetime.datetime.now().strftime('%@') @=参数 二、整理strftime() 函

  • PythonUnit2实例2022-09-13 23:33:51

    实验 1  项目名称:  python语言基础                                 实例一: height=1.70 print("您的身高:"+str(height)) weight=48.5 print("您的体重:"+str(weight)) bmi=weight/(height*height) print("您的BIM指数为:"+str(bmi)) #判断身

  • 282022-09-13 23:03:34

    1 #include <iostream> 2 #include <string> 3 using namespace std; 4 template<class T,class Pred> 5 void MyForeach(T *p,T *q,Pred op){ 6 while(p != q){ 7 op(*p); 8 ++ p; 9 } 10 } 11 void Print(string s) 12

  • 编程2022-09-13 23:00:59

    height = 1.70 print("您的身高: " + str(height)) weight = 48.5 print("您的体重: " + str(weight)) bmi=weight/(height*height) print("您的BMI指数为:"+str(bmi)) # 判断身材是否合理 if bmi<18.5: print("您的体重过轻 ~@_@~") if bmi>=18.5 and

  • Linux 运维需要掌握的 17 个实用命令2022-09-13 21:30:43

    1、查找当前目录下所有以.tar结尾的文件然后移动到指定目录:find . -name “*.tar” -exec mv {}./backup/ ;注解:find –name 主要用于查找某个文件名字,-exec 、xargs可以用来承接前面的结果,然后将要执行的动作,一般跟find在一起用的很多,find使用我们可以延伸-mtime查找修改时间、-t

  • Python第二章2022-09-13 21:01:16

    例题一: 实验目的:根据身高、体重计算BMI指数 实验过程: height = 1.70print("您的身高:"+str(height))weight = 48.5print("您的体重:"+str(weight))bmi=weight/(height*height)print("您的BMI指数为:"+str(bmi))if bmi<18.5: print("您的体重过轻⊙﹏⊙")if bmi>=18.5

  • python 进制转化2022-09-13 19:34:10

    计算机中底层所有的数据都是以 010101的形式存在(图片、文本、视频等)。 十转二,八,十六进制 v1 = bin(25) # 十进制转换为二进制print(v1) # "0b11001" v2 = oct(23) # 十进制转换为八进制print(v2) # "0o27" v3 = hex(28) # 十进制转换为十六进制print(v3) # "0x1c"   二,八,十六

  • go 接口interface2022-09-13 17:31:33

    接口interface go 中以关键字interface代表接口 interface 可以用于多态, 还可以接受任意数据类型, 类似void 用例:   package main import ( "fmt" ) func main() { var q, w, e interface{} // 空接口 n2 := []string{"haha", "xixi"} q = n2 fmt.Printf("this

  • APP性能测试——热启动耗时测试2022-09-13 15:30:37

    热启动耗时:     即当启动应用时,后台已有该应用的进程(我们模拟按下HOME键),打开软件,直到进入到首页activity页面,并计算耗时。 示例代码: import os import time def hotTime(device, pg_name, pga_name): """ :param device: :param pg_name: :param pga_name:

  • python控制键盘鼠标库pynput基本操作2022-09-13 14:30:08

    pynput库 对于每一种输入设备,它包含一个子包来控制该种设备 包含控制和监控鼠标或触摸板的类 pynput.mouse 包含控制和监控键盘的类 pynput.keyboard: 鼠标模块 鼠标基本操作 导入pynput控制鼠标的模块 from pynput import mouse 获取鼠标的操控对象 control = mouse.Controll

  • 代码运算2022-09-13 12:30:09

    word1 = {'yi':'一','er':'二','san':'三'} print(word1)        Dictionary = {'key1':'value1','key2':'value2','keyn':'valuen'}    wor

  • Python 时间模块:datetime和time获取当前时间的方法,获取前一日时间方法2022-09-13 12:03:09

    获取昨日时间: datetime.date.today() + datetime.timedelta(-1) (datetime.datetime.now() + relativedelta(days = -1)).strftime("%d") 多加(减)一分钟 (datetime.datetime.now()+datetime.timedelta(minutes=1)).strftime("%Y-%m-%d %H:%M:%S") 2022-03-23 1

  • python线性回归2022-09-13 09:32:38

    import numpy as npimport pandas as pdfrom sklearn.datasets import load_bostonimport statsmodels.formula.api as smffilename = r"D:\RUI\MathModeling\2021B乙醇\装料方式1数据.xlsx"data = pd.read_excel(filename)print(data)print(data.columns)mod = smf.ols

  • NumPy科学计算库学习_008_NumPy数组的花式索引和索引技巧2022-09-13 04:30:42

    一、1维NumPy数组 1、创建1维NumPy数组 arr = np.array([0,10,3,8,24,5,18,2,99,66]) print("【arr】\n",arr) 【arr】 [ 0 10 3 8 24 5 18 2 99 66] 2、从1维NumPy数组中挑选元素索引、并赋值给新的对象 将arr2内的元素修改不会影响到arr本身哦 arr2 = arr[[0,0,0,2,3,-

  • python 抽象类+抽象方法实现接口(interface) ----有机会用用2022-09-13 03:00:40

    https://zhuanlan.zhihu.com/p/508700685   import abc #利用abc模块实现抽象类 class shuiguo(metaclass=abc.ABCMeta): all_type='sg' @abc.abstractmethod #定义抽象方法,无需实现功能 def name(self): pass @abc.abstractmethod #定义抽象方

  • Java将子类对象赋值给父类对象2022-09-13 00:00:09

    Java将子类对象赋值给父类对象 public class Supclass{ public void print(){    System.out.println("父类print()方法");    } } public class Subclass extends Supclass{ public void print(){    System.out.println("子类print()方法");    }   

  • Python02代码2022-09-12 23:30:21

    实例1 height = 1.65 print("你的身高:"+str(height)) weight = 45.5 print("你的体重:"+str(weight)) bmi=weight/(height*height) print("你的BMI指数为:"+str(bmi)) #判断身材是否合理 if bmi<18.5:     print("你的体重过轻 ~@_@~") if bmi>=18.5 and bm

  • Python 异常处理2022-09-12 21:03:38

    1.异常处理信息 在 Python 中,把程序运行时产生错误的情况叫做异常。 1.1 基础简单回顾 异常类型: ''' 常见异常。 ''' AssertionError # 断言语句失败(assert 后的条件为假) NotImplementedError # 方法未实现,作为抽象的方法,不被重写则有异常; AttributeError # 访问

  • 30道四则运算java2022-09-12 19:34:58

    package test4; import java.util.Scanner;import java.util.Random;public class Test4 { public static void dayin(int n6) {Random r = new Random(); int i3= r.nextInt(10); if(i3%4==0) { System.out.print("+"); } if(i3%4==1) { System.out.p

  • 爬虫042022-09-12 19:33:09

    python中的re模块 findall import re # findall: 匹配字符串中所有符合正则的内容 前面pattern是正则表达式 后面string是字符串 lst = re.findall(r"\d+", "花花的电话是125486,春卷的电话是885234") # r放前面是防止转义 print(lst) # ['125486', '885234'] finditer # find

  • Python socket通信2022-09-12 18:33:52

    sever: import socket #导入socket模块 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) host = '127.0.0.1' #设置本地主机 port = 20000 #设置端口 sock.bind((host,port)) #绑定端口 sock.listen(6) #

  • 动手实现深度学习(5):计算图的实现2022-09-12 18:32:07

      第三篇:基于计算图的神经网络的设计与实现 传送门: https://www.cnblogs.com/greentomlee/p/12314064.html github: Leezhen2014: https://github.com/Leezhen2014/python_deep_learning   在第二篇中介绍了用数值微分的形式计算神经网络的梯度,数值微分的形式比较简单也容易实

  • 四则运算问题 Java2022-09-12 16:30:08

    1 package helloword1; 2 3 import java.util.Random; 4 import java.util.Scanner; 5 public class Test { 6 public static void main(String[] args) { 7 zuoYe(); 8 } 9 10 public static void shuZi() { 11 Random ra

  • python 函数参数引用之传值/传址和copy/deepcopy2022-09-12 14:34:08

    精简版: 传值:被调函数局部变量改变不会影响主调函数局部变量 传址:被调函数局部变量改变会影响主调函数局部变量 Python参数传递方式:传递对象引用(传值和传址的混合方式),如果是数字,字符串,元组则传值;如果是列表,字典则传址; copy使用场景:列表或字典,且内部元素为数字,字符串或元组 deepc

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有