:param filters: filters to apply on messages. See docker api.
        :return: an iterable that contains events from docker. See the docker api for content.
487425
def event_stream(self, filters=None):
        
        if filters is None:
            filters = {}
        return self._docker.events(decode=True, filters=filters)
1365630
def filtered(self, efilter):
        '''
        
        '''
        if not self.params:
            self.params={'filter' : efilter}
            return self
        if not self.params.has_key('filter'):
            self.params['filter'] = efilter
            return self
        self.params['filter'].update(efilter)
        return self
1020048
async def ListFilesystems(self, filters):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Storage',
                   request='ListFilesystems',
                   version=4,
                   params=_params)
        _params['filters'] = filters
        reply = await self.rpc(msg)
        return reply
1189132
def show(self, filter=None):
        
        for command in self._commands:
            if command[0] is None:  # or command[1] in self._invalid_objects:
                continue  # Skip nill commands
            if filter and command[0] != filter:
                continue
            t = []
            for e in command:
                if isinstance(e, np.ndarray):
                    t.append('array %s' % str(e.shape))
                elif isinstance(e, str):
                    s = e.strip()
                    if len(s) > 20:
                        s = s[:18] + '... %i lines' % (e.count('\n')+1)
                    t.append(s)
                else:
                    t.append(e)
            print(tuple(t))
122978
def _parse_cli_filters(filters):
        
        parsed_filters = []
        for filter_entry in filters:
            filter_parts = re.match('^Name=(?P<name_value>[^,]+),Values=\[?(?P<key_values>[^\]]+)\]?', filter_entry)
            parsed_filters.append({
                'Name': filter_parts.group('name_value'),
                'Values': filter_parts.group('key_values').split(',')
            })
        return parsed_filters
880137
private List<Event> filterEvents(List<Event> events) {
        List<Event> filteredEvents = new ArrayList<Event>();
        for (Event event : events) {
            if (!filter(event)) {
                filteredEvents.add(event);
            }
        }
        return filteredEvents;
    }
514826
def filter_events(cls, client, event_data):
        """"""

        for event in cls.events:
            # try event filters
            if event.matches(client, event_data):
                yield event
1136743
def addFilter(self, filter):
        
        self.FILTERS.append(filter)
        return "FILTER#{}".format(len(self.FILTERS) - 1)
56539
def filter(self):
        
        if isinstance(self._filter, str):
            return self._decode_query(self._filter)
        return self._filter
1200004
def build_filters(self, view, filters=None):
        
        query_builder = self.get_query_builder(backend=self, view=view)
        return query_builder.build_query(**(filters if filters else {}))
1276868
public static auditmessages[] get_filtered(nitro_service service, String filter) throws Exception{
		auditmessages obj = new auditmessages();
		options option = new options();
		option.set_filter(filter);
		auditmessages[] response = (auditmessages[]) obj.getfiltered(service, option);
		return response;
	}
311517
def running_containers(name_filter: str) -> List[str]:
    
    return [container.short_id for container in
            docker_client.containers.list(filters={"name": name_filter})]
425894
def msg_filter(self):
        
        if self.query:
            msg_filter = None
        else:
            msg_filter = self._request_request('msg_filter', 'all')
            available_msg_filters = {'untranslated', 'translated', 'fuzzy', 'all'}
            if msg_filter not in available_msg_filters:
                msg_filter = 'all'
        return msg_filter
35415
def build_filter(self, filter):
        
        try:
            self.filter = Filter.from_string(filter, self.limit)
        except ValueError:
            raise

        return self
937590
def filter(self, containers=True, images=True, stopped=True, cached=False, sort_by_created=True):
        
        content = []
        containers_o = None
        images_o = None
        # return containers when containers=False and running=True
        if containers or not stopped:
            containers_o = self.get_containers(cached=cached, stopped=stopped)
            content += containers_o.response
        if images:
            images_o = self.get_images(cached=cached)
            content += images_o.response
        if sort_by_created:
            content.sort(key=attrgetter("natural_sort_value"), reverse=True)
        return content, containers_o, images_o
248384
def get_tokens(self, filters={}):
        
        uri = 'tokens'

        if filters:
            filters = {'filters': json.dumps(filters)}
            uri += "?%s" % urllib.urlencode(filters, True)

        resp, body = self.get(uri)
        self.expected_success(200, resp.status)
        body = json.loads(body)
        return rest_client.ResponseBody(resp, body)
306493
def find_by_filter(self, filters, all_items):
        
        items = []
        for i in self:
            failed = False
            if hasattr(i, "host"):
                all_items["service"] = i
            else:
                all_items["host"] = i
            for filt in filters:
                if not filt(all_items):
                    failed = True
                    break
            if failed is False:
                items.append(i)
        return items