clean up marked objects and return result
553131
function match_objects_teardown( o, p, result ) {
        if ( get_type( o ) == 'object' ) { cleanMarks( o ); }
        if ( get_type( p ) == 'object' ) { cleanMarks( p ); }
        return result;
    }
213106
def clean(inputline, strip=True, rem_indents=True, encoding_errors="replace"):
    """"""
    stdout_encoding = get_encoding(sys.stdout)
    inputline = str(inputline)
    if rem_indents:
        inputline = inputline.replace(openindent, "").replace(closeindent, "")
    if strip:
        inputline = inputline.strip()
    return inputline.encode(stdout_encoding, encoding_errors).decode(stdout_encoding)
516233
function cleanData(originalData) {
            return originalData.reduce((acc, d) => {
                d.value = +d[valueLabel];
                d.key = String(d[nameLabel]);

                return [...acc, d];
            }, []);
        }
626161
function sweep() {

    # remove used values
    foreach (array_keys($this->flash) as $k) {
      if ($this->used[$k]) {
        unset($this->flash[$k], $this->used[$k]);
      } else {
        $this->_use($k);
      }
    }

    # cleanup if someone meddled with flash or used
    $fkeys = array_keys($this->flash);
    $ukeys = array_keys($this->used);
    foreach (array_diff($fkeys, $ukeys) as $k => $v) {
      unset($this->used[$k]);
    }
  }
1348351
def clean_highlight(self):
        
        if not self.valid:
            return

        for hit in self._results['hits']['hits']:
            if 'highlight' in hit:
                hl = hit['highlight']
                for key, item in list(hl.items()):
                    if not item:
                        del hl[key]
993288
def clean(docs=False, bytecode=False, extra=''):
    ''''''
    patterns = ['build', 'dist', 'cover', 'docs/_build', '**/*.pyc', '*.egg-info', '.tox', '**/__pycache__']
    for pattern in patterns:
        print('Removing {0}'.format(pattern))
        lrun('rm -rf {0}'.format(pattern))
772036
def cleanup(self) -> typing.Dict:
        
        return {k: v for k, v in self.prepare().items() if v is not None}
228306
def clean(source):
    

    if isinstance(source, dict):
        for key, value in source.items():
            if key == "Fn::Join":
                return convert_join(value)
            else:
                source[key] = clean(value)

    elif isinstance(source, list):
        return [clean(item) for item in source]

    return source
1067716
def cleanup(args):
    
    with _catalog(args) as cat:
        n, d, r = len(cat), [], []
        for obj in cat:
            if not obj.bitstreams:
                if obj.is_special:
                    print('removing {0} from catalog'.format(obj.id))
                    r.append(obj)
                else:
                    print('deleting {0} from CDSTAR'.format(obj.id))
                    d.append(obj)
        for obj in d:
            cat.delete(obj)
        for obj in r:
            cat.remove(obj)
        args.log.info('{0} objects deleted'.format(n - len(cat)))
        return n - len(cat)
572347
def _clean_data(self, str_value, file_data, obj_value):
        """"""
        str_value = str_value or None
        obj_value = obj_value or None
        return (str_value, None, obj_value)
663689
def cleanup(self):
        
        remove = []
        for handle, assoc in self.assocs.iteritems():
            if assoc.getExpiresIn() == 0:
                remove.append(handle)
        for handle in remove:
            del self.assocs[handle]
        return len(remove), len(self.assocs)
1268256
def clean(self):
        
        for key, value in self.values.copy().items():
            if value is None:
                del self.values[key]
169642
def cleanup(bucket, prefix, versions)
      objects = @con.get_bucket(bucket, :prefix => prefix).body['Contents']

      return if objects.size <= versions

      objects[0...(objects.size - versions)].each do |o|
       Mongolicious.logger.info("Removing outdated version #{o['Key']}")
       @con.delete_object(bucket, o['Key'])
      end
    end
729904
def scrub(data):
    """"""
    # blanks, Nones, and empty strings can stay as is
    if not data:
        return data
    if isinstance(data, (int, float)):
        return data
    if isinstance(data, list):
        return [scrub(entry) for entry in data]
    if isinstance(data, dict):
        return {scrub(key): scrub(value) for key, value in data.items()}
    try:
        return json.encoder.encode_basestring(data)[1:-1]
    except TypeError as exc:
        raise ValidationError("Input '%s' is not a permitted type: %s" % (data,
                                                                          exc))
    except Exception as exc:
        raise ValidationError("Input '%s' not permitted: %s" % (data, exc))
803948
function cleanDoclets(desc) {
  var idx = desc.indexOf('@');
  return (idx === -1 ? desc : desc.substr(0, idx)).trim();
}
152615
function clean(method) {
  for (let m of methods) {
    if (new RegExp(m, 'i').test(method)) {
      return m;
    }
  }

  throw new Error(`Invalid method name: ${method}`);
}
434374
def cleanup(self):
        
        empty_keys = [k for k, v in self.items() if not v]

        for k in empty_keys:
            del self[k]