Returns the result of combining the values in this object with
the metadata on the given symbol.
420467
public Lint augment(Symbol sym) {
        Lint l = augmentor.augment(this, sym.getDeclarationAttributes());
        if (sym.isDeprecated()) {
            if (l == this)
                l = new Lint(this);
            l.values.remove(LintCategory.DEPRECATION);
            l.suppressedValues.add(LintCategory.DEPRECATION);
        }
        return l;
    }
225177
def get_combo(self, symbol):
        
        for parent, legs in self.instrument_combos.items():
            if symbol == parent or symbol in legs.keys():
                return {
                    "parent": self.get_instrument(parent),
                    "legs": legs,
                }
        return {
            "parent": None,
            "legs": {},
        }
1198916
public Attribute.Compound attribute(Symbol anno) {
        for (Attribute.Compound a : getRawAttributes()) {
            if (a.type.tsym == anno) return a;
        }
        return null;
    }
129606
def group_variant(self):
        
        v_mapping = {symdata.index: symdata.variant for symdata in self._symboldata_list}
        return v_mapping[self.group_num] or ""
971618
def combine_xml_points(l, units, handle_units):
    """"""
    ret = {}
    for item in l:
        for key, value in item.items():
            ret.setdefault(key, []).append(value)

    for key, value in ret.items():
        if key != 'date':
            ret[key] = handle_units(value, units.get(key, None))

    return ret
413208
def combineColumns(cols):
    ''
    return Column("+".join(c.name for c in cols),
                  getter=lambda col,row,cols=cols,ch=' ': ch.join(c.getDisplayValue(row) for c in cols))
946824
function mixinGameMetadata(game) {
    if (!game.metadata) game.metadata = {};
    if (!game.metadata.name) game.metadata.name = this.game.info.name;
    if (!game.metadata.description) {
        game.metadata.description = this.game.info.description;
    }
    if (!game.metadata.version) game.metadata.version = this.game.info.version;
}
1332532
def merged(cls, *flatterms: 'FlatTerm') -> 'FlatTerm':
        
        return cls(cls._combined_wildcards_iter(sum(flatterms, cls.empty())))
1315926
public void getAttributes(int symbol, Set<Attribute> internal, Set<Attribute> synthesized, Set<Attribute> inherited) {
        int i;
        int max;
        Attribute a;

        for (AttributionBuffer ab : attributions) {
            a = ab.result.attr;
            if (a.symbol == symbol) {
                if (ab.result.ofs == -1) {
                    synthesized.add(a);
                } else {
                    inherited.add(a);
                }
            }
        }
        max = internals.size();
        for (i = 0; i < max; i += 2) {
            a = (Attribute) internals.get(i);
            if (a.symbol == symbol) {
                internal.add(a);
            }
        }
    }
1337699
private Tuple toTuple( List<VarDef> combinedVars, TupleRef tupleRef)
    {
    if( tupleRef.size() != getTupleSize())
      {
      throw new IllegalStateException( String.valueOf( tupleRef) + " does not match combiner tuple size=" + getTupleSize());
      }

    Tuple tuple = new Tuple();
    for( Iterator<VarBinding> bindings = tupleRef.getVarBindings(); bindings.hasNext(); )
      {
      VarBinding binding = bindings.next();
      VarDef var = findVarPath( combinedVars, binding.getVar());
      if( var == null)
        {
        throw new IllegalStateException( "Var=" + binding.getVar() + " is not included in this combination");
        }

      VarValueDef value = var.getValue( binding.getValue());
      if( value == null)
        {
        throw new IllegalStateException( "Value=" + binding.getValue() + " is not defined for var=" + binding.getVar());
        }

      if( !value.isValid())
        {
        throw new IllegalStateException( "Value=" + binding.getValue() + " is a failure value for var=" + binding.getVar());
        }

      tuple.add( new VarBindingDef( var, value));
      }

    return tuple;
    }
681742
@Override
    protected TypeQualifierAnnotation combine(TypeQualifierAnnotation a, TypeQualifierAnnotation b) {
        return TypeQualifierAnnotation.combineParameterAnnotations(a, b);
    }
