- 博客(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
239
转载 爬虫实践-爬取简书网用户动态信息
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
230
转载 爬虫实践-爬取转转网二手市场商品信息
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
668
转载 爬虫实践-爬取简书网热评文章
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
264
转载 多进程爬虫学习-性能对比
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
124
转载 爬虫实践-爬取豆瓣音乐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
603
转载 爬虫API学习-百度地图API调用
转载于:https://www.cnblogs.com/silverbulletcy/p/8010749.html
2017-12-09 10:38:00
235
转载 爬虫API学习-斯必克API调用
转载于:https://www.cnblogs.com/silverbulletcy/p/8006902.html
2017-12-08 19:48:00
638
转载 爬虫实践-爬取起点中文网小说信息
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
654
转载 爬虫实践-爬取豆瓣网图书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
585
转载 爬虫学习-正则表达式、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
364
转载 爬虫实践-爬取糗事百科网段子信息
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
289
转载 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
87
转载 Win8安装tensorflow
转载于:https://www.cnblogs.com/silverbulletcy/p/7990484.html
2017-12-06 01:28:00
100
转载 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
118
转载 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
96
转载 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
99
转载 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
120
转载 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
123
转载 py3.5-matplotlib库练习01
转载于:https://www.cnblogs.com/silverbulletcy/p/7986899.html
2017-12-05 14:46:00
115
转载 爬虫实践-爬取酷狗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
230
转载 Machine Learning课堂笔记之Logistic Regression
转载于:https://www.cnblogs.com/silverbulletcy/p/7977745.html
2017-12-04 16:36:00
78
转载 Machine Learning课堂笔记之Computing Parameters Analytically
转载于:https://www.cnblogs.com/silverbulletcy/p/7977615.html
2017-12-04 16:19:00
183
转载 Machine Learning课堂笔记之Multivariate Linear Regression
转载于:https://www.cnblogs.com/silverbulletcy/p/7977463.html
2017-12-04 15:58:00
161
转载 Machine Learning课堂笔记之Environment Setup Instructions
转载于:https://www.cnblogs.com/silverbulletcy/p/7977387.html
2017-12-04 15:47:00
153
转载 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
96
转载 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
72
转载 爬虫BeautifulSoup库学习-小猪短租网
打印网页源码:打印一个价格标签:打印所有价格标签:转载于:https://www.cnblogs.com/silverbulletcy/p/7890448.html
2017-11-24 14:24:00
151
转载 爬虫Requests库学习-小猪短租网
转载于:https://www.cnblogs.com/silverbulletcy/p/7889817.html
2017-11-24 11:35:00
145
转载 【转】如何在Windows环境下安装Linux系统虚拟机
构建Linux环境首先登陆Ubuntu的官网,选择相应版本的Ubuntu软件下载,这里小编推荐的是Ubuntu Kylin最新优麒麟桌面版本(32位和64位),两个版本的文件都有1.6GB,把文件下载到电脑(一般不推荐下载到C盘)。Ubuntu镜像文件下载完成后,还需要一个虚拟机来运行,所以我们还需要下载一个叫VMwareWorkst...
2017-11-19 21:41:00
140
转载 Machine Learning课堂笔记之Linear Algebra Review
转载于:https://www.cnblogs.com/silverbulletcy/p/7862241.html
2017-11-19 21:35:00
151
转载 Machine Learning课堂笔记之Model and Cost Function
转载于:https://www.cnblogs.com/silverbulletcy/p/7858976.html
2017-11-19 04:27:00
117
转载 Machine Learning课堂笔记之Introduction
转载于:https://www.cnblogs.com/silverbulletcy/p/7858975.html
2017-11-19 04:17:00
83
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人