![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
踩过的一些坑
Shrinlee
此人不太懒,还写了些什么
展开
-
mac 启动R时警告信息(解决方案)
uring startup - Warning messages:1: Setting LC_CTYPE failed, using “C”2: Setting LC_COLLATE failed, using “C”3: Setting LC_TIME failed, using “C”4: Setting LC_MESSAGES failed, using “C”5: Setting LC_MONETARY failed, using “C”[R.app GUI 1.72 (7847) x8原创 2020-08-29 15:05:49 · 1477 阅读 · 2 评论 -
Python 控制台信息同时输出到控制台和log文件
自定义Logger方式简单快捷,很简单直接上代码:# 同时输出到控制台和文件中import sysclass Logger(object): def __init__(self, filename='default.log', stream=sys.stdout): self.terminal = stream self.log = open(filename,...原创 2020-02-17 20:06:45 · 1692 阅读 · 0 评论 -
TypeError:POST data should be bytes, an iterable of bytes, or a file object. It cannot be of str
Python2转Python3,调用API在线服务遇到的问题解决(json数据)Python2代码示例:import jsonimport tracebackimport urllibimport urllib2# json格式数据formdata = { "CRIM":0.01887747, "ZN":-0.11363636, "INDUS":0.25...原创 2020-01-16 00:01:08 · 2022 阅读 · 2 评论 -
pandas一行代码计算相关性矩阵的条件概率
pandas一行代码计算相关性矩阵的条件概率计算A列各属性发生时B列各属性发生的概率计算A列各属性发生时B列各属性发生的概率一行代码:pB_A = pd.crosstab(df['A'], df['B'], margins=True).apply(lambda x:x/x[-1], axis=1)下面举个例子帮助理解例子:计算:P(B|A) = P(AB)/P(A)import p...原创 2020-01-14 20:12:05 · 884 阅读 · 2 评论 -
MAC系统git commit 时忽略.ds_store文件(已实测)
1.Remove existing files from the repository:find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch2.Add the line.DS_Storeto the file .gitignore, which can be found at the top level...原创 2019-05-22 16:27:25 · 476 阅读 · 0 评论 -
Mac Clion无法断点调试问题解决
CLion工具链中的Debugger配置为LLDB,在Mac上调试时会出现下述Error,无法调试,断点无法停下E0805 11:38:19.810017 430044608 ProtobufClient.cpp:146] ERROR, no such host as localhost解决方案:修改/etc/hosts文件sudo vim /etc/hosts将hosts文件中的:...原创 2019-08-05 14:20:25 · 3272 阅读 · 0 评论