Set the watchlist to the given tubes

        :param tubes: A list of tubes to watch

        Automatically un-watches any tubes that are not on the target list
554691
def watchlist(self, tubes):
        
        tubes = set(tubes)
        for tube in tubes - self._watchlist:
            self.watch(tube)
        for tube in self._watchlist - tubes:
            self.ignore(tube)
392492
def tube(self, name):
        
        if name in self._tubes:
            return self._tubes[name]

        assert name, 'Tube name must be specified'
        t = self._tube_cls(self, name)
        self._tubes[name] = t
        return t
7152
def _watch(self, path, current_level, max_level):
        

        # ephemeral znodes can't have children, so skip them
        stat = self._client.exists(path)
        if stat is None or stat.ephemeralOwner != 0:
            return

        try:
            children = self._client.get_children(path, self._watcher)
        except NoNodeError:
            children = []

        if max_level >= 0 and current_level + 1 > max_level:
            return

        for child in children:
            self._watch(os.path.join(path, child), current_level + 1, max_level)
946351
public function watch($tube) {
		$this->_write(sprintf('watch %s', $tube));
		$status = strtok($this->_read(), ' ');

		switch ($status) {
			case 'WATCHING':
				return (integer) strtok(' ');
			default:
				$this->_error($status);
				return false;
		}
	}
432068
def stop_watching(self):
        
        self._watch = False

        if self._observer:
            self._logger.info('Stopping watcher')
            self._observer.stop()
            self._logger.info('Watcher stopped')
1077877
def markUnwatched(self):
        
        key = '/:/unscrobble?key=%s&identifier=com.plexapp.plugins.library' % self.ratingKey
        self._server.query(key)
        self.reload()
671070
function setupWatchers(path) {
    // We want to track the watchers now and return if we are already watching this folder
    if (watchingFolders[path]) { return; }

    watchingFolders[path] = fs.watch(path, getWatcher(path + "/"));
    watchingFolders[path].on('error', function() {  verifyWatches(); });
    var fileList = fs.readdirSync(path);
    var stats;
    for (var i = 0; i < fileList.length; i++) {
        try {
            stats = fs.statSync(path + "/" + fileList[i]);
        }
        catch (e) {
            continue;
        }
        if (isWatching(fileList[i])) {
            timeStamps[path + "/" + fileList[i]] = stats.mtime.getTime();
        } else {
            if (stats.isDirectory()) {
                if (fileList[i] === "node_modules") {
                    watchingFolders[path + "/" + fileList[i]] = true;
                    continue;
                }
                if (fileList[i] === "tns_modules") {
                    watchingFolders[path + "/" + fileList[i]] = true;
                    continue;
                }
                if (fileList[i] === "App_Resources") {
                    watchingFolders[path + "/" + fileList[i]] = true;
                    continue;
                }
                setupWatchers(path + "/" + fileList[i]);
            }
        }
    }
}
626974
private function watchInotify()
    {
        if (($eventList = inotify_read($this->inotify)) === false) {
            return;
        }

        foreach ($eventList as $event) {
            $mask = $event['mask'];

            if ($mask & IN_DELETE_SELF || $mask & IN_MOVE_SELF) {
                $watchDescriptor = $event['wd'];
                if (inotify_rm_watch($this->inotify, $watchDescriptor)) {
                    unset($this->paths[$watchDescriptor]);
                }
                break;
            }
        }

        $this->runListeners();
    }
1108108
async def ignore_list(self, ctx):
        """"""

        ignored = self.config.get('ignored', [])
        channel_ids = set(c.id for c in ctx.message.server.channels)
        result = []
        for channel in ignored:
            if channel in channel_ids:
                result.append('<#{}>'.format(channel))

        if result:
            await self.bot.responses.basic(title="Ignored Channels:", message='\n\n{}'.format(', '.join(result)))
        else:
            await self.bot.responses.failure(message='I am not ignoring any channels here.')
1053991
def dont_stalk_buffer(self, bw, *argv, **argd):
        
        self.dont_watch_buffer(bw, *argv, **argd)
600674
def setCheckedItems(self, items):
        
        if not self.isCheckable():
            return
        
        model = self.model()
        for i in range(self.count()):
            item_text = self.itemText(i)
            if not item_text:
                continue
            
            if nativestring(item_text) in items:
                state = Qt.Checked
            else:
                state = Qt.Unchecked
            
            model.item(i).setCheckState(state)
103364
def set_channels(self, channels):
        
        for key in channels:
            self.set(key, channels[key])
1359666
def start_watching(self):
        
        if not self.is_sync:
            return

        self._stop = False
        while not self._stop:
            self.reactor.doIteration(0)
700436
def setup_callbacks(self, callbacks, monitors):
        
        assert isinstance(callbacks, list), callbacks
        assert isinstance(monitors, list), monitors
        describe_trainable_vars()   # TODO weird

        self.register_callback(MaintainStepCounter())
        for cb in callbacks:
            self.register_callback(cb)
        for cb in self._callbacks:
            assert not isinstance(cb, MonitorBase), "Monitor cannot be pre-registered for now!"
        registered_monitors = []
        for m in monitors:
            if self.register_callback(m):
                registered_monitors.append(m)
        self.monitors = Monitors(registered_monitors)
        self.register_callback(self.monitors)   # monitors is also a callback

        # some final operations that might modify the graph
        logger.info("Setup callbacks graph ...")
        self._callbacks = Callbacks(self._callbacks)
        self._callbacks.setup_graph(weakref.proxy(self))
1037630
def unwatch(self_,watcher):
        
        try:
            self_._watch('remove',watcher)
        except:
            self_.warning('No such watcher {watcher} to remove.'.format(watcher=watcher))
200795
function(file) {
    for(var i = 0; i < watchList.length; i++) {
        if(watchList[i].file === file) {
            watchers[i].close();
            watchList.splice(i, 1);
            watchers.splice(i, 1);
            return;
        }
    }
    throw new Error(file + " was not being watched previously");
}
654630
def claim_watches(user):
    
    Watch.objects.filter(email=user.email).update(email=None, user=user)