自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 问答 (1)
  • 收藏
  • 关注

原创 zookeeper搭建命令

任何一条命令执行前要确保知道如下三个环境1.你是用那个用户执行命令的 (sudo 执行命令创建的文件都是root用户的)2.你所在的主机是哪个3.你当前所在的目录是否影响你命令的执行!!!!!!操作之前先做 rm -rf /usr/local/hadoop/tmp/* !!!!!!1.sudo tar xzvf software/zookeeper-3.4.10.tar.gz -C /usr/local/目的:将zookeeper解压到 /usr/local/目录下验证:...

2021-09-19 15:28:52 190

原创 Virtualbox网络配置时出现的错误

将网卡禁用,接着再启用,根据以下步骤操作

2021-06-25 08:39:21 743

原创 hadoop集群搭建错误

如上图显示,hadoop搭建集群时,无法找到hdfs命令,原因:hadoop的环境变量没有配置好。一种方法是给这个命令加上绝对路径另一种方法是修改相关配置文件,把路径写进去,在让它生效...

2021-06-25 08:28:25 167

原创 求和

from flask import Flaskfrom flask import requestfrom flask import render_templateapp = Flask(__name__)@app.route("/")@app.route("/hello")def hello():# return render_template("index.html") return """ <!DOCTYPE html> <html&g

2020-12-24 11:12:16 114

原创 caishuzi.md

import randomimport tkinterimport sysimport tkinter.messageboxdef cai_shu_zi(): global i if Button1['text'] == "游戏结束": sys.exit() else: try: text_check = ''.join(j for j in Entry1.get() if j in '0123456789')

2020-12-23 22:43:09 79

原创 bmi

class BMI: def __init__(self,name,age,tizhong,shengao): self.name = name self.age = age self.tizhong = tizhong self.shengao = shengao n = self.tizhong/(self.shengao*self.shengao) if n<18.5:

2020-12-09 22:28:41 298

原创 课堂小记

def qiuhe(x,y): """ 用于求和的函数。 Input: x:接收1个实数; y:接收1个实数。 Output: 返回x+y的计算结果 """ print(x) print(y) z=x+y return z result=qiuhe(1,2)# 函数的调用12qiuhe(y=1,x=2)213def move(players,ste

2020-11-26 11:54:16 150

原创 点名系统

# 创建一个字典students,key是学号,value是姓名# 学生信息在students.csv文件里,从文件中读取并保存到字典# 打开students.csv文件file=open(r'C:\Users\meilidemeimei\Desktop\students.csv','r')# 读取文件内容lines=file.readlines()# 抽取每行的学号和姓名,保存到字典students={}for line in lines: tmp_list=line.spli

2020-11-25 22:27:01 226

原创 行号

lines_maxlenth = 0 #1line_numbers = 1 #2code_in = open(“demo.py”,“r”).readlines()

2020-11-18 23:01:55 105

原创 瓦尔登词频

import string#文章路径path='C:/Users/meilidemeimei/Desktop/Walden.txt'with open(path,'r')as text: #去掉文字首位的标点符号,并把首字母大写转换成小写 words=[raw_word.strip(string.punctuation).lower() for raw_word in text.read().split()] #将列表用set函数转换成集合 words_index =s

2020-11-18 21:50:27 120

原创 猜数字游戏

import randomnum = random.randint(1,100)guess_chances =5print('您只有5次猜数字的机会哦!')您只有5次猜数字的机会哦!for i in range(1,guess_chances +1): print('这是第'+str(i)+'次猜数字') guess =input('请输入数字:') if guess.isdigit(): guess=int(guess) if g

2020-11-11 23:46:44 186

原创 While

M=[i for i in range(1,39)]N=0while len(M)>2: i=0 while i<len(M): N +=1 if N==3: M.remove(M[i]) N=0 else: i +=1print(M)[7, 22]

2020-11-11 23:22:00 76

原创 git使用

第一步:输入你的github账户邮箱和用户名命令:$ git config --global user.email “you@example.com”命令:$ git config --global user.name “Your Name”第二步:锁定代码文件所在的本地文件夹路径命令:$ cd 文件路径第三步:将该文件夹设定为本地库命令:$ git init第四步:将代码文件预载入命令:$ git add 文件名命令:$ git commit -m ‘描述’第五步:选择分支命令:$

2020-11-11 22:25:27 268

原创 while中continue和break的区别

continue用法i=1while i <= 10: i += 1 if i % 2 >0: continue ii11break 用法i=1while i<10: i+=1 if i%2>0: break ii3continue执行后,将开始新的while循环break执行后,整个while循环中止,执行break以下的新语句...

2020-11-11 22:21:33 134

原创 简单方法删3

list1=[i for i in range(1,40)]list1[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39]list1.pop(2)a=list1.pop(0)b=l

2020-11-08 19:35:56 126

原创 字典,元祖,集合的增删改查使用

创建一个列表list1=['a','b','c',4,5,6]列表中增加元素(增)列表末尾增加元素list1.append(8)list1['a', 'b', 'c', 4, 5, 6, 8]列表指定位置增加元素list1.insert(1,'f')list1['a', 'f', 'b', 'c', 4, 5, 6, 8]列表中元素的替换list1[0]='hello world'list1['hello world', 'f', 'b', 'c', 4, 5, 6

2020-11-07 09:07:35 119

原创 Markdown使用

今日作业今日作业布置:完成git and markdown两篇推文发在CSDN博客上

2020-11-01 19:53:49 162

原创 课堂记录

a=1a1a='hello world'a'hello world'all_in_list=[1,'a world']all_in_list[0]1all_in_list[1]'a world'del all_in_list[1]all_in_list.append("hello world")all_in_list[0]=5all_in_list[5, 'hello world']

2020-10-28 20:15:00 92

空空如也

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

TA关注的人

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