摘要: 1. mysql.connector Python version (8.0) can connect to MySQL Server version 8.0, 5.7, 5.6, and 5.5, can not connect to MySQL Server version 5.1 2. pym 阅读全文
posted @ 2018-11-09 16:31 andy_0212 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 服务器客户要求使用linux,未了操作方便,于是考虑如何使用可视化界面操作,以下是使用CentOS7安装GNOME可视化界面流程的步骤总结和归纳: 1:使用Xshell或jutty等连接工具进入系统(默认用户名root) 2:执行命令安装 Gnome 包 $sudo yum groupinstall 阅读全文
posted @ 2018-10-24 09:58 andy_0212 阅读(2329) 评论(0) 推荐(0) 编辑
摘要: How to select rows from a DataFrame based on column values ... o select rows whose column value equals a scalar, some_value, use ==: df.loc[df['column 阅读全文
posted @ 2019-12-05 15:22 andy_0212 阅读(595) 评论(0) 推荐(0) 编辑
摘要: Check if program runs in Debug mode 用以下函数即可: def is_debug(): gettrace = getattr(sys, 'gettrace', None) if gettrace is None: return False elif gettrace 阅读全文
posted @ 2019-11-21 15:02 andy_0212 阅读(691) 评论(0) 推荐(0) 编辑
摘要: Git: Temporarily revert to previous commit If you want to go back to a previous commit, while keeping all of your other history, simply checkout that 阅读全文
posted @ 2019-11-20 14:16 andy_0212 阅读(221) 评论(0) 推荐(0) 编辑
摘要: [Minor Bug] Pylint E1101 Module 'torch' has no 'from_numpy' member#701 For those using vscode, add to user settings "python.linting.pylintArgs": ["--e 阅读全文
posted @ 2019-11-07 14:27 andy_0212 阅读(928) 评论(1) 推荐(0) 编辑
摘要: 验前概率就是通常说的概率,验后概率是一种条件概率,但条件概率不一定是验后概率。贝叶斯公式是由验前概率求验后概率的公式。举一个简单的例子:一口袋里有3只红球、2只白球,采用不放回方式摸取,求:⑴ 第一次摸到红球(记作A)的概率;⑵ 第二次摸到红球(记作B)的概率;⑶ 已知第二次摸到了红球,求第一次摸到 阅读全文
posted @ 2019-10-25 20:33 andy_0212 阅读(5633) 评论(0) 推荐(0) 编辑
摘要: https://cmdlinetips.com/2012/09/three-ways-to-write-text-to-a-file-in-python/ 阅读全文
posted @ 2019-10-18 15:16 andy_0212 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1)三个直角:电脑桌下膝盖处形成第一个直角,大腿和后背是第二个直角,手臂放在扶手上在肘关节形成第三个直角。 2)鼠标鼠标位置越高,对手腕的危害越大。鼠标离身体越远,对肩的危害越大,所以鼠标应该放近一点。 3)(传统)显示屏高度上,电脑屏幕中心位置应与操作者胸部同一水平线上。眼睛与电脑显示器形成轻度向 阅读全文
posted @ 2019-10-17 14:12 andy_0212 阅读(7564) 评论(1) 推荐(0) 编辑
摘要: 设置在 ~/.gitconfig 中。也可以用命令行改变 git config --global user.name "Alvin J. Alexander" git config --global user.email [your email address here]https://alvina 阅读全文
posted @ 2019-09-28 16:20 andy_0212 阅读(239) 评论(0) 推荐(0) 编辑
摘要: How to clone all remote branches in Git? First, clone a remote Git repository and cd into it: Next, look at the local branches in your repository: But 阅读全文
posted @ 2019-09-27 19:13 andy_0212 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 三、总结选择操作系统主要考虑不同的应用场景和需求 1.生产环境 对于服务器操作系统来说,并不需要太多的应用程序,需要的是稳定,操作方便,维护简单的系统,因此,非常多的商业公司部署在生产环境上的服务器都是使用CentOS系统。 2.个人桌面环境 对于个人使用来说,Ubuntu系统有着靓丽的用户界面,完 阅读全文
posted @ 2019-09-27 16:21 andy_0212 阅读(3033) 评论(0) 推荐(0) 编辑