Add an interfaces to a slice
487504
def virtual_interface_create(self, name, net_name):
        '''
        
        '''
        nt_ks = self.compute_conn
        serverid = self._server_uuid_from_name(name)
        networkid = self.network_show(net_name).get('id', None)
        if networkid is None:
            return {net_name: False}
        nets = nt_ks.virtual_interfaces.create(networkid, serverid)
        return nets
86937
def __insert_wrapper(func):
        """"""
        def check_func(self, key, new_item, instance=0):
            if key not in self.keys():
                raise KeyError("%s not a key in label" % (key))
            if not isinstance(new_item, (list, OrderedMultiDict)):
                raise TypeError("The new item must be a list or PVLModule")
            if isinstance(new_item, OrderedMultiDict):
                new_item = list(new_item)
            return func(self, key, new_item, instance)
        return check_func
301563
function populateApiFromInterface(api, iface) {
  Object.keys(iface).forEach(function (key) {
    api.add(key, iface[key]);
  });
}
1154852
def add_type_struct_or_union(self, name, interp, node):
        
        self.add_type_class(name, StructUnionDef(name, interp, node))
712171
public void addInterface(Class<?> ifc) {

        LettuceAssert.notNull(ifc, "Interface type must not be null");
        LettuceAssert.isTrue(ifc.isInterface(), "Type must be an interface");

        this.interfaces.add(ifc);
    }
786895
def p_Interface(p):
  
  p[0] = model.Interface(name=p[2], parent=p[3], members=p[5])
1318742
def addif(self, iface):
        '''  '''
        if type(iface) == ifconfig.Interface:
            devindex = iface.index
        else:
            devindex = ifconfig.Interface(iface).index
        ifreq = struct.pack('16si', self.name, devindex)
        fcntl.ioctl(ifconfig.sockfd, SIOCBRADDIF, ifreq)
        return self
897622
def parse_implements_interfaces(lexer: Lexer) -> List[NamedTypeNode]:
    """"""
    types: List[NamedTypeNode] = []
    if expect_optional_keyword(lexer, "implements"):
        # optional leading ampersand
        expect_optional_token(lexer, TokenKind.AMP)
        append = types.append
        while True:
            append(parse_named_type(lexer))
            if not expect_optional_token(lexer, TokenKind.AMP):
                break
    return types
138845
def _slice_at(self, index, length=1):
        """"""
        length_ = len(self)
        if -length <= index < 0:
            index += length_
        return slice(index, index + length)
739656
def EnumerateInterfacesFromClient(args):
  """"""
  del args  # Unused

  libc = ctypes.cdll.LoadLibrary(ctypes.util.find_library("c"))
  ifa = Ifaddrs()
  p_ifa = ctypes.pointer(ifa)
  libc.getifaddrs(ctypes.pointer(p_ifa))

  for iface in ParseIfaddrs(p_ifa):
    yield iface

  libc.freeifaddrs(p_ifa)
1175582
function appendInternal(that, propertyList, args, options) {
    var arrayToAppend = args[0]
    if(arrayToAppend.length === 0) return; //nothing to do

    var array = getPropertyValue(that.subject, propertyList)
    var originalLength = array.length

    var spliceArgs = [originalLength, 0]
    spliceArgs = spliceArgs.concat(arrayToAppend)
    var oldLength = array.length
    array.splice.apply(array, spliceArgs)

    var internalObservees = unionizeList(array, oldLength, array.length, options.union)

    var event = {type: 'added', property: propertyList, index: originalLength, count: arrayToAppend.length}
    if(options.data !== undefined) event.data = event.id = options.data
    that.emit('change', event)

    unionizeListEvents(that, internalObservees, propertyList, options.union)
}
59017
function slice(source, keys){
    var result = {};

    if (!keys)
      return extend(result, source);

    for (var i = 0, key; key = keys[i++];)
      if (key in source)
        result[key] = source[key];

    return result;
  }
1215951
def add(self,  i, val):
        
        assert i > 0
        while i < len(self.s):
            self.s[i] += val
            i += (i & -i)
1076721
@Override
    public void addVertex(InterproceduralCallGraphVertex v) {
        super.addVertex(v);
        methodDescToVertexMap.put(v.getXmethod().getMethodDescriptor(), v);
    }
166927
def add_overlay_to_slice_file(
        self,
        filename,
        overlay,
        i_overlay,
        filename_out=None
    ):
        
        if filename_out is None:
            filename_out = filename
        filename = op.expanduser(filename)
        data = dicom.read_file(filename)
        data = self.encode_overlay_slice(data, overlay, i_overlay)
        data.save_as(filename_out)
636476
private static void collectInterfaces(Set<Class<?>> interfaces, Class<?> anInterface) {
        interfaces.add(anInterface);
        for (Class<?> superInterface : anInterface.getInterfaces()) {
            collectInterfaces(interfaces, superInterface);
        }
    }
1372639
def interface(iface):
    '''
    
    '''
    iface_info, error = _get_iface_info(iface)

    if error is False:
        return iface_info.get(iface, {}).get('inet', '')
    else:
        return error