:type sources: list[DFAdapter]
        :type target: DFAdapter
183121
def execute(self, sources, target):
        
        fields = self._get_fields_list_from_eps(sources)
        feature_set = set(self.exclude_names)
        target._ml_fields = list(self._clear_field_roles(fields[0], feature_set))
973628
def list_dcm_datain(datain):
    ''' 
    '''

    if not isinstance(datain, dict):
        raise ValueError('The input is not a dictionary!')

    dcmlst = []
    # list of mu-map DICOM files
    if 'mumapDCM' in datain:
        dcmump = os.listdir(datain['mumapDCM'])
        # accept only *.dcm extensions
        dcmump = [os.path.join(datain['mumapDCM'],d) for d in dcmump if d.endswith(dcmext)]
        dcmlst += dcmump

    if 'T1DCM' in datain:
        dcmt1 = os.listdir(datain['T1DCM'])
        # accept only *.dcm extensions
        dcmt1 = [os.path.join(datain['T1DCM'],d) for d in dcmt1 if d.endswith(dcmext)]
        dcmlst += dcmt1

    if 'T2DCM' in datain:
        dcmt2 = os.listdir(datain['T2DCM'])
        # accept only *.dcm extensions
        dcmt2 = [os.path.join(datain['T2DCM'],d) for d in dcmt2 if d.endswith(dcmext)]
        dcmlst += dcmt2

    if 'UTE1' in datain:
        dcmute1 = os.listdir(datain['UTE1'])
        # accept only *.dcm extensions
        dcmute1 = [os.path.join(datain['UTE1'],d) for d in dcmute1 if d.endswith(dcmext)]
        dcmlst += dcmute1

    if 'UTE2' in datain:
        dcmute2 = os.listdir(datain['UTE2'])
        # accept only *.dcm extensions
        dcmute2 = [os.path.join(datain['UTE2'],d) for d in dcmute2 if d.endswith(dcmext)]
        dcmlst += dcmute2

    #-list-mode data dcm
    if 'lm_dcm' in datain:
        dcmlst += [datain['lm_dcm']]

    if 'lm_ima' in datain:
        dcmlst += [datain['lm_ima']]

    #-norm
    if 'nrm_dcm' in datain:
        dcmlst += [datain['nrm_dcm']]

    if 'nrm_ima' in datain:
        dcmlst += [datain['nrm_ima']]

    return dcmlst
765744
def targets(tgt, tgt_type='glob', **kwargs):
    '''
    
    '''
    rmatcher = RosterMatcher(tgt, tgt_type)
    return rmatcher.targets()
1254364
def get_sources(self, resources):
        

        rtype = self.rtype  # E.g. category
        label = self.props.label  # E.g. category1
        result = [
            resource
            for resource in resources.values()
            if is_reference_target(resource, rtype, label)
        ]
        return result
925007
def targets(self):
        
        for sample in self.runmetadata:
            if sample.general.bestassemblyfile != 'NA':
                setattr(sample, self.analysistype, GenObject())
                sample[self.analysistype].runanalysis = True
                sample[self.analysistype].targetpath = self.targetpath
                baitpath = os.path.join(self.targetpath, 'bait')
                sample[self.analysistype].baitfile = glob(os.path.join(baitpath, '*.fa'))[0]
                try:
                    sample[self.analysistype].outputdir = os.path.join(sample.run.outputdirectory, self.analysistype)
                except AttributeError:
                    sample[self.analysistype].outputdir = \
                        os.path.join(sample.general.outputdirectory, self.analysistype)
                    sample.run.outputdirectory = sample.general.outputdirectory
                sample[self.analysistype].logout = os.path.join(sample[self.analysistype].outputdir, 'logout.txt')
                sample[self.analysistype].logerr = os.path.join(sample[self.analysistype].outputdir, 'logerr.txt')
                sample[self.analysistype].baitedfastq = os.path.join(sample[self.analysistype].outputdir,
                                                                     '{}_targetMatches.fastq'.format(self.analysistype))
                sample[self.analysistype].complete = False
86638
def get_global_sources(self):
        
        sources = []
        if self.sources:
            for source in self.sources:
                if None in source.streams:
                    sources.append(source.streams[None])
        return sources
1209468
def get_source_files(target, build_context) -> list:
    """"""
    all_sources = list(target.props.sources)
    for proto_dep_name in target.props.protos:
        proto_dep = build_context.targets[proto_dep_name]
        all_sources.extend(proto_dep.artifacts.get(AT.gen_cc).keys())
    return all_sources
644468
def filter(self, sources):
        
        for src in sources:
            if hasattr(src, 'indices'):   # already filtered
                yield src
                continue
            box = self.integration_distance.get_affected_box(src)
            indices = self.sitecol.within_bbox(box)
            if len(indices):
                src.indices = indices
                yield src
1242971
def actualize_source_type (self, sources, prop_set):
        
        assert is_iterable_typed(sources, VirtualTarget)
        assert isinstance(prop_set, property_set.PropertySet)
        result = []
        for i in sources:
            scanner = None

