backport of DMN v1.1
977684
public void compileNode(DecisionService ds, DMNCompilerImpl compiler, DMNModelImpl model) {
        DMNType type = null;
        if (ds.getVariable() == null) { // even for the v1.1 backport, variable creation is taken care in DMNCompiler.
            DMNCompilerHelper.reportMissingVariable(model, ds, ds, Msg.MISSING_VARIABLE_FOR_DS);
            return;
        }
        DMNCompilerHelper.checkVariableName(model, ds, ds.getName());
        if (ds.getVariable() != null && ds.getVariable().getTypeRef() != null) {
            type = compiler.resolveTypeRef(model, ds, ds.getVariable(), ds.getVariable().getTypeRef());
        } else {
            // for now the call bellow will return type UNKNOWN
            type = compiler.resolveTypeRef(model, ds, ds, null);
        }
        DecisionServiceNodeImpl bkmn = new DecisionServiceNodeImpl(ds, type);
        model.addDecisionService(bkmn);
    }
1004147
def get_input_data_port_m(self, data_port_id):
        
        for data_port_m in self.input_data_ports:
            if data_port_m.data_port.data_port_id == data_port_id:
                return data_port_m
        return None
1334309
def dcpf(self):
        
        dae = self.system.dae

        self.system.Bus.init0(dae)
        self.system.dae.init_g()

        Va0 = self.system.Bus.angle
        for model, pflow, gcall in zip(self.system.devman.devices, self.system.call.pflow, self.system.call.gcall):
            if pflow and gcall:
                self.system.__dict__[model].gcall(dae)

        sw = self.system.SW.a
        sw.sort(reverse=True)
        no_sw = self.system.Bus.a[:]
        no_swv = self.system.Bus.v[:]

        for item in sw:
            no_sw.pop(item)
            no_swv.pop(item)

        Bp = self.system.Line.Bp[no_sw, no_sw]
        p = matrix(self.system.dae.g[no_sw], (no_sw.__len__(), 1))
        p = p-self.system.Line.Bp[no_sw, sw]*Va0[sw]

        Sp = self.solver.symbolic(Bp)
        N = self.solver.numeric(Bp, Sp)
        self.solver.solve(Bp, Sp, N, p)
        self.system.dae.y[no_sw] = p

        self.solved = True
        self.niter = 1

        return self.solved, self.niter
1290782
function syncCurrentBackendInfo(projectInfo, backendDetails, awsDetails, callback){
    mobileProjectExport.retrieveYaml(projectInfo, function(){
        let currentBackendYamlFilePath = pathManager.getCurrentBackendYamlFilePath(projectInfo.ProjectPath)
        let backendProject = awsMobileYamlOps.readYamlFileSync(currentBackendYamlFilePath)
        if(callback){
            callback(backendProject)
        }
    })
}
1103332
private BlockingBackChannel initBackChannel() throws Exception {

		/* get the size of the memory available to the backchannel */
		int backChannelMemoryPages = getMemoryManager().computeNumberOfPages(this.config.getBackChannelMemory());

		/* allocate the memory available to the backchannel */
		List<MemorySegment> segments = new ArrayList<MemorySegment>();
		int segmentSize = getMemoryManager().getPageSize();
		getMemoryManager().allocatePages(this, segments, backChannelMemoryPages);

		/* instantiate the backchannel */
		BlockingBackChannel backChannel = new BlockingBackChannel(new SerializedUpdateBuffer(segments, segmentSize,
			getIOManager()));

		/* hand the backchannel over to the iteration tail */
		Broker<BlockingBackChannel> broker = BlockingBackChannelBroker.instance();
		broker.handIn(brokerKey(), backChannel);

		return backChannel;
	}
86438
def motor_primitive(self, m):
        
        return bounds_min_max(m, self.conf.m_mins, self.conf.m_maxs)
893152
def hdrtxt(xmethod, dmethod, opt):
    

    txt = ['Itn', 'Fnc', 'DFid', u('ℓ1'), 'Cnstr']
    if xmethod == 'admm':
        txt.extend(['r_X', 's_X', u('ρ_X')])
    else:
        if opt['CBPDN', 'BackTrack', 'Enabled']:
            txt.extend(['F_X', 'Q_X', 'It_X', 'L_X'])
        else:
            txt.append('L_X')
    if dmethod != 'fista':
        txt.extend(['r_D', 's_D', u('ρ_D')])
    else:
        if opt['CCMOD', 'BackTrack', 'Enabled']:
            txt.extend(['F_D', 'Q_D', 'It_D', 'L_D'])
        else:
            txt.append('L_D')
    return txt
476155
def back_dfs(self, start, end=None):
        
        return list(self.iterdfs(start, end, forward=False))
