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
阅读全文
摘要:#避免全表扫描 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
阅读全文
摘要:123.pyimport pandas as pd df=pd.read_csv('./123.csv') 打印某一列;判断某一列是否有空值 print(df['NUM_BEDROOMS']) print(df['NUM_BEDROOMS'].isnull()) dropna()中写inplace=
阅读全文
摘要:下载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
阅读全文
摘要:配置ssh免登陆 生成ssh免登陆密钥 cd ~,进入到我的home目录 cd .ssh/ ssh-keygen -t rsa (四个回车) 执行完这个命令后,会生成两个文件id_rsa(私钥)、id_rsa.pub(公钥) 将公钥拷贝到要免登陆的机器上 cat ~/.ssh/id_rsa.pub
阅读全文
摘要:select(select count(*) from city)-count(*) from city where id<=5;这样的语句不用全表扫描,提高了效率,这条语句扫描了6次 小括号中的查询语句没有进行全表扫描,sql知道有多少行数, count(*) from city where id
阅读全文
摘要: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</
阅读全文
摘要:安装jdk 一、开启网络,ifconfig指令查看ip 二、修改主机名 hostnamectl set-hostname hadoop 三、查看防火墙状态并打开防火墙 1.firewall-cmd --state查看防火墙状态 2.systemctl start iptables.service打开
阅读全文
摘要:创建存储过程的外壳 delimiter $ create procedure test(userId int) begin end $ delimiter ; 存储过程if(begin 和 end $之间) 1、声明变量username declare username varchar(32) de
阅读全文
摘要:命令行下载jar包 pip install xxxxxx -i http://pypi.douban.com/simple --trusted-host pypi.douban.com使用上面的命令下载wheel、lxml、twisted、pywin32、scrapy五个jar包,xxxxxx内填包
阅读全文
摘要:ssh:安全外壳协议 端口号默认是22 如果要修改,则需要修改ssh服务的配置文件 修改范围:0-65535 服务启动/终止/重启 service sshd start/stop/restart /etc/init.d/sshd start/stop/restart 获取服务器ip地址:ifconf
阅读全文
摘要:1.创建视图 create view 视图名(视图列1,视图列2) 视图列名为中文 as select * from 表名 没有指定那一列,从第一个列名开始创建 with check option; 2.添加视图数据、删除视图、查询视图、修改视图 和表一样的用法 3.创建多表视图 create vi
阅读全文