set partition filter
502506
public void setPartitionFilter(Expression partitionFilter) throws IOException
    {
        UDFContext context = UDFContext.getUDFContext();
        Properties property = context.getUDFProperties(AbstractCassandraStorage.class);
        property.setProperty(PARTITION_FILTER_SIGNATURE, indexExpressionsToString(filterToIndexExpressions(partitionFilter)));
    }
27818
def setSNPFilter(self, chrom, start, stop):
        
        return _core.AGenotypeContainer_setSNPFilter(self, chrom, start, stop)
500031
def _set_data_filelist(self,
                           start_path,
                           attr_name,
                           conn,
                           file_exts=[],
                           dir_filter=set()):
        '''  '''

        def filter_path(filter_terms, dir_path):
            """ sees if any of the terms are present in the path if so returns
                True

            args:
                filter_terms(list): terms to check
                dir_path: the path of the directory
            """
            if filter_terms.intersection(set(dir_path.split(os.path.sep))):
                return True
            else:
                return False

        data_obj = {}
        files_dict = {}
        latest_mod = 0
        dir_filter = set(dir_filter)
        for root, dirnames, filenames in os.walk(start_path):
            if not dir_filter or filter_path(dir_filter, root):
                if file_exts:
                    filenames = [x for x in filenames
                                 if x.split('.')[-1].lower() in file_exts]
                files_dict[root] = filenames
                for def_file in filenames:
                    file_mod = os.path.getmtime(os.path.join(root,def_file))
                    if file_mod > latest_mod:
                        latest_mod = file_mod
        data_obj['latest_mod'] = latest_mod
        data_obj['files'] = files_dict
        json_mod = 0
        cache_path = os.path.join(CFG.CACHE_DATA_PATH, attr_name)
        if cache_path:
            for root, dirnames, filenames in os.walk(cache_path):
                for json_file in filenames:
                    file_mod = os.path.getmtime(os.path.join(root,json_file))
                    if file_mod > json_mod:
                        json_mod = file_mod
        data_obj['last_json_mod'] = json_mod
        data_obj['conn'] = conn
        data_obj['cache_path'] = cache_path
        self.datafile_obj[attr_name] = data_obj
1105556
public static logical_disk[] get_filtered(nitro_service service, String filter) throws Exception
	{
		logical_disk obj = new logical_disk();
		options option = new options();
		option.set_filter(filter);
		logical_disk[] response = (logical_disk[]) obj.getfiltered(service, option);
		return response;
	}
1115276
def list_current_filter_set(self,raw=False):
        """"""
        
        buf = []

        self.open_umanager()
        self.ser.write(''.join((self.cmd_current_filter_list,self.cr)))
        if self.read_loop(lambda x: x.endswith(self.umanager_prompt),self.timeout,lambda x,y,z: buf.append(y.rstrip()[:-1])):
            if raw:
                rv = buf = buf[0]
            else:
                rv, buf = self.filter_organizer(buf[0])
        else:
            raise Dam1021Error(16,"Failed to list currently selected filter set")
        self.close_umanager()

        log.info(buf)

        return rv
1353345
public void partitionedOutput(int reduce, K key, 
                                V value) throws IOException {
    PipesPartitioner.setNextPartition(reduce);
    collector.collect(key, value);
  }
552155
def filter(self, table, volumes, filter_string):
        """"""
        q = filter_string.lower()
        return [volume for volume in volumes
                if q in volume.name.lower()]
282957
public void setPartitions(java.util.Collection<Double> partitions) {
        if (partitions == null) {
            this.partitions = null;
            return;
        }

        this.partitions = new java.util.ArrayList<Double>(partitions);
    }
279992
public void setPartitionValueList(java.util.Collection<String> partitionValueList) {
        if (partitionValueList == null) {
            this.partitionValueList = null;
            return;
        }

        this.partitionValueList = new java.util.ArrayList<String>(partitionValueList);
    }
476570
private DBObject generateFilterQuery(MongoPartition partition) {

        if (mongoDeepJobConfig.getQuery() != null) {
            QueryBuilder queryBuilder = QueryBuilder.start();

            queryBuilder.and(createQueryPartition(partition), mongoDeepJobConfig.getQuery());

            LOG.debug("mongodb query "+queryBuilder.get());

            return queryBuilder.get();
        }

        return createQueryPartition(partition);

    }
491076
protected void setFileFilter()
   {
      String[] extensions = m_model.getExtensions();
      for (String extension : extensions)
      {
         m_fileChooser.setFileFilter(new FileNameExtensionFilter(extension.toUpperCase() + " Files", extension));
      }
      m_fileChooser.setFileFilter(new FileNameExtensionFilter("Project Files", m_model.getExtensions()));
   }
76663
function partitionArray(array, size) {
  return array.map((e, i) => (i % size === 0) ? array.slice(i, i + size) : null).filter((e) => e)
}
906366
public void setFilterParams(Map<String, Object> filterParams) {
        properties.put(ReplicationField.FILTER_PARAMS, filterParams);
        replicationInternal.setFilterParams(filterParams);
    }
512101
def partition(predicate, iterable):
    

    t1, t2 = tee(iterable)

    return filterfalse(predicate, t1), filter(predicate, t2)
943531
def set_filters(self, filters):
        
        if filters == None or isinstance(filters, (tuple, list)):
            self.filters = filters
        else:
            self.filters = [ filters ]
262001
def get_num_partitions_by_filter(self, db_name, tbl_name, filter):
    
    self.send_get_num_partitions_by_filter(db_name, tbl_name, filter)
    return self.recv_get_num_partitions_by_filter()
986386
def partition(pred, iterable):
    ''
    # partition(is_odd, range(10)) --> 0 2 4 6 8   and  1 3 5 7 9
    t1, t2 = itertools.tee(iterable)
    return list(filter(negate(pred), t1)), list(filter(pred, t2))