04 2022 档案

摘要:import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduc 阅读全文
posted @ 2022-04-30 22:42 森林深处有一道光 阅读(26) 评论(0) 推荐(0) 编辑
摘要:#避免全表扫描 use test; create table if not exists t(id int,num int defalult 0,name varchar(20)); create index ix_num on t(num); #避免查询null #未使用索引 select id 阅读全文
posted @ 2022-04-30 22:30 森林深处有一道光 阅读(45) 评论(0) 推荐(0) 编辑
摘要:123.pyimport pandas as pd df=pd.read_csv('./123.csv') 打印某一列;判断某一列是否有空值 print(df['NUM_BEDROOMS']) print(df['NUM_BEDROOMS'].isnull()) dropna()中写inplace= 阅读全文
posted @ 2022-04-30 21:52 森林深处有一道光 阅读(46) 评论(0) 推荐(0) 编辑
摘要:下载numpy包 from numpy import * print(eye(4)) 打印4行4列的数组,每个数后面都有小数点,第n行第n列的数都为一,其余为0(1<=n<=4)import numpy as np import numpy as npa=np.array([1,2,3])创建一个n 阅读全文
posted @ 2022-04-19 12:16 森林深处有一道光 阅读(64) 评论(0) 推荐(0) 编辑
摘要:配置ssh免登陆 生成ssh免登陆密钥 cd ~,进入到我的home目录 cd .ssh/ ssh-keygen -t rsa (四个回车) 执行完这个命令后,会生成两个文件id_rsa(私钥)、id_rsa.pub(公钥) 将公钥拷贝到要免登陆的机器上 cat ~/.ssh/id_rsa.pub 阅读全文
posted @ 2022-04-18 20:14 森林深处有一道光 阅读(151) 评论(0) 推荐(0) 编辑
摘要:select(select count(*) from city)-count(*) from city where id<=5;这样的语句不用全表扫描,提高了效率,这条语句扫描了6次 小括号中的查询语句没有进行全表扫描,sql知道有多少行数, count(*) from city where id 阅读全文
posted @ 2022-04-18 11:55 森林深处有一道光 阅读(53) 评论(0) 推荐(0) 编辑
摘要:from lxml import etree #https://mirrors.aliyun.com/pypi/simple/ python仓库 wb_data = """ <div> <ul> <li class="item-0"><a href="link1.html">first item</ 阅读全文
posted @ 2022-04-09 21:56 森林深处有一道光 阅读(35) 评论(0) 推荐(0) 编辑
摘要:安装jdk 一、开启网络,ifconfig指令查看ip 二、修改主机名 hostnamectl set-hostname hadoop 三、查看防火墙状态并打开防火墙 1.firewall-cmd --state查看防火墙状态 2.systemctl start iptables.service打开 阅读全文
posted @ 2022-04-09 21:06 森林深处有一道光 阅读(62) 评论(0) 推荐(0) 编辑
摘要:创建存储过程的外壳 delimiter $ create procedure test(userId int) begin end $ delimiter ; 存储过程if(begin 和 end $之间) 1、声明变量username declare username varchar(32) de 阅读全文
posted @ 2022-04-09 20:41 森林深处有一道光 阅读(34) 评论(0) 推荐(0) 编辑
摘要:命令行下载jar包 pip install xxxxxx -i http://pypi.douban.com/simple --trusted-host pypi.douban.com使用上面的命令下载wheel、lxml、twisted、pywin32、scrapy五个jar包,xxxxxx内填包 阅读全文
posted @ 2022-04-03 16:26 森林深处有一道光 阅读(25) 评论(0) 推荐(0) 编辑
摘要:ssh:安全外壳协议 端口号默认是22 如果要修改,则需要修改ssh服务的配置文件 修改范围:0-65535 服务启动/终止/重启 service sshd start/stop/restart /etc/init.d/sshd start/stop/restart 获取服务器ip地址:ifconf 阅读全文
posted @ 2022-04-03 14:47 森林深处有一道光 阅读(38) 评论(0) 推荐(0) 编辑
摘要:1.创建视图 create view 视图名(视图列1,视图列2) 视图列名为中文 as select * from 表名 没有指定那一列,从第一个列名开始创建 with check option; 2.添加视图数据、删除视图、查询视图、修改视图 和表一样的用法 3.创建多表视图 create vi 阅读全文
posted @ 2022-04-03 11:55 森林深处有一道光 阅读(36) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示