1189509
def merge_enums(xml):
    ''''''
    emap = {}
    for x in xml:
        newenums = []
        for enum in x.enum:
            if enum.name in emap:
                emapitem = emap[enum.name]
                # check for possible conflicting auto-assigned values after merge
                if (emapitem.start_value <= enum.highest_value and emapitem.highest_value >= enum.start_value):
                    for entry in emapitem.entry:
                        # correct the value if necessary, but only if it was auto-assigned to begin with
                        if entry.value <= enum.highest_value and entry.autovalue == True:
                            entry.value = enum.highest_value + 1
                            enum.highest_value = entry.value
                # merge the entries
                emapitem.entry.extend(enum.entry)
                if not emapitem.description:
                    emapitem.description = enum.description
                print("Merged enum %s" % enum.name)
            else:
                newenums.append(enum)
                emap[enum.name] = enum
        x.enum = newenums
    for e in emap:
        # sort by value
        emap[e].entry = sorted(emap[e].entry,
                               key=operator.attrgetter('value'),
                               reverse=False)
        # add a ENUM_END
        emap[e].entry.append(MAVEnumEntry("%s_ENUM_END" % emap[e].name,
                                            emap[e].entry[-1].value+1, end_marker=True))
1272286
def combine(self, node, othernode, op=None, unary_op=None, register=False,
                aliasing_type=False):
        
        if self.result[othernode] is self.builder.UnknownType:
            if node not in self.result:
                self.result[node] = self.builder.UnknownType
            return

        if aliasing_type:
            self.combine_(node, othernode, op or operator.add,
                          unary_op or (lambda x: x), register)
            for a in self.strict_aliases[node]:
                self.combine_(a, othernode, op or operator.add,
                              unary_op or (lambda x: x), register)
        else:
            self.combine_(node, othernode, op or operator.add,
                          unary_op or (lambda x: x), register)
717587
def _merge_metadata(samples):
    """"""
    samples = list(utils.flatten(samples))
    out_dir = dd.get_work_dir(samples[0])
    logger.info("summarize metadata")
    out_file = os.path.join(out_dir, "metadata.csv")
    sample_metrics = collections.defaultdict(dict)
    for s in samples:
        m = tz.get_in(['metadata'], s)
        if isinstance(m, six.string_types):
            m = json.loads(m)
        if m:
            for me in list(m.keys()):
                if isinstance(m[me], list) or isinstance(m[me], dict) or isinstance(m[me], tuple):
                    m.pop(me, None)
            sample_metrics[dd.get_sample_name(s)].update(m)
    pd.DataFrame(sample_metrics).transpose().to_csv(out_file)
    return out_file
606019
public static Icon from(Item item, int metadata)
	{
		Pair<Item, Integer> p = Pair.of(item, metadata);
		if (vanillaIcons.get(p) != null)
			return vanillaIcons.get(p);

		VanillaIcon icon = new VanillaIcon(item, metadata);
		vanillaIcons.put(p, icon);
		return icon;
	}
1115601
def combine(self, other, mean_free=False):
        
        w1 = self.w
        w2 = other.w
        w = w1 + w2
        # TODO: fix this div by zero error
        q = w2 / w1
        dsx = q * self.sx - other.sx
        dsy = q * self.sy - other.sy
        # update
        self.w = w1 + w2
        self.sx = self.sx + other.sx
        self.sy = self.sy + other.sy
        #
        if mean_free:
            if len(self.Mxy.shape) == 1:  # diagonal only
                d = dsx*dsy
            else:
                d = np.outer(dsx, dsy)
            self.Mxy += other.Mxy + (w1 / (w2 * w)) * d
        else:
            self.Mxy += other.Mxy
        return self
1158378
def all_combinations_for_elements(self, element_symbols):
        
        d = OrderedDict()
        for symbol in element_symbols:
            d[symbol] = self.select_symbols(symbol, ret_list=True)

        from itertools import product
        return list(product(*d.values()))