1066449
def _initDMinfo(self):
        
        self._mapLVtuple2dm = {}
        self._mapLVname2dm = {}
        self._vgTree = {}
        if self._dmMajorNum is None:
            self._initBlockMajorMap()
        for file in os.listdir(devmapperDir):
            mobj = re.match('([a-zA-Z0-9+_.\-]*[a-zA-Z0-9+_.])-([a-zA-Z0-9+_.][a-zA-Z0-9+_.\-]*)$', file)
            if mobj:
                path = os.path.join(devmapperDir, file)
                (major, minor) = self._getDevMajorMinor(path)
                if major == self._dmMajorNum:
                    vg = mobj.group(1).replace('--', '-')
                    lv = mobj.group(2).replace('--', '-')
                    dmdev = "dm-%d" % minor
                    self._mapLVtuple2dm[(vg,lv)] = dmdev
                    self._mapLVname2dm[file] = dmdev
                    if not vg in self._vgTree:
                        self._vgTree[vg] = []
                    self._vgTree[vg].append(lv)
610029
def mavlink_packet(self, m):
        ''''''
        sysid = (m.get_srcSystem(),m.get_srcComponent())
        self.add_new_target_system(sysid)
        self.pstate[sysid].handle_mavlink_packet(self.master, m)
1266992
function (fnCallbackAsyncL2) {
                    aArtifactsLocal.forEach(function (oItemLocal) {
                        var bFound = false;

                        aArtifactsServer.forEach(function (oItemServer) {
                            if (oItemLocal.type === oItemServer.type && oItemLocal.id === oItemServer.id) {
                                bFound = true;
                                aArtifactsSync.push({
                                    type: oItemLocal.type,
                                    id: oItemLocal.id,
                                    modif: util.MODIDF.update
                                });
                            }
                        });

                        if (bFound === false) {
                            aArtifactsSync.push({
                                type: oItemLocal.type,
                                id: oItemLocal.id,
                                modif: util.MODIDF.create
                            });
                        }
                    });

                    aArtifactsServer.forEach(function (oItemServer) {
                        var bFound = false;

                        aArtifactsLocal.forEach(function (oItemLocal) {
                            if (oItemLocal.type === oItemServer.type && oItemLocal.id === oItemServer.id) {
                                bFound = true;
                            }
                        });

                        if (bFound === false) {
                            aArtifactsSync.push({
                                type: oItemServer.type,
                                id: oItemServer.id,
                                modif: util.MODIDF.delete
                            });
                        }
                    });

                    fnCallbackAsyncL2(null, null);
                }
724566
def vnic_attach_to_network_standard(nicspec, network, logger):
        
        if nicspec and network_is_standard(network):
            network_name = network.name
            nicspec.device.backing = vim.vm.device.VirtualEthernetCard.NetworkBackingInfo()
            nicspec.device.backing.network = network

            nicspec.device.wakeOnLanEnabled = True
            nicspec.device.deviceInfo = vim.Description()

            nicspec.device.backing.deviceName = network_name

            nicspec.device.connectable = vim.vm.device.VirtualDevice.ConnectInfo()
            nicspec.device.connectable.startConnected = True
            nicspec.device.connectable.allowGuestControl = True

            logger.debug(u"Assigning network '{}' for vNIC".format(network_name))
        else:
            # logger.warn(u"Cannot assigning network '{}' for vNIC {}".format(network, nicspec))
            logger.warn(u"Cannot assigning network  for vNIC ".format(network, nicspec))
        return nicspec
105168
public static int cudnnLRNCrossChannelForward(
        cudnnHandle handle, 
        cudnnLRNDescriptor normDesc, 
        int lrnMode, 
        Pointer alpha, 
        cudnnTensorDescriptor xDesc, 
        Pointer x, 
        Pointer beta, 
        cudnnTensorDescriptor yDesc, 
        Pointer y)
    {
        return checkResult(cudnnLRNCrossChannelForwardNative(handle, normDesc, lrnMode, alpha, xDesc, x, beta, yDesc, y));
    }
233560
@Override
    public void backward() {
        modInX.getOutputAdj().elemAdd(yAdj);
        modInW.getOutputAdj().addValue(k, yAdj.getSum());
    }
877047
def get_dp(app, dpid):
    
    switches = topo_api.get_switch(app, dpid)
    if not switches:
        return None
    assert len(switches) == 1
    return switches[0].dp
486785
def v1(self):
        """"""
        Vm = self.system.dae.y[self.v]
        Va = self.system.dae.y[self.a]
        return polar(Vm[self.a1], Va[self.a1])
876759
def _get_nvdimm_n_status(self):
        
        try:
            nvdimm_n_status = self._get_bios_setting('NvDimmNMemFunctionality')
            if nvdimm_n_status == 'Enabled':
                nvn_status = True
            else:
                nvn_status = False
        except exception.IloCommandNotSupportedError:
            nvn_status = False
        return nvn_status