do not change interface, used by argus monitor
340166
public Map<String, Integer> openConnections() {
	Map<String, Integer> map = new HashMap<String, Integer>();
	Iterator<DCStack> it = dcs.values().iterator();

	// all connections in pool
	DCStack dcstack;
	while (it.hasNext()) {
	    dcstack = it.next();
	    Integer val = map.get(dcstack.getDatasource().getName());
	    if (val == null) val = dcstack.openConnections();
	    else val = val.intValue() + dcstack.openConnections();
	    map.put(dcstack.getDatasource().getName(), val);
	}
	return map;
    }
1221011
def off(device):
    '''
    
    '''
    cmd = 'quotaoff {0}'.format(device)
    __salt__['cmd.run'](cmd, python_shell=False)
    return True
500080
function(monitor) {
      var t = this;

      // Detach any prior monitor
      if (t.monitor) {
        t.detachMonitor();
      }

      // Watch for changes
      t.monitor = monitor;
      t.monitor.on('change', t.onMonitorChange, t);
    }
1000095
def stop(self, actor=None):
        
        if actor is None:
            actor = get_actor()
        if actor and actor.is_arbiter():
            monitor = actor.get_actor(self.name)
            if monitor:
                return monitor.stop()
        raise RuntimeError('Cannot stop application')
692929
def xlim_change_check(self, idx):
        ''''''
        if not self.xlim_pipe[1].poll():
            return
        xlim = self.xlim_pipe[1].recv()
        if xlim is None:
            return
        #print("recv: ", self.graph_num, xlim)
        if self.ax1 is not None and xlim != self.xlim:
            self.xlim = xlim
            self.fig.canvas.toolbar.push_current()
            #print("setting: ", self.graph_num, xlim)
            self.ax1.set_xlim(xlim)
            # trigger the timer, this allows us to setup a v slow animation,
            # which saves a lot of CPU
            self.ani.event_source._on_timer()
547995
public void stopMonitor() {
        logger.info("Stopping Directory Update Monitor");
        try {
            monitor.stop();
        } catch (IllegalStateException e) {
            logger.info("File alteration monitor is already stopped: " + e.getMessage());
        } catch (Exception e) {
            throw new RuntimeException(e.getMessage(), e);
        }
    }
194701
def _remove_monitor(monitors, handle, devices, events):
    """"""

    empty_devices = []

    for conn_string in devices:
        data = monitors.get(conn_string)
        if data is None:
            continue

        for event in events:
            event_dict = data.get(event)
            if event_dict is None:
                continue

            if handle in event_dict:
                del event_dict[handle]

            if len(event_dict) == 0:
                del data[event]

        if len(data) == 0:
            empty_devices.append(conn_string)

    return empty_devices
524245
def uninitialize_ui(self):
        

        LOGGER.debug("> Uninitializing '{0}' Component ui.".format(self.__class__.__name__))

        self.__remove_actions()

        # Signals / Slots.
        self.Port_spinBox.valueChanged.disconnect(self.__Port_spinBox__valueChanged)
        self.Address_lineEdit.editingFinished.disconnect(self.__Address_lineEdit__editFinished)
        self.File_Command_lineEdit.editingFinished.disconnect(self.__File_Command_lineEdit__editFinished)
        self.Connection_End_lineEdit.editingFinished.disconnect(self.__Connection_End_lineEdit__editFinished)

        self.initialized_ui = False
        return True
96669
def monitor(options={}):
    
    try:
        from IPython.display import display
    except ImportError:
        def display(stuff): return None

    class Monitor():
        def __init__(self, options={}):
            if os.getenv("WANDB_JUPYTER"):
                display(jupyter.Run())
            else:
                self.rm = False
                termerror(
                    "wandb.monitor is only functional in Jupyter notebooks")

        def __enter__(self):
            termlog(
                "DEPRECATED: with wandb.monitor(): is deprecated, just call wandb.monitor() to see live results.")
            pass

        def __exit__(self, *args):
            pass

    return Monitor(options)
163974
def _ignore_interrupts(self):
        
        signal.signal(signal.SIGINT, signal.SIG_IGN)
        signal.signal(signal.SIGTERM, signal.SIG_IGN)
967805
def stop_accepting_passive_svc_checks(self):
        
        if self.my_conf.accept_passive_service_checks:
            self.my_conf.modified_attributes |= DICT_MODATTR["MODATTR_PASSIVE_CHECKS_ENABLED"].value
            self.my_conf.accept_passive_service_checks = False
            self.my_conf.explode_global_conf()
            self.daemon.update_program_status()
632914
def teardown(self):
        '''
        
        '''
        self.monitor_thread.stop()
        self.monitor_thread = None
        super(BaseMonitor, self).teardown()
980290
private void cancelScan() {
        if (cleanTask != null) {
            cleanTask.cancel(true);
            cleanTask = null;
        }
        client.close();
    }
1069701
def setInterfaceAltSetting(self, interface, alt_setting):
        
        mayRaiseUSBError(libusb1.libusb_set_interface_alt_setting(
            self.__handle, interface, alt_setting,
        ))
181549
def disable(self, threads=True):
        
        if self.enabled_start:
            sys.settrace(None)
            self._disable()
        else:
            warn('Duplicate "disable" call')
566809
def _unregister_socket(s):
        '''
          
        '''
        with _lock:
            sock_queue = ApplicationLayer._to_app.pop(s._sockid())
        if not sock_queue.empty():
            log_warn("Socket being destroyed still has data enqueued for application layer.")
1286071
def turn_off(self, channel, callback=None):
        
        if callback is None:
            def callb():
                """No-op"""
                pass
            callback = callb
        message = velbus.SwitchRelayOffMessage(self._address)
        message.relay_channels = [channel]
        self._controller.send(message, callback)