自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(33)
  • 收藏
  • 关注

转载 爬虫实践-爬取简书网7日热门信息

jianshuwangremen.py:from lxml import etreeimport requestsimport pymongoimport reimport jsonfrom multiprocessing import Pool# 连接数据库client = pymongo.MongoClient('localhost', 27017)mydb = client['...

2017-12-12 18:33:00 205

转载 爬虫实践-爬取简书网用户动态信息

jianshuwanguser.py:import requestsfrom lxml import etreeimport pymongoclient = pymongo.MongoClient('localhost', 27017)mydb = client['mydb']timeline = mydb['timeline']def get_time_info(url, pa...

2017-12-12 11:17:00 192

转载 爬虫实践-爬取转转网二手市场商品信息

channel_extract.py:import requestsfrom lxml import etree# 请求URLstart_url = 'http://cs.58.com/sale.shtml'# 拼接的部分URLurl_host = 'http://cs.58.com'# 获取商品类目URLdef get_channel_urls(url): html = re...

2017-12-11 15:15:00 544

转载 爬虫实践-爬取简书网热评文章

jianshuwangarticle.py:import requestsfrom lxml import etreeimport pymongofrom multiprocessing import Pool# 连接数据库client = pymongo.MongoClient('localhost', 27017)mydb = client['mydb']jianshu_shou...

2017-12-11 10:44:00 216

转载 多进程爬虫学习-性能对比

performancecomparation.py:import requestsimport reimport timefrom multiprocessing import Poolheaders = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 ' ...

2017-12-10 23:43:00 98

转载 爬虫实践-爬取豆瓣音乐TOP250的数据

doubanyinyue.py:import requestsfrom lxml import etreeimport reimport pymongoimport timeclient = pymongo.MongoClient('localhost', 27017)mydb = client['mydb']musictop = mydb['musictop']headers = ...

2017-12-10 23:22:00 543

转载 爬虫API学习-百度地图API调用

转载于:https://www.cnblogs.com/silverbulletcy/p/8010749.html

2017-12-09 10:38:00 209

转载 爬虫API学习-斯必克API调用

转载于:https://www.cnblogs.com/silverbulletcy/p/8006902.html

2017-12-08 19:48:00 568

转载 爬虫实践-爬取起点中文网小说信息

qidian.py:import xlwtimport requestsfrom lxml import etreeimport timeall_info_list = []def get_info(url): html = requests.get(url) selector = etree.HTML(html.text) infos = selector.xpa...

2017-12-08 19:36:00 593

转载 爬虫实践-爬取豆瓣网图书TOP250的数据

doubantop250.py:# 导入相应的库文件from lxml import etreeimport requestsimport csv# 创建csvfp = open('C://Users/Administrator//Desktop/doubanbook.csv', 'wt', newline='', encoding='utf-8')writer = csv.writ...

2017-12-08 16:00:00 538

转载 爬虫学习-正则表达式、BeautifulSoup、Lxml性能对比

QiushibaikeComparation.py:# 导入相应的库文件import requestsimport refrom bs4 import BeautifulSoupfrom lxml import etreeimport time# 加入请求头headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64...

2017-12-08 15:14:00 294

转载 爬虫实践-爬取糗事百科网段子信息

qiushibaike.py:# 导入相应的库文件import requestsimport re# 加入请求头headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 ' '(KHTML, like Gecko) Chrome/53.0....

2017-12-08 14:13:00 252

转载 leetcode019-Roman to Integer

Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.Soulution:int romanToInt(char* s) {   int num=0,temp=0;   while(*s){ ...

2017-12-06 14:40:00 63

转载 Win8安装tensorflow

转载于:https://www.cnblogs.com/silverbulletcy/p/7990484.html

2017-12-06 01:28:00 75

转载 py3.5-json模块练习

world_population.py:import jsonimport pygal.maps.worldfrom pygal.style import RotateStylefrom country_codes import get_country_code# 将数据加载到一个列表中filename = 'popu...

2017-12-05 23:45:00 88

转载 py3.5-csv模块练习

highs_lows.py:import csvfrom datetime import datetimefrom matplotlib import pyplot as plt# 从文件中获取日期、最高气温和最低气温filename = 'sitka_weather_2014.csv'with open(filename) as f: reader = csv.reader(...

2017-12-05 20:00:00 67

转载 leetcode009-Palindrome Number

Determine whether an integer is a palindrome. Do this without extra space.Solution:bool isPalindrome(int x) {   if(x<0)     return false;   long answer=0;   int temp=x;   while(temp!=0...

2017-12-05 17:28:00 77

转载 py3.5-pygal练习

die.py:from random import randintclass Die(): """表示一个骰子的类""" def __init__(self, num_sides=6): """骰子默认为6面""" self.num_sides = num_sides def roll(self): """...

2017-12-05 17:21:00 90

转载 py3.5-matplotlib库练习02随机漫步

random_walk.py:from random import choiceclass RandomWalk(): """一个生成随机漫步数据的类""" def __init__(self, num_points=5000): """初始化随机漫步的属性""" self.num_points = num_points # 所有...

2017-12-05 15:24:00 99

转载 py3.5-matplotlib库练习01

转载于:https://www.cnblogs.com/silverbulletcy/p/7986899.html

2017-12-05 14:46:00 88

转载 爬虫实践-爬取酷狗TOP500数据

源代码:import requestsfrom bs4 import BeautifulSoupimport timeheaders = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 ' ' (KHTML, like Gecko) Chro...

2017-12-04 22:41:00 197

转载 Machine Learning课堂笔记之Logistic Regression

转载于:https://www.cnblogs.com/silverbulletcy/p/7977745.html

2017-12-04 16:36:00 63

转载 Machine Learning课堂笔记之Computing Parameters Analytically

转载于:https://www.cnblogs.com/silverbulletcy/p/7977615.html

2017-12-04 16:19:00 153

转载 Machine Learning课堂笔记之Multivariate Linear Regression

转载于:https://www.cnblogs.com/silverbulletcy/p/7977463.html

2017-12-04 15:58:00 120

转载 Machine Learning课堂笔记之Environment Setup Instructions

转载于:https://www.cnblogs.com/silverbulletcy/p/7977387.html

2017-12-04 15:47:00 119

转载 leetcode007-Reverse Integer

Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Note:...

2017-12-01 23:28:00 68

转载 leetcode001-Two Sum

Given an array of integers, returnindicesof the two numbers such that they add up to a specific target.You may assume that each input would haveexactlyone solution, and you may not use the...

2017-12-01 17:16:00 51

转载 爬虫BeautifulSoup库学习-小猪短租网

打印网页源码:打印一个价格标签:打印所有价格标签:转载于:https://www.cnblogs.com/silverbulletcy/p/7890448.html

2017-11-24 14:24:00 129

转载 爬虫Requests库学习-小猪短租网

转载于:https://www.cnblogs.com/silverbulletcy/p/7889817.html

2017-11-24 11:35:00 119

转载 【转】如何在Windows环境下安装Linux系统虚拟机

构建Linux环境首先登陆Ubuntu的官网,选择相应版本的Ubuntu软件下载,这里小编推荐的是Ubuntu Kylin最新优麒麟桌面版本(32位和64位),两个版本的文件都有1.6GB,把文件下载到电脑(一般不推荐下载到C盘)。Ubuntu镜像文件下载完成后,还需要一个虚拟机来运行,所以我们还需要下载一个叫VMwareWorkst...

2017-11-19 21:41:00 107

转载 Machine Learning课堂笔记之Linear Algebra Review

转载于:https://www.cnblogs.com/silverbulletcy/p/7862241.html

2017-11-19 21:35:00 108

转载 Machine Learning课堂笔记之Model and Cost Function

转载于:https://www.cnblogs.com/silverbulletcy/p/7858976.html

2017-11-19 04:27:00 90

转载 Machine Learning课堂笔记之Introduction

转载于:https://www.cnblogs.com/silverbulletcy/p/7858975.html

2017-11-19 04:17:00 62

空空如也

空空如也

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

TA关注的人

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