Filter DATA/SIZE commands that are overridden by a
        SIZE command.
171452
def _filter(self, commands, parser):
        
        resized = set()
        commands2 = []
        for command in reversed(commands):
            if command[0] == 'SHADERS':
                convert = parser.convert_shaders()
                if convert:
                    shaders = self._convert_shaders(convert, command[2:])
                    command = command[:2] + shaders
            elif command[1] in resized:
                if command[0] in ('SIZE', 'DATA'):
                    continue  # remove this command
            elif command[0] == 'SIZE':
                resized.add(command[1])
            commands2.append(command)
        return list(reversed(commands2))
717755
def _filter_filecommands(self, filecmd_iter):
        
        if self.includes is None and self.excludes is None:
            return list(filecmd_iter())

        # Do the filtering, adjusting for the new_root
        result = []
        for fc in filecmd_iter():
            if (isinstance(fc, commands.FileModifyCommand) or
                isinstance(fc, commands.FileDeleteCommand)):
                if self._path_to_be_kept(fc.path):
                    fc.path = self._adjust_for_new_root(fc.path)
                else:
                    continue
            elif isinstance(fc, commands.FileDeleteAllCommand):
                pass
            elif isinstance(fc, commands.FileRenameCommand):
                fc = self._convert_rename(fc)
            elif isinstance(fc, commands.FileCopyCommand):
                fc = self._convert_copy(fc)
            else:
                self.warning("cannot handle FileCommands of class %s - ignoring",
                        fc.__class__)
                continue
            if fc is not None:
                result.append(fc)
        return result
1101390
def rlw_filter(name, location, size, unsize):
    
    arch = _meta_.arch
    if arch.startswith("i") and arch.endswith("86"):
        arch = "i486"
    (fname, flocation, fsize, funsize) = ([] for i in range(4))
    for n, l, s, u in zip(name, location, size, unsize):
        loc = l.split("/")
        if arch == loc[-1]:
            fname.append(n)
            flocation.append(l)
            fsize.append(s)
            funsize.append(u)
    return [fname, flocation, fsize, funsize]
198187
def filter_input(keys, raw):
    """"""
    if len(keys) == 1:
        if keys[0] in UI.keys['up']:
            keys[0] = 'up'
        elif keys[0] in UI.keys['down']:
            keys[0] = 'down'
        elif len(keys[0]) == 4 and keys[0][0] == 'mouse press':
            if keys[0][1] == 4:
                keys[0] = 'up'
            elif keys[0][1] == 5:
                keys[0] = 'down'
    return keys
198410
def _trim_dict_in_dict(data, max_val_size, replace_with):
    '''
    
    '''
    for key in data:
        if isinstance(data[key], dict):
            _trim_dict_in_dict(data[key],
                               max_val_size,
                               replace_with)
        else:
            if sys.getsizeof(data[key]) > max_val_size:
                data[key] = replace_with
426629
def list_sizes(self, provider=None):
        '''
        
        '''
        mapper = salt.cloud.Map(self._opts_defaults())
        return salt.utils.data.simple_types_filter(
            mapper.size_list(provider)
        )
911214
def strip_command(self, command_string, output):
        """"""
        output_list = output.split(command_string)
        return self.RESPONSE_RETURN.join(output_list)
585676
def _parse_size(self, size, has_time=False):
        """"""
        if has_time:
            size = size or 4
        else:
            size = size or 10
        if isinstance(size, str):
            size = {'column': size}
        if isinstance(size, dict):
            if 'column' not in size:
                raise ValueError("`size` must include a 'column' key/value")
            if has_time:
                raise ValueError("When time is specified, size can "
                                 "only be a fixed size")
            old_size = size
            # Default size range, bins, and bin_method
            size = {
                'range': [5, 25],
                'bins': 5,
                'bin_method': BinMethod.quantiles,
            }
            # Assign default range and update if min/max given
            old_size['range'] = old_size.get('range', size['range'])
            if 'min' in old_size:
                old_size['range'][0] = old_size['min']
                old_size.pop('min')
            if 'max' in old_size:
                old_size['range'][1] = old_size['max']
                old_size.pop('max')
            # Update all the keys in size if they exist in old_size
            size.update(old_size)
            self.style_cols[size['column']] = None

        return size
