Did I find the right examples for you? yes no

All Samples(19)  |  Call(11)  |  Derive(0)  |  Import(8)

        def yaml_load(value):
    if optimized:
        return _load(value, Loader=CSafeLoader)
    return _load(value)
        


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)

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 _get_env_config(self):
        with open(self.env_config_path) as fh:
            config = yaml_load(fh.read())
            if self.name:
                if self.name not in config['environments']:
                params, self.log, "Error getting status, is it bootstrapped?",
                stderr=fh)
        status = yaml_load(output)
        return status
 

src/j/u/juju-deployer-0.3.8/deployer/charm.py   juju-deployer(Download)
 
from .vcs import Git, Bzr
from .utils import (
    _check_call,
    _get_juju_home,
                raise RuntimeError("No charm metadata @ %s", md_path)
        with open(md_path) as fh:
            return yaml_load(fh.read())
 
    def get_provides(self):

src/c/o/congress-HEAD/tasks/committee_meetings.py   congress(Download)
    utils.require_congress_legislators_repo()
    committees = {}
    for c in utils.yaml_load("congress-legislators/committees-current.yaml"):
        committees[c["thomas_id"]] = c
        if "house_committee_id" in c:

src/j/u/juju-deployer-0.3.8/deployer/env/go.py   juju-deployer(Download)
 
from .base import BaseEnvironment
from ..utils import ErrorExit, _get_juju_home, yaml_load
 
from jujuclient import (
        if not os.path.exists(jenv):
            with open(os.path.join(home, 'environments.yaml')) as fh:
                data = yaml_load(fh.read())
                token = data.get('environments', {}).get(self.name, {}).get(
                    'admin-secret')
                return token
        with open(jenv) as fh:
            data = yaml_load(fh.read())
            token = data.get('bootstrap-config', {}).get(
                'admin-secret')

src/j/u/juju-deployer-0.3.8/deployer/config.py   juju-deployer(Download)
 
from .deployment import Deployment
from .utils import ErrorExit, yaml_load, path_exists, dict_merge
 
 
        with open(config_file) as fh:
            try:
                self.yaml[config_file] = yaml_load(fh.read())
            except Exception, e:
                self.log.warning(

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():
 
	missing_ids = set()
	for fn in ("../legislators-current.yaml", "../legislators-historical.yaml"):
		legislators = yaml_load(fn)
		for p in legislators:
			house_history_id = p.get("id", {}).get("house_history")

src/c/o/congress-legislators-HEAD/scripts/export_csv.py   congress-legislators(Download)
from collections import OrderedDict
 
from utils import yaml_load
 
def run():
		sys.exit(0)
 
	data = yaml_load(sys.argv[1])
 
	###############################################

src/a/w/awsjuju-0.0.2/awsjuju/unit.py   awsjuju(Download)
import subprocess
 
from utils import yaml_load
 
 
    def ec2metadata(self):
        if self._instance_cache:
            return self._instance_cache
        output = subprocess.check_output(["ec2metadata"])
        self._instance_cache = yaml_load(output)