Dump memory to a temporary filename with the meliae package.
    @return: JSON filename where memory dump has been written to
    @rtype: string
166572
def write_memory_dump():
    
    # first do a full garbage collection run
    gc.collect()
    if gc.garbage:
        log.warn(LOG_CHECK, "Unreachabe objects: %s", pprint.pformat(gc.garbage))
    from meliae import scanner
    fo, filename = get_temp_file(mode='wb', suffix='.json', prefix='lcdump_')
    try:
        scanner.dump_all_objects(fo)
    finally:
        fo.close()
    return filename
947143
def dump(self):
        """"""

        return {
            'target': str(self.target),
            'data': base64.b64encode(self.data).decode('utf-8'),
            'var_id': self.var_id,
            'valid': self.valid
        }
1342220
def to_json_str(self):
    
    _json = self.to_json()
    try:
      return json.dumps(_json, sort_keys=True, cls=JsonEncoder)
    except:
      logging.exception("Could not serialize JSON: %r", _json)
      raise
399507
def dump(self):
        

        reading = self.reading
        if reading is not None:
            reading = reading.asdict()

        return {
            u'selector': str(self.selector),
            u'reading': reading
        }
1071342
def serialize(self):
        
        import yaml
        output = {"metadata": self.metadata, "sources": {},
                  "name": self.name}
        for key, entry in self.items():
            output["sources"][key] = entry._captured_init_kwargs
        return yaml.dump(output)
989937
def dump(self):
        
        # Find all nodes manually, as the Keep object isn't aware of new ListItems
        # until they've been synced to the server.
        nodes = []
        for node in self.all():
            nodes.append(node)
            for child in node.children:
                nodes.append(child)
        return {
            'keep_version': self._keep_version,
            'labels': [label.save(False) for label in self.labels()],
            'nodes': [node.save(False) for node in nodes]
        }
702418
def dump(self, file, sort_keys: bool = True, **kwargs) -> None:
        """"""
        json.dump(self.to_json(), file, sort_keys=sort_keys, **kwargs)
1322361
public void dumpMemory() {
    Double[] keys = memory.keySet().toArray(new Double[memory.keySet().size()]);
    Arrays.sort(keys);
    for (Double key : keys) {
      System.err.println(key + "\t" + memory.get(key));
    }
  }
126621
def dump_json(testcase, json_file):
    
    logging.info("dump testcase to JSON format.")

    with io.open(json_file, 'w', encoding="utf-8") as outfile:
        my_json_str = json.dumps(testcase, ensure_ascii=ensure_ascii, indent=4)
        if isinstance(my_json_str, bytes):
            my_json_str = my_json_str.decode("utf-8")

        outfile.write(my_json_str)

    logging.info("Generate JSON testcase successfully: {}".format(json_file))
1218924
def _dump(self):
        
        return {
            "topic": self.topic,
            "headers": self._headers,
            "id": self.id,
            "body": self.body,
            "queue": self.queue,
        }
1314743
def dumpJSON(self):
        
        g = get_root(self).globals
        return dict(
            RA=self.ra['text'],
            DEC=self.dec['text'],
            tel=g.cpars['telins_name'],
            alt=self._getVal(self.alt),
            az=self._getVal(self.az),
            secz=self._getVal(self.airmass),
            pa=self._getVal(self.pa),
            foc=self._getVal(self.focus),
            mdist=self._getVal(self.mdist)
        )
146493
def dumps(self):
        """"""
        self.data.update({
            'bucket': str(self.obj.bucket_id),
            'checksum': self.obj.file.checksum,
            'key': self.obj.key,  # IMPORTANT it must stay here!
            'size': self.obj.file.size,
            'version_id': str(self.obj.version_id),
        })
        return self.data
912080
def save_json_representation(self, dir_path):
        
        file_name = self.__class__.__name__+ '.json'
        file_path = os.path.join(dir_path, file_name)
        with open(file_path, 'w') as outfile:
            json.dump(self.get_json_representation(), outfile)
684713
def dump(*args, **kwargs):
    
    kwargs.update(dict(cls=NumpyEncoder,
                       sort_keys=True,
                       indent=4,
                       separators=(',', ': ')))
    return _json.dump(*args, **kwargs)
221795
def write_json(filename, content):
    '''
    
    '''

    j = _dumps(content, indent=4, sort_keys=True)
    if j:
        return write_file(filename, j)
77753
def dumps(self):
        

        head = self.documentclass.dumps() + '%\n'
        head += self.dumps_packages() + '%\n'
        head += dumps_list(self.variables) + '%\n'
        head += dumps_list(self.preamble) + '%\n'

        return head + '%\n' + super().dumps()
1019835
def filename(self):
        
        if self._filename:
            return self._filename
        else:
            with tempfile.NamedTemporaryFile(delete=False) as f:
                f.write(self._bytes)
            return f.name