# coding=utf-8import osn = 0for root, dir, files in os.walk('.'): for name in files: if ("final" not in name): n+=1 print(n,name) os.remove(os.path.jo ...
分类:
其他好文 时间:
2021-03-15 11:04:56
阅读次数:
0
python\小脚本\selenium_base_file.py # -*- coding: utf-8 -*- """ Created on Wed Feb 28 19:40:07 2018 @author: zhoujunqing """ # -*- coding: utf-8 -*- """ ...
分类:
其他好文 时间:
2021-03-15 11:02:11
阅读次数:
0
shuffle算法-洗牌算法 算法的作用 打乱顺序 算法的实现 等概率的抽取数组中的每一个数,跟最后一个元素交换 // 使用闭包,防止变量污染 (function() { function shuffle() { // 调用形式: arr.shuffle(); 这里的this指向Array实例 le ...
分类:
编程语言 时间:
2021-03-10 13:22:24
阅读次数:
0
给你一个长度为 n 的链表,每个节点包含一个额外增加的随机指针 random ,该指针可以指向链表中的任何节点或空节点。 构造这个链表的 深拷贝。 深拷贝应该正好由 n 个 全新 节点组成,其中每个新节点的值都设为其对应的原节点的值。新节点的 next 指针和 random 指针也都应指向复制链表中 ...
分类:
其他好文 时间:
2021-03-10 13:19:43
阅读次数:
0
package zuoye; import java.util.Random; import java.util.Scanner; public class MoraGame { public static void main(String[] args) { int humanNum = 0; i ...
分类:
编程语言 时间:
2021-03-09 12:57:12
阅读次数:
0
记一个代理获取方法 语言:Python 库:requests、lxml、time、random 代理网站:https://www.kuaidaili.com/free/ 思路:通过访问链接来获取代理并且进行代理测试有效后写入txt保存 步骤: 1.查看页面的翻页地址发现相同规律后可做翻页请求 2.每 ...
分类:
其他好文 时间:
2021-03-05 13:02:42
阅读次数:
0
数据创建 randint 创建随机整数array。 np.random.randint(10,size=(2,3)) randint(low, high=None, size=None, dtype='l') low为必选参数: 若有low与high,则返回两者之间的数据。[low, high)。 ...
分类:
其他好文 时间:
2021-03-03 12:17:41
阅读次数:
0
问题 请实现 copyRandomList 函数,复制一个复杂链表。在复杂链表中,每个节点除了有一个 next 指针指向下一个节点,还有一个 random 指针指向链表中的任意节点或者 null。 // Definition for a Node. class Node { public: int ...
分类:
其他好文 时间:
2021-03-01 13:48:04
阅读次数:
0
# -*- coding: UTF-8 -*- import os import imghdr def get_filelist(dir): for home, dirs, files in os.walk(dir): for filename in files: try: fullname = o ...
分类:
编程语言 时间:
2021-02-26 13:35:43
阅读次数:
0
简易版HyperLogLog Python代码: import math import random import uuid import hashlib from bisect import bisect_right HLL_ALPHA_INF = 0.721347520444481703680 ...
分类:
其他好文 时间:
2021-02-25 12:14:18
阅读次数:
0