自定义博客皮肤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)
  • 收藏
  • 关注

原创 VsCode 配置安装VM虚拟机中centos7开发环境

Win10中VsCode 配置安装VM虚拟机中centos7开发环境下文主要实现,使用VsCode 链接VM中centos7 虚拟机和,方便在VsCode IDE中进行开发。1、获取centos 虚拟机ip地址2、Win环境中打开powershell测试链接虚拟机,使用PowerShell,输入ssh username@host命令连接虚拟机,根据提示输入密码登陆即可登录成功3、配置免密登录鉴于每次都使用密码登录非常不方便,尤其是使用VSCode时,打开一个窗口输一次密码,所以配置免密

2020-09-15 14:55:32 1127

原创 基于Ambari 2.6 hdp2.6 集成Redis5.0.0

1、将Redis组件纳入Amabri集群查看hdp版本 hdp-select status hadoop-client得到hadoop-client - 2.6.5.0-292可知hdp版本为2.6主节点上:cd /var/lib/ambari-server/resources/stacks/HDP/2.6/services rm -rf REDISsudo git clone h...

2019-08-27 14:22:58 888 4

原创 面板数据随机效应模型下,可行的广义最小二乘法FGLS估计

以下的操作都是先基于huasman检验,H检验的p值大于0.05 选择随机效应模型,运用FGLS估计法。若p值小于0.05 选择固定效应模型,运用LSDV估计法。面板模型估计FGLS1、导入数据,对面板数据进行Hausman检验这部分内容具体可参考本人的另一篇文章,就不在多做描述https://blog.csdn.net/zzzxmfj/article/details/889762772、...

2019-07-02 16:13:34 40533 8

原创 samba实现本地和服务器端共享文件

1、安装samba因为需要用到nodejs、python等编译环境,并且nodejs有些库文件是需要C++ 、ruby、python等一些语言进行编译,由于在windows上处理会比较复杂,所以选择在Linux上搭建编译环境,并使用samba协议共享Linux中的文件,实现在windows下进行代码修改,在Linux服务器上编译从而看到修改后的代码结果。1.1 部署samba先检查是否已经安...

2019-06-20 16:26:47 469

原创 ambari-admin 中admin-web 前端二次开发

以下文章将讲述基于已部署好的Ambari集群针对Ambari-admin中admin-web模块进行二次的开发ambari-admin模块中的admin-web可以进行单独编译,使用的是angularjs + bower + gulp。1、配置编译环境1.1 安装node.js下载nodewget https://nodejs.org/dist/v8.5.0/node-v8.5.0-li...

2019-06-18 16:47:15 1201

原创 基于已部署的Ambari集群 对Ambari-web 前端源码二次开发实时编译

前置条件:基于已经部署好的Ambari 集群1、将源码拷贝至集群主节点 node1.ambari.com:/opt/下2、安装npm依赖包首先切换到ambari-web目录下/opt/ambari-release-2.6.2/ambari-webnpm installnpm install -g brunch@1.7.203、编译源码brunch buildor 实时编译...

2019-05-24 15:36:56 791 2

原创 STATA面板数据模型进行Hausman检验

STATA面板数据模型进行Hausman检验1、导入数据可以通过如下多种方式导入1.1可以通过点击stata软件的图标,输入数据1.2 通过点击文件->导入 可以导入各种文本格式的数据例如我将导入xlsx文件注意勾选第一行作为变量名1.3 以命令行的方式导入import excel "路径"clear 可以把现有的变量名清空例如:import excel "C:...

2019-04-03 10:21:19 141154 30

原创 AMBARI2.6.2 HDP2.6.2中 HDFS安装失败

报错日志:stderr:Traceback (most recent call last):File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_client.py", line 73, in <module>HdfsClient().execute()Fil...

2019-04-02 16:29:20 596

原创 Kudu + IMPALA 的安装部署

