예제 #1
0
 def __init__(self, index=0):
     GenericPE.__init__(self)
     self._add_input(self.INPUT_NAME)
     self._add_output(self.OUTPUT_NAME)
     self.index = 0
     self.sum = 0
     self.count = 0
예제 #2
0
 def __init__(self):
     GenericPE.__init__(self)
     self._add_input('input')
     self._add_output('output')
     #self._add_output('time')
     self.key_arrays = []
     self.it = 1
예제 #3
0
 def __init__(self):
     GenericPE.__init__(self)
     self._add_input('input', grouping='global')
     #self._add_output('time')
     self.first_key_val = [0] * NUM_PROCS
     self.last_key_val = [0] * NUM_PROCS
     self.total_local_keys = [0] * NUM_PROCS
예제 #4
0
 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
예제 #5
0
 def __init__(self):
     GenericPE.__init__(self)
     self.outputconnections = {
         ReadJSON.OUTPUT_NAME: {
             NAME: ReadJSON.OUTPUT_NAME
         }
     }
예제 #6
0
 def __init__(self):
     GenericPE.__init__(self)
     self._add_input('input')
     self._add_output('output')
     self._add_output('time')
     self.it = 1
     self.converged = False
예제 #7
0
 def __init__(self):
     GenericPE.__init__(self)
     self._add_input('input', grouping=[0])
     self._add_output('output')
     self.previous_rank = defaultdict(float)
     self.next_rank = defaultdict(float)
     self.it = 1
예제 #8
0
 def __init__(self):
     GenericPE.__init__(self)
     self.inputconnections['input'] = { NAME : 'input' }
     out1 = {}
     out1[NAME] = "output"
     out1[TYPE] = ['word']
     self.outputconnections["output"] = out1
 def __init__(self):
     GenericPE.__init__(self)
     self._add_input("odd")
     self._add_input("even")
     self._add_output("output")
     self.list_odd=[]
     self.list_even=[]
예제 #10
0
    def __init__(self, input_name, output_name):
        GenericPE.__init__(self)

        self.input_name = input_name
        self.output_name = output_name
        self._add_input(input_name)
        self._add_output(output_name)
예제 #11
0
 def __init__(self, index=0):
     GenericPE.__init__(self)
     self._add_input(self.INPUT_NAME)
     self._add_output(self.OUTPUT_NAME)
     self.index = 0
     self.sum = 0
     self.count = 0
예제 #12
0
 def __init__(self):
     GenericPE.__init__(self)
     self.inputconnections['input'] = { NAME : 'input' }
     out1 = {}
     out1[NAME] = "output"
     out1[TYPE] = ['word']
     self.outputconnections["output"] = out1
예제 #13
0
 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
예제 #14
0
 def __init__(self):
     GenericPE.__init__(self)
     self._add_input(self.INPUT_NAME, grouping='global')
     self._add_output(self.OUTPUT_NAME)
     self.index = 0
     self.sum = 0
     self.count = 0
예제 #15
0
 def __init__(self):
     GenericPE.__init__(self)
     self._add_input('input', grouping='global')
     #self._add_output('time')
     self.first_key_val = [0] * NUM_PROCS
     self.last_key_val = [0] * NUM_PROCS
     self.total_local_keys = [0] * NUM_PROCS
예제 #16
0
 def __init__(self):
     GenericPE.__init__(self)
     self._add_input('input', grouping=[0])
     self._add_output('output')
     self.previous_rank = defaultdict(float)
     self.next_rank = defaultdict(float)
     self.it = 1
예제 #17
0
    def __init__(self):
        GenericPE.__init__(self)
        self._add_input("input")

        self._add_output("image")
        self._add_output("windows")
        self._add_output("window_tapering")
예제 #18
0
 def __init__(self):
     GenericPE.__init__(self)
     self._add_input('input')
     self._add_output('output')
     self._add_output('time')
     self.it = 1
     self.converged = False
예제 #19
0
    def __init__(self):
        GenericPE.__init__(self)
        self._add_input("input")

        self._add_output("image")
        self._add_output("windows")
        self._add_output("window_tapering")
예제 #20
0
 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
예제 #21
0
 def __init__(self):
     GenericPE.__init__(self)
     self._add_input('input')
     self._add_output('output')
     #self._add_output('time')
     self.key_arrays = []
     self.it = 1
예제 #22
0
 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] = []
예제 #23
0
 def __init__(self):
     GenericPE.__init__(self)
     self.inputconnections['input'] = { NAME : 'input', GROUPING : [0] }
     out1 = {}
     out1[NAME] = "output"
     out1[TYPE] = ['word', 'count']
     self.outputconnections["output"] = out1
     self.mywords = {}
