Skip to content

Instantly share code, notes, and snippets.

@bluesmilery
bluesmilery / s3_python_client.py
Created March 17, 2020 03:58
[s3_python_client] #s3
View s3_python_client.py
# -*- coding: utf-8 -*-
# ===============================================================
#
# @Create Author : bluesmilery
# @Create Time : 2019/11/25 15:51
# @Description : S3客户端
#
# ===============================================================
@bluesmilery
bluesmilery / helm.sh
Created December 21, 2018 04:43
helm
View helm.sh
# 删除release(使用helm list -a还能看到)
helm delete xxx
# 彻底删除release
helm delete --purge xxx
@bluesmilery
bluesmilery / create_virtual_env.sh
Last active May 23, 2021 05:36
[create_virtual_env] Used to create a Anaconda virtual environment for CUDA and TensorFlow. If you want to use this shell script, please read the blog. https://bluesmilery.github.io/blogs/a687003b/
View create_virtual_env.sh
#!/bin/bash
# Used to create a Anaconda virtual environment for CUDA and TensorFlow.
# If you want to use this shell script, please read the blog.
# https://bluesmilery.github.io/blogs/a687003b/
echo ""
echo "This script is used to create a Anaconda virtual environment for CUDA and TensorFlow."
echo ""
read -p "Enter the name of Anaconda virtual environment: " ENV_NAME
@bluesmilery
bluesmilery / docker.sh
Last active April 11, 2019 08:43
docker
View docker.sh
# 启动docker daemon
service docker start
# 重启docker daemon
service docker restart
# 搜索远程库中的镜像
docker search xxx
# 下载镜像
docker pull xxx
# 上传镜像
@bluesmilery
bluesmilery / spark
Created September 20, 2018 02:57
spark
View spark
# 组合开启spark历史日志可在spark ui中查看
spark.eventLog.enabled true
spark.eventLog.dir hdfs://nn-cluster/user/strategy/sparklog1.6
spark.history.fs.logDirectory hdfs://nn-cluster/user/strategy/sparklog1.6
spark.history.fs.cleaner.enabled true
@bluesmilery
bluesmilery / hive
Last active December 5, 2018 04:55
hive
View hive
# 表名为TA
# 克隆表,不带数据
create table TA_like like TA
# 将本地文件导入表中
load data local inpath '/local/path' into table TA;
# 查看建表语句
show create table TA
@bluesmilery
bluesmilery / vim
Last active September 26, 2018 08:21
vim
View vim
# 取消高亮
:noh
# 显示行号
:set nu
# 复制模式
:set paste
# 显示分隔符等特殊符号
@bluesmilery
bluesmilery / shell_code.sh
Last active December 28, 2018 04:00
shell
View shell_code.sh
# 获取当前系统时间
date "+%Y-%m-%d %H:%M:%S"
# 查看CentOS系统版本
cat /etc/redhat-release
# 查看Linux系统版本(更通用)
cat /etc/issue
# 查看内核版本