Apache Kudu是由Cloudera开源的存储引擎,可以同时提供低延迟的随机读写和高效的数据分析能力。在存储技术中,基于HDFS的存储技术,比如Parquet,具有高吞吐量连续读取数据的能力;而HBase和Cassandra等技术适用于低延迟的随机读写场景。KUDU则兼具两者的优点。用户可以使用 Insert,Update和Delete API对KUDU表进行写操作。而在读操作方面,Ku...

2019-03-20 23:25:48 6008 1

原创 Ambari2.6 HDP2.6 整合impala

1、制作impala的镜像源,用于离线安装1.1 安装yum-utils工具包 yum install yum-utils -y1.2 添加cdh的repo 文件[cloudera-cdh5]# Packages for Cloudera's Distribution for Hadoop, Version 5, on RedHat or CentOS 7 x86_64name=C...

2019-03-18 18:16:08 1795

原创 Ambari2.6 Hive启动失败

错误日志:Traceback (most recent call last):File "/var/lib/ambari-agent/cache/common- services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py", line 203, in &lt;module&gt;HiveMetastore().execute()F...

2019-03-15 10:17:29 1003

原创 python系统学习日记 L40 模块, 类和对象

书中代码:

2019-03-12 10:14:14 105

原创 python系统学习日记 L39 字典

字典dict 所作的,是让你可以通过任何东西找到元素,不只是数字。字典可以将一个物件和另外一个东西关联,不管它们的类型是什么书中ex39.py代码修改为:# create a mapping of state to abbreviationstates = { 'Oregon': 'OR', 'Florida': 'FL', 'California': 'CA', 'New York...

2019-03-11 09:45:21 149

原创 python系统学习日记 L35 分支和函数

书中代码:from sys import exitdef gold_room(): print &amp;quot;This room is full of gold. How much do you take?&amp;quot; choice = raw_input(&amp;quot;&amp;amp;gt; &amp;quot;)if &amp;quot;0&amp;quot; in choice or &amp;quot;

2019-03-11 09:44:37 180

原创 python系统学习日记 L32 循环和列表

