find drones for given filter and sends response
496124
function sendDrones(filter, res) {
    droneModel.getProcessed(filter, function(err, result) {
      if (err)
        return haibu.sendResponse(res, 500, err);

      haibu.sendResponse(res, 200, {drones: result});
    });
  }
1280118
function filter (resources, req) {
  util.debug("There are %d resources in %s", resources.length, req.path);

  if (resources.length > 0) {
    // If there are query params, then filter the collection by them
    let queryParams = _.filter(req.swagger.params, { in: "query" });
    if (queryParams.length > 0) {
      // Build the filter object
      let filterCriteria = { data: {}};
      queryParams.forEach((param) => {
        if (req.query[param.name] !== undefined) {
          setDeepProperty(filterCriteria.data, param.name, req.query[param.name]);
        }
      });

      if (!_.isEmpty(filterCriteria.data)) {
        // Filter the collection
        util.debug("Filtering resources by %j", filterCriteria.data);
        resources = _.filter(resources, filterCriteria);
        util.debug("%d resources matched the filter criteria", resources.length);
      }
    }
  }

  return resources;
}
231669
def alphafilter(request, queryset, template):
    

    qs_filter = {}
    for key in list(request.GET.keys()):
        if '__istartswith' in key:
            qs_filter[str(key)] = request.GET[key]
            break

    return render_to_response(
        template,
        {'objects': queryset.filter(**qs_filter),
         'unfiltered_objects': queryset},
        context_instance=RequestContext(request)
    )
658080
public static ipset[] get_filtered(nitro_service service, String filter) throws Exception{
		ipset obj = new ipset();
		options option = new options();
		option.set_filter(filter);
		ipset[] response = (ipset[]) obj.getfiltered(service, option);
		return response;
	}
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))
554266
public static vpnurl[] get_filtered(nitro_service service, String filter) throws Exception{
		vpnurl obj = new vpnurl();
		options option = new options();
		option.set_filter(filter);
		vpnurl[] response = (vpnurl[]) obj.getfiltered(service, option);
		return response;
	}
162062
public int filterObject(CaptureSearchResult r) {
		int filterResult = ObjectFilter.FILTER_EXCLUDE; 
		
		try {
			PerfStats.timeStart(PerfStat.RobotsTotal);
			
			if(!notifiedSeen) {
				if(filterGroup != null) {
					filterGroup.setSawRobots();
				}
				notifiedSeen = true;
			}
			String resultURL = r.getOriginalUrl();
			String path = UrlOperations.getURLPath(resultURL);
			
			if (path.equals(ROBOT_SUFFIX) || r.isRobotIgnore()) {
				if(!notifiedPassed) {
					if(filterGroup != null) {
						filterGroup.setPassedRobots();
					}
					notifiedPassed = true;
				}
				return ObjectFilter.FILTER_INCLUDE;
			}
			
			if (pathsCache == null) {
				pathsCache = new HashMap<String,Integer>();
			} else {
				Integer result = pathsCache.get(r.getUrlKey());
				if (result != null) {
					return result;
				}
			}
			
			RobotRules rules = getRules(r);
			
			if(rules == null) {
				if((filterGroup == null) || (filterGroup.getRobotTimedOut() || filterGroup.getLiveWebGone())) {
					filterResult = ObjectFilter.FILTER_ABORT;
				}
			} else {
				if(!rules.blocksPathForUA(path, userAgent)) {
					if(!notifiedPassed) {
						if(filterGroup != null) {
							filterGroup.setPassedRobots();
						}
						notifiedPassed = true;
					}
					filterResult = ObjectFilter.FILTER_INCLUDE;
					LOGGER.finer("ROBOT: ALLOWED("+resultURL+")");
				} else {
					LOGGER.fine("ROBOT: BLOCKED("+resultURL+")");
				}
			}
			pathsCache.put(r.getUrlKey(), filterResult);
		} finally {
			PerfStats.timeEnd(PerfStat.RobotsTotal, false);
		}
		
		return filterResult;
	}
516582
function(isGlobal, server, err, msg, session, resp, opts, cb) {
  if(isGlobal) {
    cb(err, resp, opts);
    // after filter should not interfere response
    afterFilter(isGlobal, server, err, msg, session, resp, opts, cb);
  } else {
    afterFilter(isGlobal, server, err, msg, session, resp, opts, cb);
  }
}
217244
function _get_filters(filter_manager){

    var lstate = filter_manager.get_filter_query_string();
    var lparams = bbop.url_parameters(decodeURIComponent(lstate));
    var filters_as_strings = [];
    us.each(lparams, function(lparam){
	if( lparam[0] === 'fq' && lparam[1] ){
	    filters_as_strings.push(lparam[1]);
	}
    });
    //console.log('pass filter state: ', filters_as_strings);

    return filters_as_strings;
}
297945
def _match_filters(parameter, filters=None):
        """"""
        for filter_obj in (filters or []):
            key = filter_obj['Key']
            option = filter_obj.get('Option', 'Equals')
            values = filter_obj.get('Values', [])

            what = None
            if key == 'Type':
                what = parameter.type
            elif key == 'KeyId':
                what = parameter.keyid

            if option == 'Equals'\
                    and not any(what == value for value in values):
                return False
            elif option == 'BeginsWith'\
                    and not any(what.startswith(value) for value in values):
                return False
        # True if no false match (or no filters at all)
        return True
88442
function findBlinkSticks (filter) {
    if (filter === undefined) filter = function () { return true; };

    var result = [], device, i, devices;

    if (isWin) {
        devices = usb.devices();

        for (i in devices) {
            device = devices[i];

            if (device.vendorId === VENDOR_ID &&
                device.productId === PRODUCT_ID &&
                    filter(device))
                {
                    result.push(new BlinkStick(device.path, device.serialNumber, device.manufacturer, device.product));
                }
        }

    } else {
        devices = usb.getDeviceList();

        for (i in devices) {
            device = devices[i];
            if (device.deviceDescriptor.idVendor === VENDOR_ID &&
                device.deviceDescriptor.idProduct === PRODUCT_ID &&
                    filter(device))
                result.push(new BlinkStick(device));
        }
    }

    return result;
}
221646
def list_matching(self, ref_name: str, filter_: str) \
            -> Iterable[ListEntry]:
        
        canonical, canonical_i = self._get_pattern(ref_name + filter_)
        for entry in self.list():
            if entry.name == 'INBOX':
                if canonical_i.match('INBOX'):
                    yield entry
            elif canonical.match(entry.name):
                yield entry
950759
function filter(fp, opts) {
  if (opts && opts.filter) {
    return opts.filter(fp, opts);
  }
  return /[^x]\.js$/.test(fp);
}
482276
def get_filters_values(self):
        
        return [(flt, value) for flt, value in zip(self.filters, self.values)]
262531
def apply_filter(x, filter=None, axis=0):
    """"""
    x = _as_array(x)
    if x.shape[axis] == 0:
        return x
    b, a = filter
    return signal.filtfilt(b, a, x, axis=axis)
338967
function (filters, tpl) {
      for (var i = 0; i < filters.length; ++i) {
        tpl = filters[i](tpl)
      }
      return tpl
    }
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