编写sh脚本,内容如下 mkdir -p /home/wwwroot/auto-backup # 导出指定数据库 mysqldump -uroot -proot blog > /home/www
分类归档:学习笔记
推荐一个docker的镜像加速器
推荐使用DAOcloud的加速镜像(https://www.daocloud.io/mirror#accelerator-doc) 直接执行 curl -sSL https://get.daoclou
spark、scala、hadoop环境搭建笔记
hadoop-2.6.5 scala-2.10.5 spark-1.6.2 IDEA intellj intellj scala插件 SSH免密登录 ssh-keygen touch authoriz
python判断当前时间是否在某个时间段里
def in_time_range(ranges): now = time.strptime(time.strftime(“%H%M%S”),”%H%M%S”) ranges = ranges.spl
python使用threadpool库抛异常can’t start new thread
写了个数据同步的工具跑了一晚上,第二天起来发现一堆异常 can’t start new thread 猜想是python创建的线程过多导致无法创建新的线程,因为操作系统的每个进程能开启的线
Python类方法的装饰器中传入类变量
之前我是这样写的 def my_decorator(arg): print(arg) def new_func(self): print(“my name is ” + arg) return new
azure的ftp服务能登陆但获取不到目录
原因:azure不能开放全部端口,而ftp的被动模式会随机打开一个1024以上的端口 解决方案:ftp连接模式把被动模式改为活动模式(主动模式),打开20端口
mongoDB修改字段类型:string转decimal
将test表中的num_string字段从String转换到decimal: db.test.find().forEach(function(x){x.num_string=NumberDecimal
Intellij IDEA+spark开发环境搭建笔记
准备工具:jdk1.8 Intellij IDEA scala2.10.5 hadoop2.6.5 spark1.6.2 IDEA配置步骤: 1.添加JDK1.8 2.安装scala插件 3.
解决cryptography包windows下安装失败的问题
pip安装cryptography时报错: “error: command ‘D:\\development\\vs\\VC\\BIN\\cl.exe’ failed with