04 2018 档案

摘要:一、Hadoop提供的Shell命令完成相同任务: 二、 向HDFS中上传任意文本文件,如果指定的文件在HDFS中已经存在,由用户指定是追加到原有文件末尾还是覆盖原有的文件; hadoop fs -put /home/hadoop/test.txt /usr/local/hadoophadoop f 阅读全文
posted @ 2018-04-27 20:42 131李锦旭 阅读(292) 评论(0) 推荐(0)
摘要:生成词云: 阅读全文
posted @ 2018-04-24 20:43 131李锦旭 阅读(335) 评论(0) 推荐(0)
摘要:1. 将新闻的正文内容保存到文本文件。 2. 将新闻数据结构化为字典的列表: 单条新闻的详情-->字典news 一个列表页所有单条新闻汇总-->列表newsls.append(news) 所有列表页的所有新闻汇总列表newstotal.extend(newsls) import requests f 阅读全文
posted @ 2018-04-17 18:51 131李锦旭 阅读(149) 评论(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李锦旭 阅读(170) 评论(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李锦旭 阅读(121) 评论(0) 推荐(0)