自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 【maven】使用eclipse自带的Maven插件,修改repository的默认位置

【原文链接】https://blog.csdn.net/qq_20565303/article/details/60480247 1、查看相关是否可建Maven工程:将eclipse打开后新建工程在other里面可以找到maven2、查看默认Maven插件的配置:1)我们可以可以点击Window下的Preferences,然后找到Maven,点击installations,可以...

2019-02-25 11:16:07 2213

原创 【Flume】通过Hue提交Oozie SSH Action用命令启动Flume脚本报错Unable to find java executable.

【背景】在配置好Flume后,在控制台通过flume-ng agent --conf /* --conf-file /* --name agent Dflume.root.logger=INFO,console命令启动Flume Agent没有问题。但是将这个命令通过Oozie SSH Action运行的时候却发现,Sink的目录没有结果文件,且ps -ef | grep flume也没有Flum...

2018-12-13 15:43:01 1431

原创 【Oozie】SSH Workflow报错之Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

【问题】添加workflow,拖拽一个ssh,user and host填写USER@HOST,ssh command填写一个最简单的ll命令,保存,submit,报错:Caused by: java.io.IOException: Not able to perform operation [ssh -o PasswordAuthentication=no -o KbdInteractiveD...

2018-12-12 18:25:14 2879

原创 【Oozie】解决通过Hue界面提交Oozie Workflow和Coordinator时区问题的三个步骤

【问题一】Hue界面中显示提交Coordinator和Workflow的时间和真正的时间不匹配【背景】提交Coordinator的时候是下午五点,但是界面上显示的是凌晨1点,判断是时区问题【解决】打开Cloudera Manager的页面,打开Hue服务的页面,点击配置,搜索time会出现timezone的配置,将洛杉矶时区改成Asia/Shanghai【注意】没有Asia/Beiji...

2018-12-11 17:49:23 1498

原创 【CDH】Error: JAVA_HOME is not set and could not be found.

错误一:hdfs dfs -mkdir -p /flume/mysqlPermission denied: user=root, access=WRITE, inode="/":hdfs:supergroup:drwxr-xr-x这些类似的权限问题都属于同类问题,他是我说我们的执行Hadoop命令的用户没有,执行权限。刚开始我想解决问题的思路是,将当前用户授权。(这种想法是不正确的,不...

2018-12-06 16:23:13 3077

转载 【Oozie】CDH是如何通过Hue提交Oozie定时任务的?

【原文链接】https://www.cnblogs.com/mr-ivan/p/6593550.html 提交oozie定时作业 1、进入hue界面,点击workflows工作流,编辑workflows。 2、点击create创建工作流。 3、本文以hive2作业sql任务为例,拖拽hive2到action区域。 4、例子是为车次表每天定时添加指定分...

2018-12-05 18:33:41 643

转载 【MySQL】CentOS7安装MySQL7并更改初始化密码

1、官方安装文档http://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/2、下载 Mysql yum包http://dev.mysql.com/downloads/repo/yum/下载到本地再上传到服务器,或者使用wget 直接下载wget http://repo.mysql.com/mysql57-communit...

2018-12-05 18:26:07 445

翻译 【MySQL】Error “No package mysql-server available” while Installing mysql

【原文链接】https://www.techietown.info/2017/07/error-no-package-mysql-server-available-while-installing-mysql-server/Mysql is a popular open source relational database management system (RDBMS). It is wi...

2018-12-05 18:04:23 418

转载 【网络营销】CPA、CPS、CPM、CPT、CPC 是什么

【原文链接】https://www.a-edm.com/cpa.html 网络营销之所以越来越受到重视一个主要的原因就是因为“精准”。相比较传统媒体的陈旧广告形式,网络营销能为广告主带来更为确切的效果与回报,更有传统媒体所没有的即时互动性。很多企业借助于精准的网络营销成为人尽皆知的知名品牌。众多的成功案例吸引着更多的企业计划投入到网络营销中的大潮中来。那么我们在做网络营销前应该要了解哪些基...

2018-11-01 14:15:22 3202

翻译 【Sqoop】Export data into RDBMS using Sqoop 及其调优

【原文链接】https://hadoopjournal.wordpress.com/2017/08/15/export-data-using-sqoop/ We can export data from HDFS into an RDBMS table using the Sqoop export tool. The target table must already exist in t...

2018-10-31 17:31:03 807

翻译 【SQL】SELECT col, COUNT(DISTINCT other_col) FROM tab GROUP BY col的两种写法

To count distinct values inside of a GROUP BY, use the following.SELECT col, COUNT(DISTINCT other_col) FROM tab GROUP BY colThe same result can be achieved without using the DISTINCT keyword, as ...

2018-10-26 13:46:42 531

转载 【Shell】别把&和nohup混为一谈, 根本不是同一个东西好不好 ------ 聊聊./a.out & , nohut ./a.out , nohup ./a.out &的区别

【原文链接】https://blog.csdn.net/stpeace/article/details/76389073 在第一家公司工作的时候, 我认识了&,在第二家公司工作的时候, 我认识了nohup, 这就是渊源。 随后, 我就一直糊涂用他们, 但并不懂这两个东西。 网上很多地方是乱扯, 瞎复制, 为什么不自己实践一下呢? 看个小程序:int main (){ in...

2018-09-25 15:37:06 285

转载 【产品】推荐系统的冷启动和评论推荐

【原文链接】http://www.woshipm.com/pd/818285.html 推荐系统的冷启动本篇文章是写给产品经理看的,所以说,我们不讨论算法,只说方法。冷启动在整个推荐系统中,是一个非常重要而又非常难的一件事情,推荐系统一般都需要在大量的数据基础过后才能比较准确的进行推荐,而一个新用户刚使用APP的冷启动可能直接决定着这个用户还会不会使用下去,所以冷启动是一件至关重要...

2018-08-27 18:19:40 346

转载 【特征工程】机器学习中离散型特征的处理 —— 独热码 (one-hot)

【原文链接】https://www.cnblogs.com/daguankele/p/6595470.html 1、什么是独热码  独热码,在英文文献中称做 one-hot code, 直观来说就是有多少个状态就有多少比特,而且只有一个比特为1,其他全为0的一种码制,更加详细参加one_hot code(维基百科)。在机器学习中对于离散型的分类型的数据,需要对其进行数字化比如说性别这一...

2018-08-15 14:14:45 651

原创 【爬虫】Scrapy 中利用 XPath 丢弃所有跟 footer 相关的内容

【前言】利用 Scrapy 爬取网站文字的时候发现,footer 中的 Copyright 等文字会影响后续分词的效果,因此决定将网页的 HTML 中有关 footer 的内容都丢弃。以下是不排除 footer 中内容的时候拿到网页的所有文本内容:response.selector.xpath('//*[not(self::script or self::style or self::tit...

2018-08-03 16:11:55 904

翻译 【XPath】语法、Axes、操作符

【原文链接】https://www.w3schools.com/xml/xpath_syntax.asp XPath SyntaxXPath uses path expressions to select nodes or node-sets in an XML document. The node is selected by following a path or steps....

2018-08-03 15:09:33 273

翻译 【SEO】Meta Keywords: 是什么?怎么用?

【原文链接】https://www.wordstream.com/meta-keyword Meta Keywords are a specific type of meta tag that appear in the HTML code of a Web page and help tell search engines what the topic of the page is. M...

2018-08-02 16:51:37 4064

翻译 【SEO】Meta Descriptions 对于 SEO 的重要性

【原文链接】https://www.wordstream.com/meta-description 元描述 (有时也称为元描述属性或标签) 是一种 HTML 元素。It describes and summarizes the contents of your page for the benefit of users and search engines. 虽然元数据对 SEO 排名不像...

2018-08-02 15:54:21 825

翻译 【HTML】meta 标签

【原文链接】https://www.w3schools.com/tags/tag_meta.asp 【前言】最近把500个网页除了<script>和样式的标签以外的文本内容爬取下来,然后利用Hierarchical Clustering进行了分类。...结果就像skr粑粑一样(如下图),太不准了。利用jieba分词后,提取出来的文档集让人不禁感叹,介skr什么鬼(如下文)。领导...

2018-08-02 14:56:04 297

原创 【爬虫】Scrapy 爬取excel中500个网址首页,使用Selenium模仿用户浏览器访问,将网页title、url、文本内容组成的item保存至json文件

创建含有网址首页的excel文件host_tag_网站名称_主域名_子域名.xlsx编辑读取excel文件的工具类项目FileUtils新建项目FileUtils编辑file_utils.py# -*- coding: utf-8 -*-"""Created on Thu Jul 26 10:42:49 2018@author: Administrator"...

2018-08-01 14:09:44 3566

翻译 【爬虫】Scrapy Feed Exports

【原文链接】https://doc.scrapy.org/en/latest/topics/feed-exports.html#topics-feed-exports Feed exportsNew in version 0.10.One of the most frequently required features when implementing scrapers is b...

2018-07-31 15:21:59 393

翻译 【爬虫】Scrapy Item Pipeline

【原文链接】https://doc.scrapy.org/en/latest/topics/item-pipeline.html 爬虫爬取了一个 item 后, 它会被发送到 Item Pipeline, which 通过好几个组件 that are executed sequentially 处理 item.每个 item 管道组件 (sometimes referred as ju...

2018-07-31 13:48:37 225

翻译 【爬虫】Scrapy Item

【原文链接】https://doc.scrapy.org/en/latest/topics/items.html ItemsThe main goal in scraping is to extract structured data from unstructured sources, typically, web pages. Scrapy spiders can return t...

2018-07-31 10:05:28 223

翻译 【爬虫】Scrapy 自定义下载器中间件

【原文链接】https://doc.scrapy.org/en/latest/topics/downloader-middleware.html Writing your own downloader middlewareEach middleware component is a Python class that defines one or more of the followi...

2018-07-27 15:46:18 1262

原创 【爬虫】使用 Scrapy + Selenium 爬取动态加载页面的内容

上一篇文章里面我们使用 Python Scrapy 爬取静态网页中所有文字:https://blog.csdn.net/sinat_40431164/article/details/81102476但是有个问题,当我们把要访问的URL修改为:http://club.haval.com.cn/forum.php?mod=toutiao&mobile=2的时候,可以发现爬取的内容里面没有“...

2018-07-25 12:15:16 7134

转载 【爬虫】Scrapy配合Selenium爬取京东动态加载的商品信息

【原文链接】https://www.cnblogs.com/cnkai/p/7570116.html 在之前的一篇实战之中,我们已经爬取过京东商城的数据,但是前面的那一篇其实是有一个缺陷的,不知道你看出来没有,下面就来详细的说明和解决这个缺陷。我们在京东搜索页面输入关键字进行搜索的时候,页面的返回过程是这样的,它首先会直接返回一个静态的页面,页面的商品信息大致是30个,之所以说是大致,...

2018-07-24 18:17:23 2210 2

翻译 【爬虫】Python Scrapy 基础概念 —— 请求和响应

【原文链接】https://doc.scrapy.org/en/latest/topics/request-response.html Scrapy uses Request and Response 对象来爬网页.Typically, spiders 中会产生 Request 对象,然后传递 across the system,  直到他们到达 Downloader, which 执...

2018-07-24 16:08:27 967

转载 【基础知识】深拷贝和浅拷贝的区别是什么?

【原文链接】https://stackoverflow.com/questions/184710/what-is-the-difference-between-a-deep-copy-and-a-shallow-copyShallow copies duplicate as little as possible. A shallow copy of a collection is a copy...

2018-07-24 11:39:49 243

翻译 【爬虫】selenium-python 安装和入门

【原文链接】http://selenium-python.readthedocs.io/installation.html【原文链接】http://selenium-python.readthedocs.io/getting-started.html 1. Installation1.1. IntroductionSelenium Python bindings provide...

2018-07-23 14:10:10 335

转载 【爬虫】Scrapy 抓取网站数据

【原文链接】http://chenqx.github.io/2014/11/09/Scrapy-Tutorial-for-BBSSpider/ Scrapy Tutorial  接下来以爬取饮水思源BBS数据为例来讲述爬取过程,详见 bbsdmoz代码。  本篇教程中将带您完成下列任务:1. 创建一个Scrapy项目2. 定义提取的Item3. 编写爬取网站的 spider...

2018-07-20 15:50:23 2482

原创 【爬虫】使用 Python Scrapy 爬取静态网页中所有文字

Creating a projectBefore you start scraping, you will have to set up a new Scrapy project. Enter a directory where you’d like to store your code and run:scrapy startproject URLCrawlerOur first ...

2018-07-20 10:52:56 5859

翻译 【爬虫】Python Scrapy Selectors (选择器)

【原文链接】https://doc.scrapy.org/en/latest/topics/selectors.html#topics-selectors When you’re scraping web pages, the most common task you need to perform is to extract data from the HTML source. Ther...

2018-07-19 14:01:57 1011

翻译 【爬虫】Python Scrapy 教程

【原文链接】https://doc.scrapy.org/en/latest/intro/tutorial.htmlIn this tutorial, we’ll assume that Scrapy is already installed on your system. If that’s not the case, see Installation guide.We are goin...

2018-07-18 11:49:57 1424

原创 【NLP】Python中文文本聚类

1. 准备需要进行聚类的文本,这里选取了10篇微博。import ospath = 'E:/work/@@@@/开发事宜/大数据平台/5. 标签设计/文本测试数据/微博/'titles = []files = []for filename in os.listdir(path): titles.append(filename) #带BOM的utf-8编码的txt文件时...

2018-07-18 10:08:50 21928 12

原创 【Python】解决matplotlib图例中文乱码问题——win10版本

1. 找到matplotlib 配置文件:import matplotlibprint(matplotlib.matplotlib_fname())E:\software\python\anaconda\lib\site-packages\matplotlib\mpl-data\matplotlibrc2. 编辑上述文件,uncomment the following 2 lines...

2018-07-17 15:15:03 1617

原创 【NLP】Jieba中文分词

【GitHub地址】https://github.com/fxsjy/jieba特点 支持三种分词模式: 精确模式,试图将句子最精确地切开,适合文本分析; 全模式,把句子中所有的可以成词的词语都扫描出来, 速度非常快,但是不能解决歧义; 搜索引擎模式,在精确模式的基础上,对长词再次切分,提高召回率,适合用于搜索引擎分词。 支持繁体分词 支持自定义词典 ...

2018-07-16 16:50:05 355

翻译 【NLP】Python英文文本聚类

【原文链接】http://brandonrose.org/clusteringIn this guide, I will explain how to cluster a set of documents using Python. My 目标例子 is to identify the 潜在的 structures within the 摘要 of the top 100 films of a...

2018-07-13 17:08:20 13951 4

原创 【NLP】BosonNLP Python SDK 使用入门

打开Anaconda Navigator,create new environment,选择Python 3.6和R。如果您使用 Python 语言,建议通过 SDK 的方式使用 BosonNLP。BosonNLP Python SDK 是由 BOSON 官方支持的开发者工具包,提供了对 REST 接口的简化封装。最简便的安装方式是通过 pip 。...

2018-07-13 13:55:58 1275 1

翻译 【机器学习】SciPy 系统/层次聚类和树状图教程

This is a tutorial on how to use scipy's hierarchical clustering.One of the benefits of hierarchical clustering is that you 不用提前知道数据需要分成多少类(类别数量用k表示). Sadly, there doesn't seem to be much documentatio...

2018-07-12 18:58:02 8260 2

转载 【hive】String to Date 转化大全

原文链接:http://bigdataprogrammers.com/string-date-conversion-hive/Input column name: dt (String).Replace dt with your column name.Input FormatCodeOutput FormatddMMyyyyto_date(from_unixtime(UNIX_TIMESTAMP...

2018-06-26 17:34:54 18705

空空如也

空空如也

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

TA关注的人

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