我目前正在尝试在我的macbook上安装google cloud sdk.我正在使用scikit-learn和anaconda进行机器学习,所以我的笔记本电脑python指向python3.5.但是google cloud sdk需要安装python 2.7,这就是我面临无法安装它的问题.
当我运行install.sh文件时发生错误,我不知道如何处理它:
Adam | ~ $ git/google-cloud-sdk/install.sh
Welcome to the Google Cloud SDK!
Traceback (most recent call last):
File "/Users/AdamLiu/Git/google-cloud-sdk/lib/third_party/enum/__init__.py", line 364, in __getattr__
return cls._member_map_[name]
KeyError: '_convert'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/AdamLiu/git/google-cloud-sdk/bin/bootstrapping/install.py", line 8, in <module>
import bootstrapping
File "/Users/AdamLiu/Git/google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 9, in <module>
import setup
File "/Users/AdamLiu/Git/google-cloud-sdk/bin/bootstrapping/setup.py", line 34, in <module>
from googlecloudsdk.core.util import platforms
File "/Users/AdamLiu/Git/google-cloud-sdk/lib/googlecloudsdk/core/util/platforms.py", line 18, in <module>
import …Run Code Online (Sandbox Code Playgroud) python linux google-app-engine google-cloud-platform google-cloud-sdk
我是 Chrome 扩展开发的新手。据我所知,chrome.tabs.query仅适用于background.js,我试图使用下面的代码来检查返回的信息。但是,结果只返回到后台页面控制台,并且它只给我“chrome://extensions/”页面的信息。
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
console.log("tab ID:");
console.log(tabs);
});
Run Code Online (Sandbox Code Playgroud)
如何获取当前窗口中打开的所有/任何选项卡的信息?
提前致谢!
我很难绘制熊猫时间序列的密度.
我有一个数据框,其中包含完美组织的时间戳,如下所示:
这是一个网络日志,我想显示时间戳的密度,它表示在特定时间段内有多少访问者.
我的解决方案atm是提取每个时间戳的年,月,周和日,并对它们进行分组.如下所示:
但我不认为这是处理时间的有效方式.我找不到任何关于此的好信息,更多的是关于在日期或某事上绘制计算值的信息.
那么,有人对如何绘制熊猫时间序列有任何建议吗?
非常感激!
data-visualization machine-learning matplotlib data-analysis pandas