예제 #24
0
 def __init__(self):
     GenericPE.__init__(self)
     self.outputconnections = {
         'output': {
             NAME: 'output',
             TYPE: ['timestamp', 'location', 'stream']
         }
     }
예제 #25
0
 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] = []
예제 #26
0
 def __init__(self):
     GenericPE.__init__(self)
     self.inputconnections['input'] = { NAME : 'input', GROUPING : [0] }
     out1 = {}
     out1[NAME] = "output"
     out1[TYPE] = ['word', 'count']
     self.outputconnections["output"] = out1
     self.mywords = {}
예제 #27
0
 def __init__(self, numOutputs=1):
     GenericPE.__init__(self)
     if numOutputs == 1:
         self.outputconnections = { 'output' : { NAME : 'output', TYPE: ['number'] } }
     else:
         for i in range(numOutputs):
             self.outputconnections['output%s' % i] = { NAME : 'output%s' % i, TYPE: ['number'] } 
     self.counter = 0
     self.outputnames = list(self.outputconnections.keys())
예제 #28
0
    def __init__(self, name, monitor):
        GenericPE.__init__(self)

        self.name = name
        self.data_headers = {}
        self.linked_inputs = []

        # External monitor (not to be used directly)
        self._monitor = monitor
    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
예제 #30
0
 def __init__(self, numOutputs=1):
     GenericPE.__init__(self)
     if numOutputs == 1:
         self.outputconnections = { 'output' : { NAME : 'output', TYPE: ['number'] } }
     else:
         for i in range(numOutputs):
             self.outputconnections['output%s' % i] = { NAME : 'output%s' % i, TYPE: ['number'] } 
     self.counter = 0
     self.outputnames = list(self.outputconnections.keys())
예제 #31
0
 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())
 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
예제 #33
0
    def __init__(self, num_inputs=0):
        GenericPE.__init__(self)

        # form expected input dict
        self.num_inputs = num_inputs
        for i in range(num_inputs):
            self.inputconnections['input%s' % i] = {
                NAME: 'input%s' % i, TYPE: ['number']}
        self.outputconnections = {'output': {NAME: 'output', TYPE: ['result']}}
예제 #34
0
 def __init__(self):
     GenericPE.__init__(self)
     #self.numprocesses = nprocs
     self.it = 1
     self._add_input('input', grouping='global')
     # if self.it != niteration:
     #     self._add_output('output')
     self._add_output('time')
     self.previous_rank = [0.0] * number_nodes
     self.next_rank = [0.0] * number_nodes
예제 #35
0
 def __init__(self):
     GenericPE.__init__(self)
     #self.numprocesses = nprocs
     self.it = 1
     self._add_input('input', grouping='global')
     # if self.it != niteration:
     #     self._add_output('output')
     self._add_output('time')
     self.previous_rank = [0.0] * number_nodes
     self.next_rank = [0.0] * number_nodes
예제 #36
0
 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
예제 #37
0
 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
예제 #38
0
 def __init__(self):
     GenericPE.__init__(self)
     self._add_input('bucket_size_totals', grouping='all')
     self._add_input('input')
     self._add_output('output')
     #self._add_output('time')
     self.bucket_size = []
     self.bucket_size_totals = []
     self.my_rank = []
     self.key_buff1 = []
     self.it = 1
예제 #39
0
 def __init__(self):
     GenericPE.__init__(self)
     self.inputconnections = {
         'input0': {
             NAME: 'input0'
         },
         'input1': {
             NAME: 'input1'
         }
     }
     self.outputconnections = {'output': {NAME: 'output', TYPE: ['result']}}
예제 #40
0
 def __init__(self):
     GenericPE.__init__(self)
     self._add_input('bucket_size_totals', grouping='all')
     self._add_input('input')
     self._add_output('output')
     #self._add_output('time')
     self.bucket_size = []
     self.bucket_size_totals = []
     self.my_rank = []
     self.key_buff1 = []
     self.it = 1
예제 #41
0
 def __init__(self):
     GenericPE.__init__(self)
     self._add_input('input', grouping=[0])
     self._add_output('output')
     #self._add_output('time')
     # self._add_output('min&max_val')
     self.key_buff2 = [[]] * NUM_PROCS
     self.process_bucket_distrib_ptr1 = []
     self.process_bucket_distrib_ptr2 = []
     self.bucket_size_totals = []
     self.it = 1
