# -*- coding: utf-8 -*-# @Time: # @Auther: kongweixin# @File:# 元组(Tuple)(不可变的列表)# 含义元组是有序且不可更改的集合。在 Python 中,元组是用圆括号编写的。# 创建元组:# thistuple = ("apple", ...
分类:
其他好文 时间:
2020-06-23 21:42:00
阅读次数:
70
# -*- coding: utf-8 -*-"""语言版本:python:3.6.1scrapy:1.3.3功能:本蜘蛛主要演示如何爬取多个页面作者:cuanboy出处:http://www.scrapyd.cn (scrapy中文网)时间:2017年12月16日15:55:00运行:CMD模式进 ...
分类:
其他好文 时间:
2020-06-23 12:55:24
阅读次数:
48
# -*- coding: utf-8 -*- from multiprocessing import cpu_count bind = ["127.0.0.1:9000"] # 线上环境不会开启在公网 IP 下,一般使用内网 IP daemon = True # 是否开启守护进程模式 pidfil ...
分类:
其他好文 时间:
2020-06-23 01:23:38
阅读次数:
75
虽然有很多其它静态网站生成器和代码托管平台,但 Hugo + Coding 的优势明显。Hugo 构建速度最快,主题多;Coding 国内访问速度快,Coding 平台更先进好用。 ...
分类:
其他好文 时间:
2020-06-23 01:23:20
阅读次数:
139
1、获取URL对应的资源 get、head 2、实例 try: url = 'https://www.baidu.com/s?' kv = {'wd': 'python'} hd = {'user-agent': 'Chrome/10'} r = requests.get(url, params=k ...
分类:
其他好文 时间:
2020-06-22 18:52:51
阅读次数:
59
问题:利用递归方法求5!。 #! /usr/bin/env python3 # -*- coding:utf-8 -*- # Author : Ma Yi # Blog : http://www.cnblogs.com/mayi0312/ # Date : 2020-06-22 # Name : d ...
分类:
编程语言 时间:
2020-06-22 15:34:04
阅读次数:
49
原文链接:https://www.cnblogs.com/imyalost/p/9296705.html 在利用单元测试框架执行测试用例的过程中,有时只需要执行一部分用例,或者跳过某些暂不需要执行的用例,python的unittest框架就内置这样的功能。 1、unittest.skip()方法 跳 ...
分类:
其他好文 时间:
2020-06-22 15:06:55
阅读次数:
46
# -*- coding:utf-8 -*- __author__ = 'admin' name1 = input("Please your father name:") name2 = input("请输入您母亲的姓名:") #使用逗号分隔,打印各部份有空格 print("您父亲的名字:", na ...
分类:
编程语言 时间:
2020-06-22 15:04:39
阅读次数:
64
需求:一篇文章,出现了哪些词?哪些词出现得最多? 英文文本词频统计 英文文本:Hamlet 分析词频 统计英文词频分为两步: 文本去噪及归一化 使用字典表达词频 代码: #CalHamletV1.py def getText(): txt = open("hamlet.txt", "r").read ...
分类:
编程语言 时间:
2020-06-22 13:22:11
阅读次数:
66
说明:继续zabbix4.0的数据抽取展示测试。对python不熟练,所以先参考网友脚本,抽取zabbix数据,生成excel表格。脚本如下:#/usr/bin/envpython#-*-coding:utf-8-*-importMySQLdbimportxlsxwriterimporttimehost_list=[‘192.168.164.131‘,‘192.168.164.132‘]defsq
分类:
其他好文 时间:
2020-06-22 09:17:35
阅读次数:
52