Parses a killer into a dictionary.

        Parameters
        ----------
        killer: :class:`str`
            The killer's raw HTML string.

        Returns
        -------
        :class:`dict`: A dictionary containing the killer's info.
194207
def _parse_killer(cls, killer):
        
        # If the killer contains a link, it is a player.
        if "href" in killer:
            killer_dict = {"name": link_content.search(killer).group(1), "player": True}
        else:
            killer_dict = {"name": killer, "player": False}
        # Check if it contains a summon.
        m = death_summon.search(killer)
        if m:
            killer_dict["summon"] = m.group("summon")
        return killer_dict
821422
def _parse_html(self):
        
        self.parsed_html = soup = BeautifulSoup(self.html, 'html.parser')
        self.scripts = [script['src'] for script in
                        soup.findAll('script', src=True)]
        self.meta = {
            meta['name'].lower():
                meta['content'] for meta in soup.findAll(
                    'meta', attrs=dict(name=True, content=True))
        }
1317434
def as_dict(self):
        
        output_dictionary = dict()

        for key, value in iter(self._key_map.items()):
            if isinstance(value, bool):
                output_dictionary[key] = value
            elif isinstance(value, self.__class__):
                output_dictionary[key] = value.as_dict()

        return output_dictionary
912874
def asdict(self):
        
        return {
            "methods": {m.name: m.asdict() for m in self.methods},
            "protocols": self.protocols,
            "notifications": {n.name: n.asdict() for n in self.notifications},
        }
207518
def to_dict(self):
    
    ret = {}
    for key in ['name', 'cmd', 'id', 'start_time', 'end_time',
                'outcome', 'start_time_string', 'start_delta_string']:
      val = getattr(self, key)
      ret[key] = val() if hasattr(val, '__call__') else val
    ret['parent'] = self.parent.to_dict() if self.parent else None
    return ret
167776
def as_dict(self):
        
        drepr = {}
        drepr["name"] = self.name
        drepr["time"] = self.time
        # error pre-serialisation
        drepr["errors"] = [str(err) for err in self.errors]
        # warning  pre-serialisation
        drepr["warnings"] = [str(warn) for warn in self.warnings]
        return drepr
1255194
def to_dict(self):
        
        result = {}
        for name in self.__dict__:
            if name.startswith("_"):
                continue

            key = name.replace("_", "-")
            attr = getattr(self, name)
            result[key] = attr.to_dict() if hasattr(attr, "to_dict") else attr

        return result
1337309
def to_dict(self):
        
        result = super(ActorHandler, self).to_dict()
        result["type"] = "ActorHandler"
        del result["config"]["actors"]
        result["actors"] = []
        for actor in self.actors:
            result["actors"].append(actor.to_dict())
        return result
317654
def to_dict(self):
        
        return dict((parameter.name, parameter.value) for parameter in self.values())
245919
def request_to_dict(self, request):
        '''
        
        '''
        req_dict = {
            # urls should be safe (safe_string_url)
            'url': to_unicode(request.url),
            'method': request.method,
            'headers': dict(request.headers),
            'body': request.body,
            'cookies': request.cookies,
            'meta': request.meta,
            '_encoding': request._encoding,
            'priority': request.priority,
            'dont_filter': request.dont_filter,
             #  callback/errback are assumed to be a bound instance of the spider
            'callback': None if request.callback is None else request.callback.__name__,
            'errback': None if request.errback is None else request.errback.__name__,
        }
        return req_dict
1310904
def as_dict(self):
        
        return {"@module": self.__class__.__module__,
                "@class": self.__class__.__name__,
                "additional_condition": self._additional_condition}
1149523
def as_dict(self):
        
        tags_dict = dict(self)
        tags_dict['@module'] = self.__class__.__module__
        tags_dict['@class'] = self.__class__.__name__
        return tags_dict
163229
def to_dict(self):
        

        input_dict = super(Standardize, self)._save_to_input_dict()
        input_dict["class"] = "GPy.util.normalizer.Standardize"
        if self.mean is not None:
            input_dict["mean"] = self.mean.tolist()
            input_dict["std"] = self.std.tolist()
        return input_dict
415544
def to_dict(self):
        
        return dict((k, str(self.get(k))) for k in self.raw_dict)
868061
def to_dict(self):
        
        return {
            'type': self.__class__.__name__,
            'element_id': self.element_id,
            'style_class': self.style_class,
            'icon': self.icon,
            'attributes': self.attributes
        }
105250
def serialize(d):
    
    ret = {}
    for k,v in d.items():
        if not k.startswith('_'):
            ret[k] = str(d[k])
    #ret['__class__'] = obj.__class__.__name__
    return ret
601899
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'warning_id') and self.warning_id is not None:
            _dict['warning_id'] = self.warning_id
        if hasattr(self, 'description') and self.description is not None:
            _dict['description'] = self.description
        return _dict