Linux
Zero_to_zero1234
Be objective
展开
-
python包导入细节(attempted relative import beyond top-level package的原因解读)
先在讨论python导入问题时,先弄清楚几个重要概念和区别:一、什么是模块,什么是脚本(script vs module)二、命名(naming)三、不通过包导入访问一个模块四、相对导入…五、…只能用在相对导入当使用六、脚本不能包含相对导入七、解决办法感谢博主 小舔哥 :https://www.cnblogs.com/jiaxin359/p/7580375.html ...原创 2019-10-22 16:01:02 · 24273 阅读 · 2 评论 -
linux上安装kaldi
linux 安装 kaldi原创 2022-06-24 13:37:00 · 1008 阅读 · 0 评论 -
git基础命令
推荐入门视频:# 从服务器上clone一个repogit clone https://10.150.98.175:1990/voice/lmh_test.git #20使用ssh方式失败,使用https方式# 查看git状态git status# 添加文件使其处于被追踪状态git add text# 删除暂存区记录文件git rm --cached <file># 提交git commit -m '提交说明'# 查看精简版本信息git reflog# 输出最近2次提交原创 2022-05-12 17:47:16 · 118 阅读 · 0 评论 -
docker入门指令
docker常见指令:docker pull xxx 拉取某个镜像docker run 运行某个镜像# 列出本机正在运行的容器$ docker container ls# 列出本机所有容器,包括终止运行的容器$ docker container ls --all# 删除某个镜像docker container rm [containerID]#退出container输入:exit或者按键:Ctrl + D# 杀死containerdocker kill [cont.原创 2022-02-20 13:30:31 · 474 阅读 · 0 评论 -
.py转化为.so文件
# -*- coding: utf-8 -*-import osimport shutilfrom distutils.core import setupfrom Cython.Build import cythonizefrom librosa.util import filesfrom tensorflow.python.autograph.pyct.cfg import buildimport timehere = os.path.dirname(os.path.abspath(_原创 2021-10-26 16:14:41 · 525 阅读 · 0 评论 -
Montreal Forced Aligner (MFA)基础使用教程
1、声学模型训练https://montreal-forced-aligner.readthedocs.io/en/latest/aligning.html#trained-alignmentmfa train corpus_directory dictionary_path output_directory-t DIRECTORY--temp_directory DIRECTORYTemporary directory root to use for aligning, default is ~原创 2021-10-18 19:23:17 · 3007 阅读 · 2 评论 -
linux下rar压缩包解压
分两步:1、安装sudo apt install rar2、解压目标文件rar e xxx.rar xxxx_tmp原创 2021-09-29 16:27:05 · 259 阅读 · 0 评论 -
Ubuntu 18.04 安装 NVIDIA 显卡驱动
详细方法:https://zhuanlan.zhihu.com/p/59618999推荐最简单的方法:1.2. 开始安装如果同意安装推荐版本,那我们只需要终端输入:sudo ubuntu-drivers autoinstall 就可以自动安装了。当然我们也可以使用 apt 命令安装自己想要安装的版本,比如我想安装 340 这个版本号的版本,终端输入:sudo apt install nvidia-340 就自动安装了。安装过程中按照提示操作,除非你知道每个提示的真实含义,否则所有的提示都选择默认原创 2021-09-09 14:31:57 · 256 阅读 · 0 评论 -
【Ubuntu】Ubuntu 18.04 LTS 更换国内源——解决终端下载速度慢的问题
https://zhuanlan.zhihu.com/p/61228593转载 2021-09-09 12:43:44 · 375 阅读 · 0 评论 -
Linux 常用命令学习
Linux 常用命令学习 (https://www.runoob.com/w3cnote/linux-common-command-2.html)转载 2021-04-15 20:01:25 · 196 阅读 · 0 评论 -
linux查看进程启动时间和运行时间
转载: https://blog.csdn.net/alibert/article/details/54800037ps -eo lstart 启动时间ps -eo etime 运行多长时间.ps -eo pid,lstart,etime | grep 5176转载 2021-04-15 19:59:39 · 451 阅读 · 0 评论 -
【python3基础】命令行参数及 argparse
【python3基础】命令行参数及 argparse转自:https://www.cnblogs.com/wuliytTaotao/p/11795011.html在使用 argparse 解析 bool 参数时,需要设定 add_argument 的 action 参数为 ‘store_true’ 或者 ‘store_false’,而不是设定 type 参数为 bool,具体原因是,如果设定 type=bool,那么无论该参数传 True 还是 False,最后都只能得到 True。【这设定反人类】命原创 2021-02-23 14:16:58 · 349 阅读 · 0 评论 -
使用Python生成字符画
使用python包 pyfiglet就可以方便实现安装:pip install pyfiglet使用:详细参考:https://github.com/pwaller/pyfiglet原创 2021-02-02 20:52:22 · 461 阅读 · 1 评论 -
python多张PNG生成GIF动图
安装:pip install imageio具体代码import osimport imageio def create_gif(image_list, gif_name): frames = [] for image_name in image_list: if image_name.endswith('.png'): print(image_name) frames.append(imageio.imrea原创 2020-12-31 12:25:12 · 939 阅读 · 2 评论 -
Linux查看文件和文件夹大小
查看目前所有文件系统的可用空间及使用情形df -h2. 查看文件或文件夹的磁盘使用空间du -h --max-depth=1 your_dest_dirdu -h --max-depth=1 .原创 2020-11-18 11:18:09 · 203 阅读 · 0 评论 -
使用jupyter notebook链接服务器后,打不开 wav的一个简单解决办法
使用jupyter notebook链接服务器后,打不开 wav 怎么办:进入配置文件vim ~/.jupyter/jupyter_notebook_config.py修改jupyter notebook --NotebookApp.disable_check_xsrf=True以上可能有效原创 2020-09-16 15:33:41 · 451 阅读 · 0 评论 -
windows中vscode 配置 C/C++ 编译环境 教程
参考博客: https://blog.csdn.net/qq_43041976/article/details/100542557,–(2020年05月26日亲测可行)–原创 2020-05-27 01:35:58 · 532 阅读 · 0 评论 -
profile、bash_profile、bashrc文件的作用与区别
转载 2020-05-11 16:13:30 · 175 阅读 · 0 评论 -
解决搜索路径的问题 (Command not found)
解决搜索路径的问题 (Command not found)转载 2020-05-09 12:02:43 · 702 阅读 · 0 评论 -
从零搭建深度学习环境
按照此博客: https://blog.csdn.net/qq_15192373/article/details/81091098原创 2020-04-24 16:33:09 · 330 阅读 · 0 评论 -
linux查看svn用户名和密码
原文链接:https://blog.csdn.net/download_73/article/details/52350851在linux中,有时忘记自己的svn的用户名和密码,可以这样查看。cd cd ~/.subversion/auth/svn.simple在这个目录下可以看到类似a2dc58b7668dba51b692081cc32ac86e的文件vim打开这样的文件就可以看到用户名...转载 2020-04-24 15:34:50 · 3794 阅读 · 0 评论 -
ubuntu系统下matplotlib中文乱码问题
ubuntu系统下matplotlib中文乱码问题:https://blog.csdn.net/jeff_liu_sky_/article/details/54023745#commentBox补充:1、获取matplotlibrc文件所在路径。在jupyter notebook中获取import matplotlibmatplotlib.matplotlib_fname()...转载 2020-04-22 12:09:30 · 207 阅读 · 0 评论 -
数据集加速下载
有时候在下载大的数据集时,浏览器下载速度可能比较慢,直接终端下载值得一试,往往能加快速度:wget -c https://网址加上-c的意思是断点续传。原创 2020-04-13 10:25:17 · 948 阅读 · 3 评论 -
memory_profiler的使用
转载一篇清晰的博客:https://www.cnblogs.com/rgcLOVEyaya/p/RGC_LOVE_YAYA_603days_1.html转载 2020-04-08 15:58:48 · 496 阅读 · 0 评论 -
conda安装的国内镜像配置,实现快速下载
anaconda的所有的软件包全部在国外,安装起来很麻烦,关键是下载速度慢,而且经常中断,所以需要配置国内安装的镜像,下载速度就很快了。一、conda换国内源1.1 查看源命令conda config --show-sources显示结果==> /home/xxx/.condarc <==channels:- https://mirrors.tuna.tsinghu...转载 2020-03-26 18:16:53 · 13163 阅读 · 2 评论 -
pycharm远程服务器
转自: https://www.jianshu.com/p/4b3749f159f7转载 2020-03-24 21:37:08 · 162 阅读 · 0 评论 -
命令行下 svn 设置externals
svn propedit svn:externals . --editor-cmd vim原创 2020-03-24 17:49:12 · 850 阅读 · 0 评论 -
Linux安装NVIDIA显卡驱动的正确姿势
Linux安装NVIDI[A显卡驱动的正确姿势]01. Ubuntu下安装nvidia显卡驱动(安装方式简单)转载 2019-12-01 12:31:45 · 1649 阅读 · 0 评论 -
解决windows的zip压缩包在linux下解压后中文乱码问题
最近项目上碰到在windows上压缩了一些图片,图片文件名称都是中文的,scp到linux下用unzip解压后文件名全是乱码,找了半天解决方案,下面这个亲测可行,特记录一下,与大家分享:原因:由于zip在压缩时并没有指定编码格式,Windows下生成的zip文件中的编码是GBK/GB2312等,而Linux下的默认编码是UTF8因此,导致这些zip文件在Linux下解压时出现中文乱码问题。...原创 2019-06-04 11:42:42 · 6750 阅读 · 1 评论 -
Linux下怎么安装 .deb 和 .rpm文件
linux系统下怎么安装.deb文件?deb 是 ubuntu 、debian 的格式。rpm 是 redhat 、fedora 、suse 的格式。他们不通用(虽然可以转换一下)。deb是debian发行版的软件包ubuntu是基于debian 发行的 所有可以用.deb是solaris系统下的安装包后缀名。安装方法如下cd 到安装包的目录dpkg -i 安装包名字如果你使用的...转载 2019-11-05 16:28:41 · 1583 阅读 · 0 评论 -
Linux下SVN客户端使用教程(全)
转自: https://blog.csdn.net/qq_27968607/article/details/552539971、Svn介绍SVN全名Subversion,即版本控制系统。SVN与CVS一样,是一个跨平台的软件,支持大多数常见的操作系统。作为一个开源的版本控制系统,Subversion管理着随时间改变的数据。这些数据放置在一个中央资料档案库(repository)中。这个档案库很...转载 2019-04-11 14:32:08 · 8106 阅读 · 0 评论 -
自定义tmux指令的conf参数配置
记录一下自己的.tmux.conf,.vimrc~/.tmux.confset -g default-terminal "screen-256color"set -g prefix C-abind C-a send-prefixunbind C-bbind r source-file ~/.tmux.conf \; display "Reloaded!"set -g base-ind...原创 2019-04-08 18:44:08 · 1768 阅读 · 0 评论 -
conda创建、查看、删除虚拟环境
conda 创建、查看虚拟环境原创 2019-04-23 15:02:40 · 251567 阅读 · 8 评论 -
tensorflow/keras 运行中报错Check failed: module != nullptr( 已放弃 (核心已转储)) 的解决方法
出现报错:/cuda_gpu_executor.cc:881] Check failed: module != nullptr的推荐几个解决方法:https://blog.csdn.net/qq_38813668/article/details/86517195我是采用下面博客中的方法安装了 tf-nightly 解决的问题https://blog.csdn.net/njzhuming/...原创 2019-04-18 16:29:32 · 3449 阅读 · 0 评论 -
Linux常用命令操作
转载自: https://www.cnblogs.com/gaojun/p/3359355.htmlLinux常用命令学习1、ls命令 就是list的缩写,通过ls 命令不仅可以查看linux文件夹包含的文件,而且可以查看文件权限(包括目录、文件夹、文件权限)查看目录信息等等 常用参数搭配: ls -a 列出目录所有文件,包含以.开始的隐藏文件 ...转载 2019-05-10 10:38:29 · 210 阅读 · 0 评论 -
vim 常用命令总结
转自: https://www.cnblogs.com/yangjig/p/6014198.html vim常用命令总结 (转) 在命令状态下对当前行用== (连按=两次), 或对多行用n==(n是自然数)表示自动缩进从当前行起的下面n行。你可以试试把代码缩进任意打乱再用n==排版,相当于一般IDE里的code forma...转载 2019-05-10 11:07:46 · 308 阅读 · 0 评论 -
查看python安装路径以及pip安装的包列表及路径
查看python安装路径以及pip安装的包列表及路径,可查看:https://blog.csdn.net/sinat_29158315/article/details/81813556转载 2019-05-13 16:58:25 · 434 阅读 · 0 评论 -
python代码实现对CPU、GPU资源状态的监控
更加具体的细节,参照前面两篇:https://blog.csdn.net/suiyueruge1314/article/details/94383265https://blog.csdn.net/suiyueruge1314/article/details/94402314以下为代码import pandas as pdimport GPUtilimport timeimport p...原创 2019-07-02 10:10:13 · 7358 阅读 · 1 评论 -
Python获取并输出当前日期时间
取得时间相关的信息的话,要用到python time模块,python time模块里面有很多非常好用的功能,你可以去官方文档了解下,要取的当前时间的话,要取得当前时间的时间戳,时间戳好像是1970年到现在时间相隔的时间。你可以试下下面的方式来取得当前时间的时间戳:import timeprint time.time()输出的结果是:1357723206.31但是这样是一连串的数...原创 2019-07-02 10:54:12 · 622 阅读 · 0 评论 -
Linux 及 VIM 常用命令
Linux是目前应用最广泛的服务器操作系统,基于Unix,开源免费,由于系统的稳定性和安全性,市场占有率很高,几乎成为程序代码运行的最佳系统环境。linux不仅可以长时间的运行我们编写的程序代码,还可以安装在各种计算机硬件设备中,如手机、路由器等,Android程序最底层就是运行在linux系统上的。一、linux的目录结构bin (binaries)存放二进制可执行文件sbin (su...原创 2019-08-02 10:39:09 · 162 阅读 · 0 评论