小编Zea*_*ker的帖子

编译错误在git:imap-send.c:1408:错误:'CURLOPT_USERNAME'未声明

我想将git安装到一个服务器中,我只是一个没有"sudo"访问权限的用户.所以我不能用yum install git.

我尝试从https://www.kernel.org/pub/software/scm/git/(v2.11.0.tar.gz)和github(v2.3.0.zip)下载源代码.
编译源时发生错误:

imap-send.c: In function ‘setup_curl’:
imap-send.c:1408: error: ‘CURLOPT_USERNAME’ undeclared (first use in this function)
imap-send.c:1408: error: (Each undeclared identifier is reported only once
imap-send.c:1408: error: for each function it appears in.)
imap-send.c:1409: error: ‘CURLOPT_PASSWORD’ undeclared (first use in this function)
imap-send.c:1434: error: ‘CURLOPT_USE_SSL’ undeclared (first use in this function)
imap-send.c:1434: error: ‘CURLUSESSL_TRY’ undeclared (first use in this function)
make: *** [imap-send.o] Error 1
make: *** Waiting for unfinished jobs....
Run Code Online (Sandbox Code Playgroud)

这两个版本给出了相同的错误.我检查了github的源代码并获得了代码的位置,但我无法理解为什么错误发生了.

如果没有管理员权限,我应该如何进入服务器(CentOS).

git compiler-errors

2
推荐指数
1
解决办法
769
查看次数

如何在pandas.dataframe中获取每个组的平均值,例如seaborn.factorplot

我有一个格式化为pandas数据框的数据集。请在seaborn http://seaborn.pydata.org/generation/seaborn.factorplot.html#seaborn.factorplot中查看此示例

>>> import seaborn as sns
>>> sns.set(style="ticks")
>>> exercise = sns.load_dataset("exercise")
>>> g = sns.factorplot(x="time", y="pulse", hue="kind", data=exercise)
Run Code Online (Sandbox Code Playgroud)

使用sns.factorplot,我可以按组看到数据的平均值(在本例中,图表显示了按“种类”在1/15/30分钟组的脉冲平均值)。

我想直接获取图表中的“值”。例如

time      kind     mean    standard deviation
1 min     running  xx      xx
15 min    running  xx      xx
Run Code Online (Sandbox Code Playgroud)

我可以使用2深度循环来获取所需的值,但我认为在熊猫中应该有一些简单的方法,因为这是常见的要求。

与matplotlib(它将返回绘图中的所有值)不同,seaborn返回Facetgrid对象。看来Facetgrid没有我想要的数据。

python pandas seaborn

2
推荐指数
1
解决办法
641
查看次数

如何绘制Seaborn中离散变量的分布图

当我绘制displot离散变量时,分布可能不像我想的那样。例如。

在此处输入图片说明 我们可以发现s中存在缝隙,barplot因此in的曲线kdeplot在y轴上“较低”。

在我的工作中,情况甚至更糟: 在此处输入图片说明

我认为这可能是因为每个栏的“宽度”或“重量”都不是1。但是我没有找到任何可以证明其合理性的参数。

我想画这样的曲线(应该更平滑) 在此处输入图片说明

python matplotlib seaborn probability-distribution

2
推荐指数
2
解决办法
3423
查看次数