예제 #42
0
 def __init__(self):
     GenericPE.__init__(self)
     self._add_input('input', grouping=[0])
     self._add_output('output')
     #self._add_output('time')
     # self._add_output('min&max_val')
     self.key_buff2 = [[]] * NUM_PROCS
     self.process_bucket_distrib_ptr1 = []
     self.process_bucket_distrib_ptr2 = []
     self.bucket_size_totals = []
     self.it = 1
예제 #43
0
 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
예제 #44
0
    def __init__(self, nb_scenario):
        GenericPE.__init__(self)

        import numpy as np

        for i in range(nb_scenario):
            name_scenario = 'scenario_' + str(i + 1)
            self._add_input(name_scenario, grouping=[1])

        self.nb_scenario = nb_scenario
        self._add_output('output')
        self.mat = 0
        self.time = 0
        self.count = 0
예제 #45
0
    def __init__(self, inputs=[], outputs=[], num_inputs=0, num_outputs=0):

        GenericPE.__init__(self)

        for i in range(num_inputs):
            name = '%s%s' % (BasePE.INPUT_NAME, i)
            self.inputconnections[name] = {NAME: name}
        for i in range(num_outputs):
            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}
예제 #46
0
 def __init__(self):
     GenericPE.__init__(self)
     self._add_input('input')
     self._add_output('time')
     #self._add_output('output')
     #self._add_output('verified')
     self.process_bucket_distrib_ptr1 = []
     self.process_bucket_distrib_ptr2 = []
     self.min_key_val = 0
     self.max_key_val = 0
     self.bucket_size_totals = []
     self.my_rank = 0
     self.key_buff2 = []
     self.vcounter = 0
     self.it = 1
예제 #47
0
    def __init__(self, num_outputs=0):
        GenericPE.__init__(self)

        self._add_input(splitPE.INPUT_NAME)

        # read input from file
        self.nos = [1, 2, 3, 4, 5, 6, 7, 4, 5, 9, 10, 300]

        # create output chunk dict
        self.num_outputs = num_outputs
        for i in range(num_outputs):
            name = '%s%s' % (BasePE.OUTPUT_NAME, i)
            self.outputconnections['output%s' % i] = {
                NAME: 'output%s' % i, TYPE: ['number']}
        self.outputnames = list(self.outputconnections.keys())
예제 #48
0
 def __init__(self):
     GenericPE.__init__(self)
     self._add_input('input')
     self._add_output('time')
     #self._add_output('output')
     #self._add_output('verified')
     self.process_bucket_distrib_ptr1 = []
     self.process_bucket_distrib_ptr2 = []
     self.min_key_val = 0
     self.max_key_val = 0
     self.bucket_size_totals = []
     self.my_rank = 0
     self.key_buff2 = []
     self.vcounter = 0
     self.it = 1
예제 #49
0
 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()
예제 #50
0
 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()
예제 #51
0
    def __init__(self, inputs=[], outputs=[], num_inputs=0, num_outputs=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(num_inputs):
            name = '%s%s' % (BasePE.INPUT_NAME, i)
            self.inputconnections[name] = {NAME: name}
        for i in range(num_outputs):
            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}
예제 #52
0
파일: base.py 프로젝트: krischer/dispel4py
 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 }
예제 #53
0
파일: provenance.py 프로젝트: KNMI/VERCE
 def __init__(self, name='ProvenanceRecorder', toW3C=False):
     GenericPE.__init__(self)
     self.porttopemap={}
     self._add_output('feedback')
     self._add_input(ProvenanceRecorder.INPUT_NAME, grouping=['prov_cluster'])
예제 #54
0
 def __init__(self, indexes=[0]):
     GenericPE.__init__(self)
     self._add_input(self.INPUT_NAME)
     self._add_output(self.OUTPUT_NAME)
     self.indexes = indexes
     self.value = [0 for i in indexes]
 def __init__(self):
     GenericPE.__init__(self)
     self._add_input("input", grouping=[0])
     self._add_output("output")
     self.count=defaultdict(int)
 def __init__(self):
     GenericPE.__init__(self)
     self._add_input("input")
     self._add_output("output")
예제 #57
0
파일: provenance.py 프로젝트: KNMI/VERCE
 def __init__(self, *args, **kwargs):
     GenericPE.__init__(self)
     self.parameters = {}
예제 #58
0
파일: provenance.py 프로젝트: KNMI/VERCE
 def __init__(self):
     GenericPE.__init__(self)
     self._add_output('output')
예제 #59
0
 def __init__(self, numIterations=1):
     GenericPE.__init__(self)
     self._add_output('output', tuple_type=['number'])
     self.counter = 0
     self.numIterations = numIterations