书中代码:这节习题,我们将使用 for循环来创建并打印一些列表。使用 for 循环之前,你需要在某个位置存放循环的结果。最好的方法是使用列表(list),顾名思义,列表就是一个按顺序存放东西的容器。书中代码:the_count = [1, 2, 3, 4, 5]fruits = ['apples', 'oranges', 'pears', 'apricots']change = [1, ...

2019-03-11 09:44:20 155

原创 python系统学习日记 L33 while循环

书中代码:i = 0numbers = []while i &amp;lt; 6: print &quot;At the top i is %d&quot; % i numbers.append(i) i = i + 1 print &quot;Numbers now: &quot;, numbers print &quot;At the bottom i is %d&quot; % iprint &quot;The

2019-03-11 09:31:10 123

原创 python系统学习日记 L31

书中代码:print &quot;You enter a dark room with two doors. Do you go through door #1 or door #2?&quot;door = raw_input(&quot;&amp;gt; &quot;)if door == &quot;1&quot;: print &quot;There's a giant bear here eating a cheese c

2019-03-11 09:30:49 126

原创 python系统学习日记 L27~L30 布尔值判断

书中代码:L30:people = 30cars = 40trucks = 15if cars &amp;gt; people: print &quot;We should take the cars.&quot;elif cars &amp;lt; people: print &quot;We should not take the cars.&quot;else: print &quot;We can't decide.&am

2019-03-11 09:30:27 147

原创 python系统学习日记 L26 修正改错

书中L26是改错习题,对一段有问题的代码进行改正书中代码:def break_words(stuff): &quot;&quot;&quot;This function will break up words for us.&quot;&quot;&quot; words = stuff.split(' ') return wordsdef sort_words(words): &quot;&quot;&quot;Sor

2019-03-07 18:04:51 325

原创 python系统学习日记 L25 import导入

本章的练习需要将自己定义的函数导入到 python 里通过自己执行函数的方式运行import的代码ex25.py 如下:def break_words(stuff): &amp;quot;&amp;quot;&amp;quot;This function will break up words for us.&amp;quot;&amp;quot;&amp;quot; words = stuff.split('') return wordsdef

2019-03-07 18:04:31 242

原创 python系统学习日记 L22~L24 练习

L22~L23:无L24:书中代码:print &quot;Let's practice everything.&quot;print 'You\'d need to know \'bout escapes with \\ that do \n newlines and \t tabs.'poem = &quot;&quot;&quot;\tThe lovely worldwith logic so firmly planted...

2019-03-07 18:04:03 181

原创 python系统学习日记 L21 函数的返回值

书中代码:def add(a, b): print &quot;ADDING %d + %d&quot; % (a, b) return a + bdef subtract(a, b): print &quot;SUBTRACTING %d - %d&quot; % (a, b) return a - bdef multiply(a, b): print &quot;MULTIPLYING %d * %d&quot; % (a, b)..

2019-03-07 18:03:39 198

原创 python系统学习日记 L20 函数和文件

书中代码:from sys import argvscript, input_file = argvdef print_all(f): print f.read()def rewind(f): f.seek(0)def print_a_line(line_count, f): print line_count, f.readline()current_file = open...

2019-03-07 09:23:58 152

原创 python系统学习日记 L19 函数和变量类型

通过这个练习,我们给函数 cheese_and_crackers ()传递很多的参数,然后在函数里把它们打印出来。我们可以在函数里用变量名,可以在函数里做运算,甚至可以将变量和运算结合起来。从一方面来说,函数的参数和我们的生成变量时用的 = 赋值符类似。事实上,如果你可以用 = 给一个东西命名,你也就可以将其作为参数传递给一个函数。书中代码:def cheese_and_crackers(ch...

2019-03-07 09:23:41 143

原创 python系统学习日记 L18 函数function

函数可以做三件事:1、它们给代码片段命名,就跟“变量”给字符串和数字命名一样。2、它们可以接受参数,就跟你的脚本接受 argv 一样。3、通过使用 #1 和 #2,它们可以让你创建“微型脚本”或者“小命令”。书中代码:# this one is like your scripts with argvdef print_two(*args): arg1, arg2 = args pr...

2019-03-07 09:23:03 120

原创 python系统学习日记 L17 更多文件操作

书中代码:from sys import argvfrom os.path import existsscript, from_file, to_file = argvprint &quot;Copying from %s to %s&quot; % (from_file, to_file)# we could do these two on one line, how?in_file = open(fr...

2019-03-07 09:21:34 180

原创 python系统学习日记 L16 读写文件

下面的命令,是你应该记住的命令:close – 关闭文件。跟你编辑器的 文件-&amp;gt;保存… 一个意思。read – 读取文件内容。你可以把结果赋给一个变量。readline – 读取文本文件中的一行。truncate – 清空文件,请谨慎使用该命令。write(‘stuff’) – 将stuff写入文书中代码:from sys import argvscript, filenam...

2019-03-07 09:19:43 157

原创 python系统学习日记 L15 读文件

书中代码

2019-03-05 17:52:00 118

原创 python系统学习日记 L14 提示和传递

书中代码:from sys import argvscript, user_name = argvprompt = '&amp;gt; 'print &quot;Hi %s, I'm the %s script.&quot; % (user_name, script)print &quot;I'd like to ask you a few questions.&quot;print &quot;Do you like me %s?&quo

2019-03-05 17:51:37 161

原创 python系统学习日记 L13 参数, 解包, 变量

书中代码:from sys import argvscript, first, second, third = argvprint &quot;The script is called:&quot;, scriptprint &quot;Your first variable is:&quot;, firstprint &quot;Your second variable is:&quot;, secondprint &quot;You

2019-03-05 17:51:13 312

原创 python系统学习日记 L11~L12 python2.x与3.x 输入函数input的区别

书中代码:print &amp;quot;How old are you?&amp;quot;,age = raw_input()print &amp;quot;How tall are you?&amp;quot;,height = raw_input()print &amp;quot;How much do you weigh?&amp;quot;,weight = raw_input()print &amp;quot;So, yo

2019-03-05 17:50:40 130

原创 python系统学习日记L10 那是什么?转义字符

书中代码:tabby_cat = &quot;\tI'm tabbed in.&quot;persian_cat = &quot;I'm split\non a line.&quot;baskslash_cat = &quot;I'm \\ a \\ cat.&quot;fat_cat = '''I'll do a list&quot;\t* Cat food\t* Fishies\t* Catnip\n\t* Grass'''

2019-03-04 21:38:52 146

原创 python系统学习日记L9 打印,打印,打印

书中代码:# Here's some new strange stuff ,remember type it exactlydays = &quot;Mon Tue Wed Thu Fri Sat Sun&quot;months = &quot;Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug&quot;print &quot;Here are the days: &quot;, daysprint &quot

2019-03-04 21:38:24 114

原创 python系统学习日记L8 打印,打印

书中代码如下:formatter = &quot;%r %r %r %r&quot;print formatter % (1, 2, 3, 4)print formatter % (&quot;one&quot;, &quot;two&quot;, &quot;three&quot;, &quot;four&quot;)print formatter % (True, False, False, True)print

2019-03-04 21:37:56 136

原创 python系统学习日记 L7 更多的打印(输出)

书中代码print &quot;Mary had a little lamb.&quot;print &quot;Its fleece was white as %s.&quot; % 'snow'print &quot;And everywhere that Mary went .&quot;print &quot;.&quot; * 10 # what'd that do ?end1 = &quot;C&quo

2019-03-04 21:36:58 102

原创 python系统学习日记 L6 字符串和文本

书中代码import datetimex = &amp;quot;There are %d types of people .&amp;quot; % 10binary = &amp;quot;binary&amp;quot;do_not = &amp;quot;don't&amp;quot;y = &amp;quot;Those who know %s and those who %s.&amp;quot; % (binary, d

2019-03-04 21:36:22 120

原创 python系统学习日记 L5 更多的变量和打印

书中代码:my_name = 'Zed A . Shaw'my_age = 35 # not a liemy_height = 74 # inchesmy_weight = 180 # lbsmy_eyes = 'Blue'my_teeth = 'White'my_hair = 'Brown'print &amp;amp;quot;Let's talk about % s.&amp;amp;quot; % my_namep...

2019-03-03 21:38:33 260

原创 python系统学习日记 L4 变量和命名

书中代码如下:cars = 100space_in_a_car = 4.0drivers = 30passengers = 90cars_not_driven = cars - driverscars_driven = driverscarpool_capacity = cars_driven * space_in_a_caraverage_passengers_per_car =...

2019-03-03 21:38:00 170

原创 python系统学习日记 L3 数字和数学

数学运算符号+ plus 加号- minus 减号/ slash 斜杠 除法* asterisk 星号 乘法% percent 百分号 模除布尔值运算:&amp;lt; less-than 小于号&amp;gt; greater-than 大于号&amp;lt;= less-than-equal 小于等于&amp;gt;= greater-than-equal 大于书中代码改为print(&quot;I will...

2019-03-03 21:37:25 202

原创 python系统学习日记 L1~L2

文章内容是根据笨办法学python课程中的代码修改为适合python3的代码书中练习一和练习二 py2和py3的区别主要在于print函数在Python2和Python3中都提供print()方法来打印信息,但两个版本间的print稍微有差异主要体现在以下几个方面:1.python3中print是一个内置函数,有多个参数,而python2中print是一个语法结构;2.Python2打印...

2019-03-03 21:36:57 276

空空如也

空空如也

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

TA关注的人

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