笔记
文章平均质量分 57
rachelnew1900
这个作者很懒,什么都没留下…
展开
-
使用pyinstaller 打包成可执行程序
使用pyinstaller打包可执行程序的相关步骤及官方文档链接原创 2022-10-11 12:42:30 · 378 阅读 · 0 评论 -
【已解决】pyinstaller打包的app闪退
解决mac 及windows系统下,使用pyinstaller打包可执行程序闪退的问题原创 2022-10-11 12:41:23 · 1092 阅读 · 0 评论 -
【笔记】python函数中指定输入和输出格式
def foo() - > int : # foo 的返回值为int类a : str # a的类型为str。原创 2022-09-06 16:06:26 · 980 阅读 · 1 评论 -
【笔记】python中用def __repr__(self)为类定义输出格式
在 Python 中,可以通过在类中定义__repr__() 方法来指定一个对象的文本表述。函数,类创建后,当创建Robot实例时,打印一个Robot对象时,__repr__()方法会被自动调用,文本表示会显示在控制台。原创 2022-09-06 15:40:55 · 1082 阅读 · 0 评论 -
【笔记】pyinstaller 封装含GUI的背景图及软件icon
如果希望将图片共同打包,需将原直接调用图片的路径改为相对路径。在希望为app 捆绑数据文件时,可以通过更改*.spec文件实现原创 2022-08-27 21:55:36 · 1254 阅读 · 0 评论 -
为conda 创建的虚拟环境定义python 版本
系统python 版本为3.8.5使用conda 创建Python==3.7.12的环境tensorflow1后,调用时仍为3.8.5。(tensorflow1) Rachel1900 (master #) ~$ which python/Users/Rachel1900/anaconda3/envs/tensorflow1/bin/python#路径正确(tensorflow1) Rachel1900 (master #) ~$ python --versionPython 3.8.5#原创 2022-05-09 14:46:34 · 835 阅读 · 0 评论 -
AttributeError: module ‘enum‘ has no attribute ‘IntFlag‘
使用pyinstaller 封装时报错:AttributeError: module 'enum' has no attribute 'IntFlag'pre-safe-import-module hook failed, needs fixing.原创 2022-03-13 12:51:39 · 1671 阅读 · 0 评论 -
mac上用pyinstaller 生成exe无法实现
多次尝试均失败,查找stackoverflow ,回答同为无法实现pyinstaller generate exe on mac原创 2022-03-13 12:46:50 · 842 阅读 · 0 评论 -
git- git diff & git ignore
git diffgit diff 命令可以用来查看已被加入但是尚未提交的更改。$ git diff此命令会显示:已经修改的文件添加/删除的行所在的位置执行的实际更改git log -p 其实就是在后台使用了 git diffgitignore如果想将某个文件保留在项目的目录结构中,但是确保它不会意外地提交到项目中,可以使用名称特殊的文件 .gitignore(注意文件名开头的点,很重要!)。将此文件添加到 new-git-project项目根目录。将需要ignore 的文件添加翻译 2021-08-06 15:37:05 · 236 阅读 · 0 评论 -
git 终端配置mac(udacity)
安装 GitMac OS 实际上已经安装了 Git,但可以重新安装,以便使用最新的版本:转到 https://git-scm.com/downloads下载 Mac 版软件安装 Git 并选择所有默认选项安装完毕后,在命令行工具中运行 git。如果显示了使用信息,则一切正常配置将下载的目录 udacity-terminal-config 移到主目录下,并命名为.udacity-terminal-config(注意前面有个点)将 bash_profile 文件移到你的主目录下,并命名原创 2021-08-06 10:57:33 · 552 阅读 · 0 评论 -
git版本控制【2】- git add & git commit
1.暂存 git addgit add 命令用于将文件从工作目录移到暂存区。$ git add <file1> <file2> … <fileN>此命令:可接受多个文件名(用空格分隔)此外,可以使用句点 . 来代替文件列表,告诉 git 添加当前目录至暂存区(以及所有嵌套文件)暂存剩余的文件$ git add .句点.句点指代当前目录,可以用来表示所有文件和目录(包括所有嵌套文件和目录!) ```bash $ git add cs原创 2021-08-06 15:06:58 · 198 阅读 · 0 评论 -
git 版本控制- git log 相关命令
terminal 命令ls - 用来列出文件和目录mkdir - 用来新建目录cd - 用来更改目录rm - 用来删除文件和目录git loggit log 命令用于显示仓库中所有 commit 的信息。$ git log默认情况下,该命令会显示仓库中每个 commit 的:SHA作者 author日期 data消息 commitgit 使用命令行分页器 less 浏览所有信息。less 的重要快捷键要按行向下滚动,使用 j 或 ↓要按行向上滚动,使原创 2021-08-06 14:25:57 · 2155 阅读 · 0 评论 -
【已解决】pandas_reindex 将dataframe中的值转为里nan
问题:需要重新定义dataframe的index,使用reindex后原dataframe的值全部变为nandf.reindex(index_list)原因分析:参考official docConform Series/DataFrame to new index with optional filling logic.Places NA/NaN in locations having no value in the previous index. A new object is produ原创 2020-12-29 09:46:28 · 2382 阅读 · 3 评论 -
imutils简介
imutils简介pypi.org/project/imutilsimutils是Adrian Rosebrock开发的一个python工具包,它整合了opencv、numpy和matplotlib的相关操作,主要是用来进行图形图像的处理,如图像的平移、旋转、缩放、骨架提取、显示等等,后期又加入了针对视频的处理,如摄像头、本地文件等。imutils同时支持python2和python3。pip3 install imutils -i http://pypi.douban.com/simple --tr原创 2020-12-24 23:23:53 · 5249 阅读 · 0 评论 -
【解决】nltk.download()报错:errno54: connection reset by peer
报错详情>>> nltk.download('')[nltk_data] Error loading : <urlopen error [Errno 54] Connection reset[nltk_data] by peer>解决方案离线安装NLTK Data文件1.下载NLTK DataGithub https://github.com/nltk/nltk_data/tree/gh-pages 下载得到nltk_data-gh-pages.zip原创 2020-12-24 23:23:00 · 1599 阅读 · 1 评论 -
python--nltk库预处理德语文本
标准化文本:import nltkfrom nltk.corpus import stopwordsset(stopwords.words('german'))德语停止词:NLTK词形还原(Lemmatization)NLTK用法总结原创 2020-12-24 11:19:46 · 1461 阅读 · 4 评论 -
使用python 调用MoviePy制作GIF动图
MoviePyMoviePy (full documentation) is a Python library for video editing: cutting, concatenations, title insertions, video compositing (a.k.a. non-linear editing), video processing, and creation of custom effects. See the gallery for some examples of us原创 2020-12-22 18:27:37 · 1782 阅读 · 1 评论 -
tkinter-protocol-创建销毁窗口
WM_DELETE_WINDOW除事件绑定外,Tkinter还支持一种称为协议(protocol-)处理程序的机制。 协议是指应用程序与窗口管理器之间的交互。 最常用的协议称为WM_DELETE_WINDOW用于定义当用户使用窗口管理器显式关闭窗口时发生的情况。可以使用协议方法来为此协议安装处理程序(小部件必须是根或顶级插件):widget.protocol("WM_DELETE_WINDOW", handler)一旦定义了自己的处理程序handler,Tkinter将不再自动关闭窗口。 相反,翻译 2020-11-22 18:48:30 · 10140 阅读 · 0 评论 -
日志-码6
今日资讯:1. Online program &课程CourseraPenn MCIT Online courseApply● A bachelor’s degree from an accredited school or university. While there is no specific undergraduate GPA requirement, successful applicants typically have a GPA above 3.0● A pers原创 2020-10-24 11:43:57 · 360 阅读 · 0 评论