Return the script deployment object.
358546
def script(server_):
    ''' 
    '''
    return salt.utils.cloud.os_script(
        config.get_cloud_config_value('script', server_, __opts__),
        server_,
        __opts__,
        salt.utils.cloud.salt_config_to_yaml(
            salt.utils.cloud.minion_config(__opts__, server_)
        )
    )
1222572
def script_catalog():  # noqa: E501
    
    if (not hasAccess()):
        return redirectUnauthorized()

    driver = LoadedDrivers.getDefaultDriver()
    return Response(status=200, body=driver.getScriptsCatalog())
620189
function getScript(url) {
		
		var script = scripts[url.name || url];
		if (script) { return script; }
		
		if (typeof url == 'object') {
			for (var key in url) {
				if (url[key]) {
					script = { name: key, url: url[key] };
				}
			}
		} else {


			var els = url.split("/"),
				 name = els[els.length -1],
				 i = name.indexOf("?");
				 
			script = {
				name: i != -1 ? name.substring(0, i) : name, 
				url: url 
			}; 
		}
		
		scripts[script.name] = script;
		return script;
	}
961604
function DeploymentState() {
  if (!(this instanceof DeploymentState))
    return new DeploymentState();

  this.flags = Script.flags.MANDATORY_VERIFY_FLAGS;
  this.flags &= ~Script.flags.VERIFY_P2SH;
  this.lockFlags = common.lockFlags.MANDATORY_LOCKTIME_FLAGS;
  this.bip34 = false;
  this.bip91 = false;
  this.bip148 = false;
}
699614
def versioned_script?
      return chunks.size == 1 &&
             chunks[0].pushdata? &&
             chunks[0].canonical? &&
             chunks[0].pushdata.bytesize > 2
    end
534670
private String getScriptAddress(@Nullable Script script) {
        String address = "";
        try {
            if (script != null) {
                address = script.getToAddress(params, true).toString();
            }
        } catch (Exception e) {
        }
        return address;
    }
368120
def script(script, **options)
      return Redstruct::Script.new(script: script, connection: @connection, **options)
    end
271761
function(){
		var i, script,
		  scripts = doc[STR_GET_BY_TAG]('script');
		for (i = scripts.length - 1; i > -1 && (script = scripts[i]); i--) {
			if (script.readyState === 'interactive') {
				return script;
			}
		}
	}
297264
def get_pias_script(environ=None):
    """"""
    if os.path.basename(sys.argv[0]) == "pias":
        return sys.argv[0]
    filepath = find_executable("pias", environ)
    if filepath is not None:
        return filepath
    filepath = os.path.join(os.path.dirname(__file__), "__main__.py")
    # XXX TODO: check if executable
    if os.path.exists(filepath):
        return filepath
    raise RuntimeError("Could not locate the pias script.")
361912
def deploy(func_or_name, data_defaults=None):
    '''
    
    '''

    # If not decorating, return function with config attached
    if isinstance(func_or_name, six.string_types):
        name = func_or_name

        def decorator(f):
            setattr(f, 'deploy_name', name)

            if data_defaults:
                setattr(f, 'deploy_data', data_defaults)

            return deploy(f)

        return decorator

    # Actually decorate!
    func = func_or_name

    @wraps(func)
    def decorated_func(*args, **kwargs):
        # If we're in CLI mode, there's no state/host passed down, we need to
        # use the global "pseudo" modules.
        if len(args) < 2 or not (
            isinstance(args[0], (State, PseudoModule))
            and isinstance(args[1], (Host, PseudoModule))
        ):
            state = pseudo_state._module
            host = pseudo_host._module

            if state.in_deploy:
                raise PyinfraError((
                    'Nested deploy called without state/host: {0}'
                ).format(func))

        # Otherwise (API mode) we just trim off the commands
        else:
            args_copy = list(args)
            state, host = args[0], args[1]
            args = args_copy[2:]

        # In API mode we have the kwarg - if a nested deploy we actually
        # want the frame of the caller (ie inside the deploy package).
        frameinfo = kwargs.pop('frameinfo', get_caller_frameinfo())
        logger.debug('Adding deploy, called @ {0}:{1}'.format(
            frameinfo.filename, frameinfo.lineno,
        ))

        deploy_kwargs = pop_op_kwargs(state, kwargs)

        # Name the deploy
        deploy_name = getattr(func, 'deploy_name', func.__name__)
        deploy_data = getattr(func, 'deploy_data', None)

        with state.deploy(deploy_name, deploy_kwargs, deploy_data, frameinfo.lineno):
            # Execute the deploy, passing state and host
            func(state, host, *args, **kwargs)

    return decorated_func
1188453
def _build_deployments_object(
    contract_type: str,
    deployment_bytecode: Dict[str, Any],
    runtime_bytecode: Dict[str, Any],
    compiler: Dict[str, Any],
    address: HexStr,
    tx: HexStr,
    block: HexStr,
    manifest: Dict[str, Any],
) -> Iterable[Tuple[str, Any]]:
    
    yield "contract_type", contract_type
    yield "address", to_hex(address)
    if deployment_bytecode:
        yield "deployment_bytecode", deployment_bytecode
    if compiler:
        yield "compiler", compiler
    if tx:
        yield "transaction", tx
    if block:
        yield "block", block
    if runtime_bytecode:
        yield "runtime_bytecode", runtime_bytecode
464677
def load_deploy_config(deploy_filename, config=None):
    '''
    
    '''

    if not config:
        config = Config()

    if not deploy_filename:
        return

    if path.exists(deploy_filename):
        extract_file_config(deploy_filename, config)

    return config
22847
def js():
    ""
    return os.path.join(os.path.dirname(os.path.abspath(__file__)), 'js')
439373
def cache_script(script, text, opts={}):
    """"""
    global script_cache
    if script not in script_cache:
        update_script_cache(script, text, opts)
        pass
    return script
572744
def get_temporary_scripts_path(self):
        
        result = None
        if len(self.config.temporary_scripts_path) > 0:
            if os.path.isdir(self.config.temporary_scripts_path):
                result = self.config.temporary_scripts_path
        return result
766405
def download_log_of_current_script():
    """"""

    try:
        #Return None, if script is not saved and user closed file saving window, otherwise return file name.
        src_file = get_workbench().get_current_editor().get_filename(False)
        if src_file is None:
            return
        download_log(src_file)
    except Exception:
        error_msg = traceback.format_exc(0)+'\n'
        showerror("Error", error_msg)
298495
def _get_source(self):
        "  "
        source_dir = op.join(self.deploy_dir, 'source')
        for tp, cmd in settings.SRC_CLONE:
            if self.src.startswith(tp + '+'):
                program = which(tp)
                assert program, '%s not found.' % tp
                cmd = cmd % dict(src=self.src[len(tp) + 1:],
                                 source_dir=source_dir,
                                 branch=self.branch)
                cmd = "sudo -u %s %s" % (self['src_user'], cmd)
                call(cmd, shell=True)
                self.templates.append('src-%s' % tp)
                break
        else:
            self.templates.append('src-dir')
            copytree(self.src, source_dir)

        return source_dir