776058
static public function commandLineDefaults() {
		if ( ! defined( 'PB_CONVERT_COMMAND' ) ) {
			define( 'PB_CONVERT_COMMAND', '/usr/bin/convert' );
		}
		if ( ! defined( 'PB_GS_COMMAND' ) ) {
			define( 'PB_GS_COMMAND', '/usr/bin/gs' );
		}
		if ( ! defined( 'PB_PDFINFO_COMMAND' ) ) {
			define( 'PB_PDFINFO_COMMAND', '/usr/bin/pdfinfo' );
		}
		if ( ! defined( 'PB_PDFTOPPM_COMMAND' ) ) {
			define( 'PB_PDFTOPPM_COMMAND', '/usr/bin/pdftoppm' );
		}
		if ( ! defined( 'PB_PRINCE_COMMAND' ) ) {
			define( 'PB_PRINCE_COMMAND', '/usr/bin/prince' );
		}
	}
615566
def undo_filter_sub(filter_unit, scanline, previous, result):
    """"""

    ai = 0
    # Loops starts at index fu.  Observe that the initial part
    # of the result is already filled in correctly with
    # scanline.
    for i in range(filter_unit, len(result)):
        x = scanline[i]
        a = result[ai]
        result[i] = (x + a) & 0xff
        ai += 1
1029413
def filter(self, table, mappings, filter_string):
        """"""
        q = filter_string.lower()
        return [mapping for mapping in mappings
                if q in mapping.ud.lower()]
367664
def filter_data(self, data, values=None, args=None):
        """"""
        if args:
            if not args.pattern:
                return data
        if not values: values = args.pattern
        newdata = {}
        if 'parser' in data.keys():
            newdata['parser'] = data['parser']
            newdata['source_path'] = data['source_path']
            newdata['source_file'] = data['source_file']
            newdata['source_file_mtime'] = data['source_file_mtime']
            newdata['source_file_year'] = data['source_file_year']
        newdata['entries'] = []

        repatterns = {}
        for pat in values:
            repatterns[pat] = re.compile(r".*({}).*".format(pat))

        for entry in data['entries']:
            for repat in repatterns:
                if re.match(repatterns[repat], entry['raw_text']):
                    newdata['entries'].append(entry)
                    break

        return newdata
915491
def filter_that(self, criteria, data):
        '''
            
        '''
        import re
        prog = re.compile(criteria)

        return True if prog.match(data) else False
425050
def to_s(n_cmds)
      show_size = n_cmds ? specific_max_size(n_cmds) : default_max_size

      commands = buffer.last(show_size)

      last_ids(show_size).zip(commands).map do |l|
        format("%<position>5d  %<command>s", position: l[0], command: l[1])
      end.join("\n") + "\n"
    end
211035
function filterRepresented(modules, files, options) {
    return _.filter(modules, function(module) {
      return !_.some(files, function(file) {
        // Look for the module name somewhere in the source path
        return (
          path
            .join(sep, options.srcPrefix, file.src.replace(rmain, '$1'), sep)
            .indexOf(sep + module + sep) > -1
        )
      })
    })
  }
271329
def filter_data(self, min_len, max_len):
        
        logging.info(f'Filtering data, min len: {min_len}, max len: {max_len}')

        initial_len = len(self.src)
        filtered_src = []
        for src in self.src:
            if min_len <= len(src) <= max_len:
                filtered_src.append(src)

        self.src = filtered_src
        filtered_len = len(self.src)
        logging.info(f'Pairs before: {initial_len}, after: {filtered_len}')
374594
private void filterCR(boolean moreData) {
        int i, j;

        readBufferOverflow = -1;

        loop: for (i = j = readBufferPos; j < readBufferLength; i++, j++) {
            switch (readBuffer[j]) {
                case '\r':
                    if (j == readBufferLength - 1) {
                        if (moreData) {
                            readBufferOverflow = '\r';
                            readBufferLength--;
                        } else // CR at end of buffer
                        {
                            readBuffer[i++] = '\n';
                        }
                        break loop;
                    } else if (readBuffer[j + 1] == '\n') {
                        j++;
                    }
                    readBuffer[i] = '\n';
                    break;

                case '\n':
                default:
                    readBuffer[i] = readBuffer[j];
                    break;
            }
        }
        readBufferLength = i;
    }