在那里,当我的项目使用travis-ci时,我遇到了"分段错误"错误:IPython-Dashboard
没有错误消息,它在本地工作正常,我觉得有点混乱.任何人都可以解决这个问题,谢谢.
这是云上的travis构建日志:
$ nosetests --with-coverage --cover-package=dashboard
../home/travis/build.sh: line 45: 3187 Segmentation fault (core dumped)
nosetests --with-coverage --cover-package=dashboard
The command "nosetests --with-coverage --cover-package=dashboard" exited with 139.
Run Code Online (Sandbox Code Playgroud)
这是本地[osx]上的构建日志
taotao@mac007:~/Desktop/github/IPython-Dashboard$sudo nosetests --with-coverage --cover-package=dashboard
.../Users/chenshan/Desktop/github/IPython-Dashboard/dashboard/tests/testCreateData.py:78: Warning: Can't create database 'IPD_data'; database exists
conn.cursor().execute('CREATE DATABASE IF NOT EXISTS {};'.format(config.sql_db))
/Library/Python/2.7/site-packages/pandas/io/sql.py:599: FutureWarning: The 'mysql' flavor with DBAPI connection is deprecated and will be removed in future versions. MySQL will be further supported with SQLAlchemy engines.
warnings.warn(_MYSQL_WARNING, FutureWarning)
...
Name Stmts Miss Cover Missing …Run Code Online (Sandbox Code Playgroud) 在2014年的spark-summit中,Aaron在他的幻灯片(第17页)中演讲了“更深入的了解Spark内部原理”,展示了将一个阶段分为以下4个任务:

在这里,我想了解有关如何将阶段拆分为任务的三件事?
在上面的示例中,似乎任务号是基于文件号创建的,对吗?
如果我的观点是正确的,那么如果目录名下只有3个文件,那么它将创建3个任务吗?
如果我的观点是正确的2,如果只有一个但很大的文件怎么办?它将这个阶段分为1个任务吗?如果数据来自流数据源怎么办?
非常感谢,我对如何将阶段划分为任务感到困惑。
我想在控制台中创建多个SparkContext.根据邮件列表中的帖子,我需要做SparkConf.set('spark.driver.allowMultipleContexts',true),看起来合理但无法正常工作.任何人都有这方面的经验吗?非常感谢:
下面是我做的和错误信息,我在Ipython笔记本中做到了:
from pyspark import SparkConf, SparkContext
conf = SparkConf().setMaster("spark://10.21.208.21:7077").set("spark.driver.allowMultipleContexts", "true")
conf.getAll()
[(u'spark.eventLog.enabled', u'true'),
(u'spark.driver.allowMultipleContexts', u'true'),
(u'spark.driver.host', u'10.20.70.80'),
(u'spark.app.name', u'pyspark-shell'),
(u'spark.eventLog.dir', u'hdfs://10.21.208.21:8020/sparklog'),
(u'spark.master', u'spark://10.21.208.21:7077')]
sc1 = SparkContext(conf=conf.setAppName("app 1")) ## this sc success
sc1
<pyspark.context.SparkContext at 0x1b7cf10>
sc2 = SparkContext(conf=conf.setAppName("app 2")) ## this failed
ValueError Traceback (most recent call last)
<ipython-input-23-e6dcca5aec38> in <module>()
----> 1 sc2 = SparkContext(conf=conf.setAppName("app 2"))
/usr/local/spark-1.2.0-bin-cdh4/python/pyspark/context.pyc in __init__(self, master, appName, sparkHome, pyFiles, environment, batchSize, serializer, conf, gateway, jsc)
100 """
101 self._callsite = first_spark_call() or …Run Code Online (Sandbox Code Playgroud) 下面是collectionsPython 2.7中模块的源代码.我对OrderedDict初始化__root变量的方式感到困惑.为什么使用它try和except,有必要吗?为什么不能只使用它
self.__root = root = [] # sentinel node
root[:] = [root, root, None]
self.__map = {}
self.__update(*args, **kwds)
Run Code Online (Sandbox Code Playgroud)
初始化self.__root?
非常感谢 ...
class OrderedDict(dict):
'Dictionary that remembers insertion order'
# An inherited dict maps keys to values.
# The inherited dict provides __getitem__, __len__, __contains__, and get.
# The remaining methods are order-aware.
# Big-O running times for all methods are the same as regular dictionaries.
# …Run Code Online (Sandbox Code Playgroud) 我安装了软件包:https : //github.com/jaysw/ipydb
根据本教程,我应该使用它来启用它,
$ ipython
In [1] : %load_ext ipydb
Run Code Online (Sandbox Code Playgroud)
它看起来像一个IPython扩展。
但是我感到困惑,这个软件包没有安装在我的〜/ .ipython / extensions下
aaron@aarons-MacBook-Pro:~/Desktop/github/ipydb$ls ~/.ipython/extensions/
aaron@aarons-MacBook-Pro:~/Desktop/github/ipydb$ls ~/.ipython/nbextensions/
livereveal usability
Run Code Online (Sandbox Code Playgroud)
所以,我想知道
%load_ext魔术如何工作或当我键入“%load_ext ipydb”时发生了什么
如果我只键入“ ipython”,ipython将如何进行配置,它将使用默认配置文件,但在我的“〜/ .ipython / profile_default /”下没有配置文件
以下是默认配置文件和一个用户定义的配置文件:
aaron@aarons-MacBook-Pro:~/Desktop/github/ipydb$ls ~/.ipython/profile_default/
db history.sqlite log nbconfig pid security startup static
aaron@aarons-MacBook-Pro:~/Desktop/github/ipydb$ipython profile create my_profile
[ProfileCreate] Generating default config file: u'/Users/aaron/.ipython/profile_my_profile/ipython_config.py'
[ProfileCreate] Generating default config file: u'/Users/aaron/.ipython/profile_my_profile/ipython_kernel_config.py'
[ProfileCreate] Generating default config file: u'/Users/aaron/.ipython/profile_my_profile/ipython_console_config.py'
[ProfileCreate] Generating default config file: u'/Users/aaron/.ipython/profile_my_profile/ipython_qtconsole_config.py'
[ProfileCreate] Generating default config file: u'/Users/aaron/.ipython/profile_my_profile/ipython_notebook_config.py'
[ProfileCreate] Generating default …Run Code Online (Sandbox Code Playgroud) ipthon-sql是ipython的扩展,我首先通过pip install ipython-sql安装它
项目在这里:https://github.com/catherinedevlin/ipython-sql
我的问题是:
当我输入%load_ext sql并按SHIFT + ENTER时,IPython执行这个魔术句的详细程序是什么?谢谢 ...
