- 博客(58)
- 收藏
- 关注
原创 更改anaconda自带的jupyter的工作目录
打开jupyter_notebook_config.py配置文件, 搜索notebook_dir,去掉注释,修改成具体的你创建的路径文件,例如c.NotebookApp.notebook_dir = r'D:\\jupyter_work_place'生成jupyter 配置文件,会显示配置文件的具体目录,一般默认是在 C:\Users\admin\.jupyter\jupyter_notebook_config.py。点击Anaconda Prompt。
2023-07-27 17:25:03 800
原创 WeNet的Runtime编译与应用
下载:百度输入 visual studio 官网,下载 visual studio并安装,安装完要配置环境变量,即把cmake路径配置进去环境配置:将C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin配置到环境变量配置完打开终端,输入cmake。
2023-07-05 15:44:31 1710 2
原创 wenet-基于预训练模型进行增量训练
将本地准备好的F:/wenet数据集/0529_0531_merge/chuli下的train、dev、test中的text、wav.scp两个文件分别拷贝到远程/hy-tmp/wenet/examples/aishell/s0/data下对应的train、dev、test文件夹下。将准备好的数据文件0529_0531_dataset,上传到恒源云上的/hy-tmp/wenet/examples/aishell/s0下。其中0529_0531_dataset是前面上传的训练数据文件夹。
2023-06-02 00:09:03 2465
原创 jupyter 显示目录导航
启动Jupyter Notebook ,点选nbextensions,勾选Table of Contents。若找不到Table of Contents,可以搜索。
2023-05-20 21:28:21 1155
原创 conda 常用命令
创建一个名为env_name的虚拟环境,并指定python版本为3.8,且不需要询问(yes or no),直接创建。在不指定python版本时,自动创建基于最新python版本的虚拟环境。创建后,env_name文件可以在。退出虚拟环境,回到base环境。
2023-04-10 16:09:32 1201
原创 报错:CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team.
或者升级python3.9 ,高版本的python可以兼容这些冲突。原因:此时版本python 3.6;解决办法:降版本,降Cryptography至3.4.8,就可以正常运行;先查看已经安装的Cryptography版本。
2022-11-14 19:46:15 17967 3
原创 Redis离线安装(内网,源码安装)
修改第19行的配置,修改为自己手动启动redis时,使用的redis.conf文件的路径。(本次安装包是放root下,解压后也没有重命名为redis,建议一开始解压的时候,解压到/etc/redis,本次的redis.conf文件的路径为/root/redis-5.0.5/redis.conf)最后在启动redis就可以远程连接redis了(在src目录执行./redis-server …检查一下redis.conf文件是否设置成了守护进程,没有的话设置为守护进程,然后保存退出。// 查看防火墙开放端口。
2022-11-14 19:26:35 3501 1
原创 mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such f
输入mysqld --initialize;报错内容如下:mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory解决方法:yum install -y libaio
2022-07-08 17:46:21 1713
原创 L2X源码运行前修改内容
修改1: utils.py 一处地方改成import pickle修改2:explain.py的地方 import tensorflow as tf 改成 import tensorflow.compat.v1 as tf
2022-05-19 21:02:01 949
原创 original_keras_version = f.attrs[‘keras_version‘].decode(‘utf8‘) AttributeError: ‘str‘ object has no
原因:在安装tensorflow时,默认安装h5py为3.1.0,而报错是因为你安装的TF不支持过高版本的h5py。解决办法:卸载h5py ,安装更低版本pip uninstall h5pypip install h5py==2.10.0
2022-05-18 09:50:43 1452
原创 AttributeError: module ‘tensorflow‘ has no attribute ‘set_random_seed‘
TensorFlow版本兼容问题因此为了解决这个问题,必须把import tensorflow as tf改成:import tensorflow.compat.v1 as tf
2022-05-17 22:48:53 3116 1
原创 AttributeError: module ‘pandas‘ has no attribute ‘core‘
解决方法:版本问题pip uninstall pandaspip install pandas==0.22 -i -i https://pypi.tuna.tsinghua.edu.cn/simple
2022-05-17 22:40:01 1002
原创 springboot整合mybatis
导入Mybatis响应jar版本包(jar、springboot-mybatis-start.jar) 数据源信息(driver\url\username\password),放全局配置文件JDK版本:1.8第一步:配置pom.xml,导入mybatis (springboot+mybatis的jar)、mysql-driver驱动<dependency> <groupId>org.mybatis.spring.boot</groupId>
2022-05-12 16:47:31 1302
原创 win10 安装TensorFlow和keras
1.安装前先查看两者对应的版本(很重要,否则会遇到一些错误)2、安装命令pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --user tensorflow==2.1.0pip install -i https://pypi.douban.com/simple/ keras==2.3.13.查看安装后的版本>>> import tensorflow as tf>>>
2022-05-06 16:03:28 1056
原创 pip安装包时,指定源(镜像)
pip国内的一些镜像 阿里云 http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 豆瓣(douban) http://pypi.douban.com/simple/ 清华大学 https://pypi.tuna.tsinghua.edu.cn/simpl...
2020-11-25 17:11:01 718
原创 ubuntu pycharm 桌面快捷键
每次启动pycharm,都得到bin目录下运行 ./pycahrm.sh不方便,添加桌面快捷键1、sudo gedit /usr/share/applications/Pycharm.desktop2、文件中内容Exec和Icon要改成自己的路径[Desktop Entry]Type=ApplicationName=PycharmGenericName=Pychar...
2019-06-25 16:59:30 1196 1
原创 win创建python虚拟环境
pip3 install virtualenvpip3 install virtualenvwrapper-winpip install virtualenvpip install virtualenvwrapper-win1、创建目录,例如virtualenvs,用于存放所有的虚拟环境,配置电脑环境变量 新建系统变量,变量名:WORKON_HOME,路径自行选择,此处为:D:...
2019-04-13 20:18:59 589
原创 postman使用cookie
1、添加域名比如http://192.168.0.250:8000/XX/XX/?page_num=1&page_size=2则域名为:http://192.168.0.250:80002、用户登录3、之后该域名的所有访问都有用户登录的信息,也就是session的值...
2019-04-12 16:41:32 621
原创 pip install mysql-python报错 error: Microsoft Visual C++ 14.0 is required.
1、下载.whl文件,手动安装即可解决下载网址:https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python安装命令:pip install mysqlclient-1.4.2-cp36-cp36m-win_amd64.whl
2019-03-19 17:08:03 467
原创 对字典按照values排序
dict_feature:{'C': 116.31261309207014, 'B': 3.7107283035324987, 'A': 10.817820878494006, 'D': 67.04836020011113}ls = sorted(dict_feature.items(),key=lambda item:item[1],reverse=True)ls:<class ...
2019-02-16 21:42:53 567
原创 zip同时遍历两个列表
X_df.columns.values : ['A' 'B' 'C' 'D']chi2:[ 10.81782088 3.7107283 116.31261309 67.0483602 ]for i,j in zip(X_df.columns.values,chi2): dict_feature[i]=j
2019-02-16 21:37:18 636
原创 pycharm快速提示函数参数和使用的方法,非常好用
参考博客:https://www.cnblogs.com/wendj/archive/2018/09/21/9685012.html第三步:鼠标放到函数名,按住ctrl即可查看
2018-12-05 16:49:14 73229 7
原创 pycharm无法使用svn
使用svn报错如下:Can't use Subversion command line client: svnProbably the path to Subversion executable is wrong. Fix it. Errors found while svn working copies detection. Fix it.重装了 Tortoise也不行,发现...
2018-11-29 14:40:59 1289
原创 crontab的基本使用
1、查看日志和程序运行情况tail -f /var/spool/mail/roottail -f /var/log/cron.log 2、查看所有定时器crontab -l 3、删除指定的定时器命令行输入 crontab -e假设多个任务,在vim中删除指定的定时任务(光标移到要删除的配置行,按delete键删除)按:wq!保存并退出查看是否删除了任务...
2018-11-23 19:26:46 197
原创 mongodb distinct 内存报错解决方法
比如要对名字字段name进行distinct db.XX.distinct('name')报错如下: [main] Error: distinct failed: { "ok" : 0, "errmsg" : "distinct too big, 16mb cap", "code" : 17217, "codeName" : "Locati.
2018-11-18 16:30:52 2160
原创 pycharm中,python console无法使用
显示 cannot start process,无法使用python console解决如下:修改console对应的工作目录为当前项目的工作目录右击当前项目,点击“copy path”黏贴到任意地方,即可知道当前的工作目录...
2018-11-18 15:37:06 13496 2
原创 删除指定的crontab任务
命令行输入 crontab -e假设多个任务,在vim中删除指定的定时任务(光标移到要删除的配置行,按delete键删除)按:wq!保存并退出查看是否删除了任务crontab -l发现没有那个定时任务,删除成功...
2018-11-12 21:20:58 27268
原创 mongodb 查询大于某个字符串数值
如果数据库中某个字段存的是字符串数值,比如time,取值为‘233.3’,'45.6'......等,你想查询time > '300',怎么办? 错误做法:db['表名'].find({'time':{'$gt':300}})db['表名'].find({'time':{'$gt':‘’300‘’}}) 正确做法:db['表名'].find({'$where':'...
2018-11-09 17:22:26 6981
原创 pycharm设置新建文件.py的模板
file->Editor->file and code templates->python script->编辑自己的模板如下图所示,显示自己的名字和创建文件的时间
2018-09-30 09:57:11 1635
原创 pandas 数据框添加一行,字典
1、切记重新赋值,否则添加不成功2、设置ignore_index=Truex = pd.DataFrame()event = {}event['a'] = 2event['b'] = 3x = x.append(event,ignore_index=True)
2018-09-28 14:08:36 7554 1
原创 mongodb去重重复记录
一、mongdb的分组统计基础知识推荐以下博客 https://blog.csdn.net/congcong68/article/details/51619882 其中$addToSet 类似pandas的unique$push 类似map(lambda x: list(x))https://blog.csdn.net/yaomingyang/article/deta...
2018-09-28 10:05:55 2549
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人