编程基础
Zero_to_zero1234
Be objective
展开
-
ubuntu docker 开启ssh服务
ubuntu docker 开启ssh服务转载 2022-09-14 19:36:45 · 807 阅读 · 0 评论 -
flask搭建一个简易服务
flask搭建服务原创 2022-07-20 17:06:42 · 335 阅读 · 0 评论 -
kaldi 做 force align
kaldi原创 2022-06-29 17:23:45 · 298 阅读 · 0 评论 -
wsl2 安装pytorch异常记录
wsl2 使用pytorch原创 2022-06-27 03:21:13 · 2558 阅读 · 0 评论 -
linux上安装kaldi
linux 安装 kaldi原创 2022-06-24 13:37:00 · 1008 阅读 · 0 评论 -
使用vscode远程连接docker容器
vscode远程链接docker转载 2022-06-23 16:41:45 · 1248 阅读 · 0 评论 -
在团队中使用GitLab中的Merge Request工作模式[转载]
git merge request使用教程转载 2022-06-14 16:54:31 · 215 阅读 · 1 评论 -
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 评论 -
如何简单的使用vscode远程调试服务器端python代码
如何简单的使用vscode远程调试服务器端python代码:vscode轻量级速度很快,且通过简单的插件配置就能链接远程服务器在线调试代码。vscode拥有许多功能强大的插件,如果配置得当完全可以完美代替pycharmhttps://zhuanlan.zhihu.com/p/104514164...转载 2022-03-29 23:30:52 · 646 阅读 · 0 评论 -
python获取音频时长的方法
import librosaimport waveimport contextlibimport eyed3from pydub import AudioSegment def get_duration_mp3(file_path): """ 获取mp3音频文件时长 :param file_path: :return: """ mp3Info = eyed3.load(file_path) return mp3Info.info.tim原创 2021-12-15 10:56:50 · 12850 阅读 · 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 shell编程基础,一看就能入门
这篇博客简单清晰,超级推荐:Linux shell编程基础,一看就能入门本文摘要本文主要介绍 Linux Shell 编程的基础知识,包含下面 8 个方面:Shell 编程概述Shell 关键字Shell 变量Shell 运算Shell 语句Shell 函数Shell 调试Shell 易错点下面一一介绍。...转载 2021-02-23 14:27:14 · 133 阅读 · 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 评论 -
Linux后台运行命令nohup实现屏幕输出记录到日志文件
转自:https://blog.csdn.net/sitebus/article/details/100554789转载 2021-02-23 13:20:16 · 1014 阅读 · 0 评论 -
使用Python生成字符画
使用python包 pyfiglet就可以方便实现安装:pip install pyfiglet使用:详细参考:https://github.com/pwaller/pyfiglet原创 2021-02-02 20:52:22 · 461 阅读 · 1 评论 -
使用windows邮箱,登录微信企业邮箱
使用windows邮箱,登录微信企业邮箱参考:https://work.weixin.qq.com/help?person_id=0&doc_id=431&helpType=exmail#0811配置,进入 邮箱同步设置进入高级设置设置传出传入服务器原创 2020-09-20 19:31:36 · 3408 阅读 · 0 评论 -
Python 动态导入对象,importlib.import_module()使用
背景一个函数运行需要根据不同项目的配置,动态导入对应的配置文件运行。解决文件结构a #文件夹 │a.py │__init__.pyb #文件夹 │b.py │__init__.py ├─c#文件夹 │c.py │__init__.py# c.py 中内容args = {'a':1}class C: def c(self): pass向a模块中导入c.py 中的对象的解决方案a.pyimport importlibpara转载 2020-09-09 16:42:56 · 2357 阅读 · 0 评论 -
rsync 用法教程
http://www.ruanyifeng.com/blog/2020/08/rsync.html原创 2020-08-27 16:10:41 · 414 阅读 · 0 评论 -
Python 导入上层目录模块
Python 如何导入上层目录模块?要导入上级目录,可以借助 sys.path,把上级目录加到 sys.path 里。sys.path 作用:当使用import语句导入模块时,解释器会搜索当前模块所在目录以及sys.path指定的路径去找需要import的模块。import syssys.path.append("..")...原创 2020-07-24 10:00:04 · 1619 阅读 · 0 评论 -
Linux系统添加更换国内软件
参考自: Linux系统添加更换国内软件, 知乎: https://zhuanlan.zhihu.com/p/122214146Ubuntu的如下:1.备份sudo cp /etc/apt/sources.list /etc/apt/sources_init.list将以前的源备份一下,以防以后可以用的。2.更改文件权限使其可编辑sudo chmod 777 /etc/apt/source.list3.更换源sudo nano /etc/apt/sources.list使用na转载 2020-07-21 15:37:46 · 215 阅读 · 0 评论 -
c++耗时测试
c++耗时测试#include<time.h> using namespace std; int TestTimeCost(){ clock_t startTime,endTime; startTime = clock(); for (int i = 0; i < 1000000; i++) { i++; } endTime = clock(); cout << "Totle Time : " <<(double)(endTime -原创 2020-05-28 17:21:26 · 774 阅读 · 0 评论 -
Linux下,c++获取当前程序路径
Linux下,c++获取当前程序路径#include <stdio.h>#include <unistd.h>char *buffer;buffer = getcwd(NULL, 0);cout << "文件路径" << buffer << endl;//将需要调用的模块使用 strcat 作拼接;const char *model_path = strcat(buffer,"/models");或者:#include <原创 2020-05-28 16:26:08 · 6193 阅读 · 0 评论 -
对‘pthread_create’未定义的引用
Linux中,对‘pthread_create’未定义的引用 bug 问题解决办法:由于pthread库不是Linux系统默认的库,连接时需要使用库libpthread.a,所以在使用pthread_create创建线程时,在编译中要加-lpthread参数:gcc -o pthread -lpthread pthread.c如果还不对,很有可能是-lpthread放置的位置不对:gcc pthread.c -lpthread -o pthread...转载 2020-05-28 14:14:53 · 10453 阅读 · 4 评论 -
windows中vscode 配置 C/C++ 编译环境 教程
参考博客: https://blog.csdn.net/qq_43041976/article/details/100542557,–(2020年05月26日亲测可行)–原创 2020-05-27 01:35:58 · 532 阅读 · 0 评论 -
引用做函数的返回值
#include<iostream>#include<string>using namespace std;//引用做函数的返回值//引用的注意事项//1、不要返回局部变量的引用//2、函数的调用可以作为 左值// static c = 100;int& test01(){ int a = 10; //局部变量存放在四区中的 栈区 return a;}int& test02() //{ static in原创 2020-05-22 12:04:08 · 233 阅读 · 0 评论 -
C/C++ 中 static 的用法
C/C++ 中 static 的用法什么是static?static 是 C/C++ 中很常用的修饰符,它被用来控制变量的存储方式和可见性。1.1 static 的引入我们知道在函数内部定义的变量,当程序执行到它的定义处时,编译器为它在栈上分配空间,函数在栈上分配的空间在此函数执行结束时会释放掉,这样就产生了一个问题: 如果想将函数中此变量的值保存至下一次调用时,如何实现? 最容易想到的方法是定义为全局的变量,但定义一个全局变量有许多缺点,最明显的缺点是破坏了此变量的访问范围(使得在此函数中定义原创 2020-05-22 11:56:16 · 509 阅读 · 0 评论 -
函数的多种传参方式与区别
函数的多种传参方式与区别1、值传递,形参不会修饰实参2、地址传递,形参会修饰实参3、引用传递,形参会修饰实参#include<iostream>#include<string>using namespace std;//1、引用:给变量起别名//语法: 数据类型 &别名 = 原名//引用的注意事项//1、引用必须要初始化 int &b = a;//2、引用一旦初始化后,就不可以更改了void mySwap01(int a, int b)原创 2020-05-22 11:30:04 · 1137 阅读 · 0 评论 -
C++ 传递数组给函数
C++ 传递数组给函数:C++ 传数组给一个函数,数组类型自动转换为指针类型,因而传的实际是地址。也就是说遍历函数中数组参数,实际上是遍历实参,而且也会改变外部实参# include<iostream># include<string>using namespace std;struct Hero{ // 姓名 string name; //年龄 int age; //性别 string sex;};void原创 2020-05-21 15:24:21 · 2482 阅读 · 0 评论 -
Ubuntu18.04下配置VScode的C/C++开发环境
推荐Ubuntu16.04下配置VScode的C/C++开发环境:,亲测(2020.05.13)也可用转载 2020-05-14 18:24:36 · 6495 阅读 · 3 评论 -
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 评论 -
unicodedata文本标准化处理
https://yiyibooks.cn/xx/python_352/library/unicodedata.html原创 2020-04-16 15:49:43 · 271 阅读 · 0 评论 -
各种矩阵(向量)求导
一个准则:按照单变量求导来做,然后调整下维数就可以了。 比如 对矩阵的求导,结果一定是和矩阵维数一致才对今天早上遇到@tornadomeet在deep learning高质量群里问:一个列向量对一个列向量求导的结果,也就是下面的第一个公式:Y = A * X --> DY/DX = A’。我这才意识到矩阵里的很多知道又忘了,这些东西一旦不用,忘了就很快。矩阵和概率论的东西真心很重要,下...转载 2020-04-15 10:31:38 · 2667 阅读 · 0 评论 -
数据集加速下载
有时候在下载大的数据集时,浏览器下载速度可能比较慢,直接终端下载值得一试,往往能加快速度:wget -c https://网址加上-c的意思是断点续传。原创 2020-04-13 10:25:17 · 948 阅读 · 3 评论