摘要: 1.用Hive对爬虫大作业产生的文本文件(或者英文词频统计下载的英文长篇小说)进行词频统计。 2.用Hive对爬虫大作业产生的csv文件进行数据分析,写一篇博客描述你的分析过程和分析结果。 阅读全文
posted @ 2018-05-24 22:37 131李锦旭 阅读(69) 评论(0) 推荐(0) 编辑
摘要: 1. 用Python编写WordCount程序并提交任务 程序 WordCount 输入 一个包含大量单词的文本文件 输出 文件中每个单词及其出现次数(频数),并按照单词字母顺序排序,每个单词和其频数占一行,单词和频数之间有间隔 A.编写map函数,reduce函数B.将其权限作出相应修改 # ma 阅读全文
posted @ 2018-05-10 20:36 131李锦旭 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 1. 以下关系型数据库中的表和数据,要求将其转换为适合于HBase存储的表并插入数据: 学生表(Student)(不包括最后一列) 学号(S_No) 姓名(S_Name) 性别(S_Sex) 年龄(S_Age) 课程(course) 2015001 Zhangsan male 23 2015003 阅读全文
posted @ 2018-05-04 22:00 131李锦旭 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 一、Hadoop提供的Shell命令完成相同任务: 二、 向HDFS中上传任意文本文件,如果指定的文件在HDFS中已经存在,由用户指定是追加到原有文件末尾还是覆盖原有的文件; hadoop fs -put /home/hadoop/test.txt /usr/local/hadoophadoop f 阅读全文
posted @ 2018-04-27 20:42 131李锦旭 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 生成词云: 阅读全文
posted @ 2018-04-24 20:43 131李锦旭 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 1. 将新闻的正文内容保存到文本文件。 2. 将新闻数据结构化为字典的列表: 单条新闻的详情-->字典news 一个列表页所有单条新闻汇总-->列表newsls.append(news) 所有列表页的所有新闻汇总列表newstotal.extend(newsls) import requests f 阅读全文
posted @ 2018-04-17 18:51 131李锦旭 阅读(140) 评论(0) 推荐(0) 编辑
摘要: import requests from bs4 import BeautifulSoup from datetime import datetime import locale import re locale.setlocale(locale.LC_CTYPE,'chinese') newsurl = 'http://news.gzcc.cn/html/xiaoyuanxinwen/' ... 阅读全文
posted @ 2018-04-09 23:04 131李锦旭 阅读(166) 评论(0) 推荐(0) 编辑
摘要: import requests from bs4 import BeautifulSoup from datetime import datetime url = "http://news.gzcc.cn/html/xiaoyuanxinwen/" res = requests.get(url) res.encoding = "utf-8" soup = BeautifulSoup(res.t... 阅读全文
posted @ 2018-04-02 19:37 131李锦旭 阅读(115) 评论(0) 推荐(0) 编辑
摘要: import requests url = 'http://localhost:63342/bd/gouxueyuan.html?_ijt=kn4osq2f4cqos8pf8vjvmkrah7' res = requests.get(url) res.encoding = 'utf-8' from bs4 import BeautifulSoup soup = BeautifulSoup(re... 阅读全文
posted @ 2018-03-29 19:49 131李锦旭 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 代码如下: 运行截图: 阅读全文
posted @ 2018-03-26 10:58 131李锦旭 阅读(83) 评论(0) 推荐(0) 编辑