自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(23)
  • 收藏
  • 关注

转载 python 统计字符串每个单词出现的次数

方法一:sentence = "I can because i think i can"result = {word: sentence.split().count(word) for word in set(sentence.split())}print(result)方法二:def count(str): count_words = str....

2019-09-18 18:52:00 3133

转载 抓取b站今日热门

一、抓取标题和视频地址并下载二、思路  1.打开目标地址:http://vc.bilibili.com/p/eden/rank#/?tab=%E5%85%A8%E9%83%A8  2.按f12  3.点network查找相应url如图  4.开始写代码:import requestsimport json,timeheaders = {...

2019-09-15 16:10:00 262

转载 python 使用selenium爬取拉钩网

一、爬去方式   用一般的爬取方式会发现得不到任何信息,所以我们选择selenium来爬取数据二、下面为源码from selenium import webdriverfrom selenium.webdriver.support.wait import WebDriverWaitfrom selenium.webdriver.support import expecte...

2019-09-11 14:40:00 268

转载 python爬去糗事百科

一、本文目标  1.用requests+BeautifulSoup抓取糗事百科的文字内容;  2.抓取昵称,性别,年龄,发表内容,点赞数,评论数;  2.将抓取的内容写入txt。二、实现过程  1.获取网页源代码def get_html(url): #用requests库得到网页源代码 html = requests.get(url).text ...

2019-09-09 20:21:00 173

转载 正则表达式

一、匹配规则符号解释示例说明.匹配任意字符b.t可以匹配bat / but / b#t / b1t等\w匹配字母/数字/下划线b\wt可以匹配bat / b1t / b_t等但不能匹配b#t\s匹配空白字符(包括\r、\n、\t等)love\syou可以匹配love you\d...

2019-09-08 09:19:00 192

转载 Python运算符

一、运算符 以下为python运算符运算符描述[][:]下标,切片**指数~+-按位取反, 正负号*/%//乘,除,模,整除+-加,减>><<右移,左移&按位与^|按位异或,按位或...

2019-09-07 11:29:00 184

转载 python 破解58字体反爬

1、选择网址58同城2、按F12查看元素3、将鼠标指到数字上发现如下所示数字显示乱码4、发现乱码前的class标签和旁边style的标签一样我搜索一下fangchan-secret发现有很长的字符串前面有base64,断定这是base64加密,然后解密这段字符串就能实现反爬代码如下:1、获取整个页面 def get_h...

2019-05-01 21:29:00 212

转载 ubuntu下的git版本创建

一、git的特点二、gei的安装和配置1、安装命令如下sudo apt-get install git2、安装成功后输入git3、创建版本库git init4、使用先创建一个txt文件gedit code.txtgit add code.txtgit commit -m '版本1'...

2019-04-15 20:30:00 419

转载 python 模拟百度搜索

1 import urllib.request 2 def Url(url): 3 flag = input("请输入要搜索的关键字:") 4 headers_ = { 5 "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, lik...

2018-10-21 21:07:00 493

转载 遍历文件下的所以东西

代码:import os //导入os模块def Getfilename(Path,kg = "")://path为路径 kg为控制格式 flielist = os.listdir(Path) //得到当前目录下的文件或目录 kg += " "//控制格式 for filename in flielist: //循环得到的文件 ...

2018-09-11 20:51:00 131

转载 Python os模块

获取操作系统类型:print(os.name) //nt为win print(os.uname) //获取操作系统详细信息获取操作系统的环境变量:print(os.environ)//获取操作系统的所有环境变量print(os.environ.get("APPDATA")) //获取操作系统的指定环境变量获取当前目录:print(os.curd...

2018-09-10 20:32:00 122

转载 顺序栈的进栈,出栈

1 #include<stdio.h> 2 #include<stdlib.h> 3 #define MAX 100 4 5 typedef struct 6 { 7 char c[MAX]; 8 int top; 9 }*seqstack;10 11 void InitStack(seqstack...

2017-11-10 20:45:00 242

转载 单链表的逆置

1 #include<stdio.h> 2 #include<stdlib.h> 3 4 typedef struct Node 5 { 6 char a; 7 struct Node *next; 8 }Node,*list; 9 10 void q(list L);11 void p(list L...

2017-10-28 16:43:00 95

转载 单循环列表的合并

1 #include<stdio.h> 2 #include<stdlib.h> 3 4 typedef struct Node 5 { 6 char a; 7 struct Node *next; 8 }Node,*list; 9 10 void p(list L);11 list m(list A...

2017-10-24 20:39:00 176

转载 单循环列表

1 #include<stdio.h> 2 #include<stdlib.h> 3 typedef struct Node 4 { 5 char a; 6 struct Node *next; 7 }Node,*list; 8 9 void p(list L);10 int main()11 {...

2017-10-23 20:51:00 325

转载 汉诺塔

1 #include<stdio.h> 2 void move(int n,char a,char b,char c) 3 { 4 if(n==1) 5 printf("\t%c->%c\n",a,c); //当n只有1个的时候直接从a移动到c 6 else 7 { 8 mo...

2017-10-22 19:28:00 90

转载 用头插法合并单链表

1 #include<stdio.h> 2 #include<stdlib.h> 3 typedef struct Node 4 { 5 int a; 6 struct Node *next; 7 }Node,*list; 8 void j(list L);//头插法 9 list hb(list LA,lis...

2017-10-19 14:05:00 553

转载 单链表的操作

1 #include<stdio.h> 2 #include<stdlib.h> 3 typedef struct Node 4 { 5 char a; 6 struct Node *next; 7 }Node,*list; 8 void tcf(list L);//头插法 9 Node *g...

2017-10-18 21:45:00 95

转载 单链表查找第i个节点

1 #include<stdio.h> 2 #include<string.h> 3 #include<stdlib.h> 4 typedef struct Node 5 { 6 char a; 7 struct Node* next; 8 }Node,*list; 9 void p(list L)...

2017-10-16 20:28:00 4010

转载 创建单链表并输出

#include<stdio.h>#include<stdlib.h>#include<string.h>typedef struct Note{ char a; struct Note* next;} Note,*list;avoid CF(list L){ Note *s; c...

2017-10-13 19:28:00 255

转载 合并两个顺序表

1 #include<stdio.h> 2 #define MAX 100 3 typedef struct 4 { 5 int e[MAX]; 6 int last; 7 }list; 8 void hb(list *A,list *B,list *C) 9 {10 int i=0,j=0,t=0;11 ...

2017-10-13 13:53:00 212

转载 十进制转换二进制

#include <stdio.h> void t(int x) { int a[30]; int i=0,rem; while(x!=0) { rem=x%2; x=x/2; a[i]=rem; i++; ...

2017-10-13 13:48:00 108

转载 顺序表的查找,插入,删除

#include<stdio.h>#include<string.h>#define MAX 100typedef struct { int e[MAX]; int last;}list;int w(list L,int c)//查找{ int i=0; while((i<=L.last)&&(L.e[i]!=c)) i++; if(i&l...

2017-10-12 20:02:00 191

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除