Did I find the right examples for you? yes no

All Samples(11)  |  Call(6)  |  Derive(0)  |  Import(5)

        def yaml_dump(value):
    return yaml.dump(value, default_flow_style=False)
        


src/c/o/congress-legislators-HEAD/scripts/lint.py   congress-legislators(Download)
 
import glob, sys
from utils import yaml_load, yaml_dump, data_dir
 
def run():
    for fn in glob.glob(data_dir() + "/*.yaml") if len(sys.argv) == 1 else sys.argv[1:]:
    	print(fn + "...")
    	data = yaml_load(fn, use_cache=False)
    	yaml_dump(data, fn)

src/c/o/congress-legislators-HEAD/scripts/house_history_gender.py   congress-legislators(Download)
import re, urllib.request, urllib.parse
from utils import yaml_load, yaml_dump
 
def run():
 
				women_house_history_ids.remove(house_history_id)
 
		yaml_dump(legislators, fn)
 
	print("%d women in Congress were not found in our files." % len(women_house_history_ids))

src/j/u/juju-deployer-0.3.8/deployer/env/base.py   juju-deployer(Download)
import logging
 
from ..utils import (
    _get_juju_home, path_join, yaml_load, ErrorExit,
    yaml_dump, temp_file, _check_call)
    def _write_config(self, svc_name, config, fh):
        fh.write(yaml_dump({svc_name: config}))
        fh.flush()
 
#    def _write_config(self, svc_name, config, fh):
        with temp_file() as fh:
            if config:
                fh.write(yaml_dump({name: config}))
                fh.flush()
                params.extend(["--config", fh.name])

src/j/u/juju-deployer-0.3.8/deployer/deployment.py   juju-deployer(Download)
from .service import Service, ServiceUnitPlacement
from .relation import Endpoint
from .utils import path_join, yaml_dump, ErrorExit, resolve_include
 
 
    def save(self, path):
        with open(path, "w") as fh:
            fh.write(yaml_dump(self.data))
 
    @staticmethod

src/j/u/juju-deployer-0.3.8/deployer/action/diff.py   juju-deployer(Download)
from .base import BaseAction
from ..relation import EndpointPair
from ..utils import parse_constraints, yaml_dump
 
 
    def run(self):
        diff = self.do_diff()
        if diff:
            print yaml_dump(diff)