新工作遇到的坑
yihong0618 opened this issue · comments
2019.10.10
- 虚拟环境 激活 source bin/activate 反激活 deactivate
python 版本不同在 pip 上会有很多问题 , 在公司开发一定关注python版本
django 启动 --settings=a.b.c
csv 写文件避免空行
open(csv_file_path + os.sep + csv_name, "w", newline="")
windows docker 双斜杠
docker run -d --name myredis -p6379:6379 -v //c/dockerdata/redis/data:/data de25a81a5a0b --appendonly yes
git ls-remote ~~~~.git列举所有远程分支
if [[ " ${array[@]} " =~ " ${value} " ]]; then
# whatever you want to do when arr contains value
fi
if [[ ! " ${array[@]} " =~ " ${value} " ]]; then
# whatever you want to do when arr doesn't contain value
fi
django 启动线程的话,会有连接不关闭的现象
https://zkkmin.com/2018/05/11/database-connection-leak-while-using-threads-in-django/