# FIXME: what's this?
#            if isinstance (i, str):
#                i = self.manager_.get_object (i)

            if i.type ():
                scanner = b2.build.type.get_scanner (i.type (), prop_set)

            r = i.actualize (scanner)
            result.append (r)

        return result
1062639
def read_sources(sdmname):
    

    sdm = getsdm(sdmname)
    sourcedict = {}

    for row in sdm['Field']:
        src = str(row.fieldName)
        sourcenum = int(row.sourceId)
        direction = str(row.referenceDir)
        (ra,dec) = [float(val) for val in direction.split(' ')[3:]]  # skip first two values in string

        sourcedict[sourcenum] = {}
        sourcedict[sourcenum]['source'] = src
        sourcedict[sourcenum]['ra'] = ra
        sourcedict[sourcenum]['dec'] = dec

    return sourcedict
847692
def command_list(self, sources, _opt=False):
        ''''''
        def abspath(x):
            x = Path(x).abspath()
            if not x.exists():
                raise ValueError('file not found! ' + x)
            return x

        self.f_cpu = int(self.f_cpu)

        self.mcu = str(self.mcu)
#        if not self.mcu  in self.targets:
#            raise ValueError('invalid mcu:' + self.mcu)

        if not _opt:
            sources = [abspath(x) for x in sources]
        includes = [abspath(x) for x in self.includes]

        if not self.output:
            self.output = tempfile.NamedTemporaryFile(
                prefix='pyavrutils_', suffix='.elf', delete=0).name

        defines = self.defines + ['F_CPU=' + str(self.f_cpu)]

        cmd = [self.cc]
        if not self.use_only_extra_options:
            if not _opt:
                cmd += sources
            cmd += ['-D' + x for x in defines]
            cmd += ['-I' + x for x in includes]
            if not _opt:
                cmd += ['-o', self.output]
            cmd += ['-mmcu=' + self.mcu]
            cmd += ['--std=' + self.std]
            if self.relax:
                cmd += ['-Wl,--relax']
            if self.gc_sections:
                cmd += ['-Wl,--gc-sections']
            if self.ffunction_sections:
                cmd += ['-ffunction-sections']
            if self.fdata_sections:
                cmd += ['-fdata-sections']
            if self.fno_inline_small_functions:
                cmd += ['-fno-inline-small-functions']
            if self.optimization != 0:
                cmd += ['-O' + str(self.optimization)]

        cmd += self.options_extra
        return cmd
1074807
def _get_flat_db_sources(self, model):
        
        sources = []
        for source in self.sources:
            for sub_source in self.expand_source(source):
                target_field = self.resolve_source(model, sub_source)
                if target_field:
                    sources.append(sub_source)
        return sources
1074332
def link_sources(self):
        ""
        if isinstance(self, GenericOverlayPlot):
            zorders = []
        elif self.batched:
            zorders = list(range(self.zorder, self.zorder+len(self.hmap.last)))
        else:
            zorders = [self.zorder]

        if isinstance(self, GenericOverlayPlot) and not self.batched:
            sources = []
        elif not self.static or isinstance(self.hmap, DynamicMap):
            sources = [o for i, inputs in self.stream_sources.items()
                       for o in inputs if i in zorders]
        else:
            sources = [self.hmap.last]
        return sources
924193
def find_type_conversion(source_type, target_type):
    
    if type(source_type) == type(target_type):
        return 'identity'
    elif type(target_type) == FloatTensorType:
        return 'imageToFloatTensor'
    else:
        raise ValueError('Unsupported type conversion from %s to %s' % (
                         source_type, target_type))
335818
def add_dependency (self, targets, sources):
        
        if isinstance (targets, str):
            targets = [targets]
        if isinstance (sources, str):
            sources = [sources]
        assert is_iterable(targets)
        assert is_iterable(sources)

        for target in targets:
            for source in sources:
                self.do_add_dependency (target, source)
213772
def Main():
  
  argument_parser = argparse.ArgumentParser(
      description='Validates dtFabric format definitions.')

  argument_parser.add_argument(
      'source', nargs='?', action='store', metavar='PATH', default=None,
      help=(
          'path of the file or directory containing the dtFabric format '
          'definitions.'))

  options = argument_parser.parse_args()

  if not options.source:
    print('Source value is missing.')
    print('')
    argument_parser.print_help()
    print('')
    return False

  if not os.path.exists(options.source):
    print('No such file: {0:s}'.format(options.source))
    print('')
    return False

  logging.basicConfig(
      level=logging.INFO, format='[%(levelname)s] %(message)s')


  source_is_directory = os.path.isdir(options.source)

  validator = DefinitionsValidator()

  if source_is_directory:
    source_description = os.path.join(options.source, '*.yaml')
  else:
    source_description = options.source

  print('Validating dtFabric definitions in: {0:s}'.format(source_description))
  if source_is_directory:
    result = validator.CheckDirectory(options.source)
  else:
    result = validator.CheckFile(options.source)

  if not result:
    print('FAILURE')
  else:
    print('SUCCESS')

  return result
1246177
def sources(self):
        
        data = clips.data.DataObject(self._env)

        lib.EnvSlotSources(self._env, self._cls, self._name, data.byref)

        return tuple(data.value) if isinstance(data.value, list) else ()