当前位置: 首页>>代码示例>>Python>>正文


Python core.GenericPE类代码示例

本文整理汇总了Python中dispel4py.core.GenericPE的典型用法代码示例。如果您正苦于以下问题:Python GenericPE类的具体用法?Python GenericPE怎么用?Python GenericPE使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了GenericPE类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 def __init__(self):
     GenericPE.__init__(self)
     self.inputconnections['input'] = { NAME : 'input' }
     out1 = {}
     out1[NAME] = "output"
     out1[TYPE] = ['word']
     self.outputconnections["output"] = out1
开发者ID:akrause2014,项目名称:dispel4py,代码行数:7,代码来源:testing_PEs.py

示例2: __init__

 def __init__(self):
     GenericPE.__init__(self)
     self._add_input('input')
     self._add_output('output')
     #self._add_output('time')
     self.key_arrays = []
     self.it = 1
开发者ID:mysticwzm,项目名称:Dissertation,代码行数:7,代码来源:IS.py

示例3: __init__

    def __init__(self):
        GenericPE.__init__(self)
        self._add_input("input")

        self._add_output("image")
        self._add_output("windows")
        self._add_output("window_tapering")
开发者ID:KNMI,项目名称:VERCE,代码行数:7,代码来源:misfit_postprocess.py

示例4: __init__

 def __init__(self):
     GenericPE.__init__(self)
     self._add_input("odd")
     self._add_input("even")
     self._add_output("output")
     self.list_odd=[]
     self.list_even=[]
开发者ID:rosafilgueira,项目名称:dispel4py_training_material,代码行数:7,代码来源:EvenOddworkflow.py

示例5: __init__

 def __init__(self):
     GenericPE.__init__(self)
     self._add_input('input', grouping=[0])
     self._add_output('output')
     self.dst_node_list = defaultdict(list)
     self.cur_rank = defaultdict(float)
     self.it = 1
开发者ID:mysticwzm,项目名称:Dissertation,代码行数:7,代码来源:PageRank.py

示例6: __init__

 def __init__(self):
     GenericPE.__init__(self)
     self._add_input(self.INPUT_NAME, grouping='global')
     self._add_output(self.OUTPUT_NAME)
     self.sum = 0
     self.sum_squared = 0
     self.count = 0
开发者ID:KNMI,项目名称:wps_workflow,代码行数:7,代码来源:aggregate.py

示例7: __init__

 def __init__(self, name, wrapped):
     GenericPE.__init__(name)
     self.wrappedPE = wrapped
     self.inputconnections = wrapped.inputconnections
     self.outputconnections = wrapped.outputconnections
     self.cachedInputs = {}
     for name in self.inputconnections:
         self.cachedInputs[name] = []
开发者ID:Ravanon,项目名称:dispel4py,代码行数:8,代码来源:simple_process.py

示例8: __init__

 def __init__(self, numOutputs=1):
     GenericPE.__init__(self)
     if numOutputs == 1:
         self._add_output('output', tuple_type=['number'])
     else:
         for i in range(numOutputs):
             self._add_output('output%s' % i, tuple_type=['number'])
     self.counter = 0
     self.outputnames = list(self.outputconnections.keys())
开发者ID:rosafilgueira,项目名称:dispel4py,代码行数:9,代码来源:testing_PEs.py

示例9: __init__

    def __init__(self):
        GenericPE.__init__(self)
        self._add_input ('input', grouping='global')
        self.state = None
        self.happiness={} #pair state, sentiment
        self.top_number = 3  
        self.top_states = []
        self.top_scores = []
	self.total_tweets = 0
开发者ID:rosafilgueira,项目名称:dispel4py_workflows,代码行数:9,代码来源:analysis_sentiment.py

示例10: __init__

 def __init__(self, input_mappings, output_mappings, proc_to_pe):
     GenericPE.__init__(self)
     # work out the order of PEs
     self.ordered = _order_by_dependency(input_mappings, output_mappings)
     self.input_mappings = input_mappings
     self.output_mappings = output_mappings
     self.proc_to_pe = proc_to_pe
     self.result_mappings = None
     self.map_inputs = _no_map
     self.map_outputs = _no_map
开发者ID:KNMI,项目名称:wps_workflow,代码行数:10,代码来源:processor.py

示例11: __init__

 def __init__(self, workflow, inputmappings={}, outputmappings={}):
     GenericPE.__init__(self)
     self.workflow = workflow
     for input_name in inputmappings:
         self.inputconnections[input_name] = { NAME : input_name }
     for output_name in outputmappings.values():
         self.outputconnections[output_name] = { NAME : output_name }
     for node in workflow.graph.nodes():
         pe = node.getContainedObject()
         pe.log = types.MethodType(simpleLogger, pe)
     self.inputmappings = inputmappings
     self.outputmappings = outputmappings
开发者ID:Ravanon,项目名称:dispel4py,代码行数:12,代码来源:worker_mpi.py

示例12: __init__

 def __init__(self):
     GenericPE.__init__(self)
     in1 = {}
     in1[NAME] = INPUT_NAME
     self.inputconnections[INPUT_NAME] = in1
     out1 = {}
     out1[TYPE] = ['streams']
     out1[NAME] = OUTPUT_DATA
     out_md = {}
     out_md[NAME] = OUTPUT_METADATA
     out_md[TYPE] = ['metadata']
     self.outputconnections[OUTPUT_DATA] = out1
     self.outputconnections[OUTPUT_METADATA] = out_md
     self.taskId=str(uuid.uuid1())
     self.controlParameters = {}
     self.appParameters = {}
     self.provon = True
     self.iterationIndex = 0
     self.instanceId = 'Invoker-instance-'+socket.gethostname()
开发者ID:Ravanon,项目名称:dispel4py,代码行数:19,代码来源:provenance.py

示例13: __init__

 def __init__(self, inputs=[], outputs=[], numInputs=0, numOutputs=0):
     '''
     :param inputs: a list of input names (optional)
     :param outputs: a list of output names (optional)
     :param numInputs: number of inputs; the inputs are generated as 'input0' to 'input`n`'
     where `n` is the number of inputs (optional)
     :param numInputs: number of outputs; the outputs are generated as 'output0' to 'output`n`'
     where `n` is the number of outputs (optional)
     '''
     GenericPE.__init__(self)
     
     for i in range(numInputs):
         name = '%s%s' % (BasePE.INPUT_NAME, i)
         self.inputconnections[name] = { NAME : name } 
     for i in range(numOutputs):
         name = '%s%s' % (BasePE.OUTPUT_NAME, i)
         self.outputconnections[name] = { NAME : name } 
     for name in inputs:
         self.inputconnections[name] = { NAME : name }
     for name in outputs:
         self.outputconnections[name] = { NAME : name }
开发者ID:krischer,项目名称:dispel4py,代码行数:21,代码来源:base.py

示例14: __init__

 def __init__(self):
     GenericPE.__init__(self)
     self._add_input("input", grouping=[0])
     self._add_output("output")
     self.count=defaultdict(int)
开发者ID:rosafilgueira,项目名称:dispel4py_training_material,代码行数:5,代码来源:WordCount.py

示例15: __init__

 def __init__(self, *args, **kwargs):
     GenericPE.__init__(self)
     self.parameters = {}
开发者ID:KNMI,项目名称:VERCE,代码行数:3,代码来源:provenance.py


注:本文中的dispel4py.core.GenericPE类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。