Create the internal Sarl script.
540042
public void eInit(Resource resource, String packageName, IJvmTypeProvider context) {
		setTypeResolutionContext(context);
		if (this.script == null) {
			this.script = SarlFactory.eINSTANCE.createSarlScript();
			EList<EObject> content = resource.getContents();
			if (!content.isEmpty()) {
				content.clear();
			}
			content.add(this.script);
			if (!Strings.isEmpty(packageName)) {
				script.setPackage(packageName);
			}
		}
	}
368120
def script(script, **options)
      return Redstruct::Script.new(script: script, connection: @connection, **options)
    end
461038
def _compile_mothur_script(self):
        """"""
        fasta = self._input_filename

        required_params = ["reference", "taxonomy"]
        for p in required_params:
            if self.Parameters[p].Value is None:
                raise ValueError("Must provide value for parameter %s" % p)
        optional_params = ["ksize", "cutoff", "iters"]
        args = self._format_function_arguments(
            required_params + optional_params)
        script = '#classify.seqs(fasta=%s, %s)' % (fasta, args)
        return script
828956
public void eInit(SarlScript script, String name, IJvmTypeProvider context) {
		setTypeResolutionContext(context);
		if (this.sarlAgent == null) {
			this.sarlAgent = SarlFactory.eINSTANCE.createSarlAgent();
			script.getXtendTypes().add(this.sarlAgent);
			this.sarlAgent.setAnnotationInfo(XtendFactory.eINSTANCE.createXtendTypeDeclaration());
			if (!Strings.isEmpty(name)) {
				this.sarlAgent.setName(name);
			}
		}
	}
949749
def _compile_mothur_script(self):
        """"""
        def format_opts(*opts):
            """Formats a series of options for a Mothur script"""
            return ', '.join(filter(None, map(str, opts)))
        vars = {
            'in': self._input_filename,
            'unique': self._derive_unique_path(),
            'dist': self._derive_dist_path(),
            'names': self._derive_names_path(),
            'cluster_opts': format_opts(
                self.Parameters['method'],
                self.Parameters['cutoff'],
                self.Parameters['precision'],
            ),
        }
        script = (
            '#'
            'unique.seqs(fasta=%(in)s); '
            'dist.seqs(fasta=%(unique)s); '
            'read.dist(column=%(dist)s, name=%(names)s); '
            'cluster(%(cluster_opts)s)' % vars
        )
        return script
43560
def gen_scripts(
    file_name, file_name_ext, obj_name, obj_ext_name, output, output_ext,
    field=1, notexplicit=None, ascii_props=False, append=False, prefix=""
):
    """"""

    obj = {}
    obj2 = {}
    aliases = {}
    with codecs.open(os.path.join(HOME, 'unicodedata', UNIVERSION, 'PropertyValueAliases.txt'), 'r', 'utf-8') as uf:
        for line in uf:
            if line.startswith('sc ;'):
                values = line.split(';')
                aliases[format_name(values[1].strip())] = format_name(values[2].strip())

    with codecs.open(os.path.join(HOME, 'unicodedata', UNIVERSION, file_name_ext), 'r', 'utf-8') as uf:
        for line in uf:
            if not line.startswith('#'):
                data = line.split('#')[0].split(';')
                if len(data) < 2:
                    continue
                exts = [aliases[format_name(n)] for n in data[1].strip().split(' ')]
                span = create_span([int(i, 16) for i in data[0].strip().split('..')], is_bytes=ascii_props)
                for ext in exts:
                    if ext not in obj2:
                        obj2[ext] = []
                    if span is None:
                        continue

                    obj2[ext].extend(span)

    with codecs.open(os.path.join(HOME, 'unicodedata', UNIVERSION, file_name), 'r', 'utf-8') as uf:
        for line in uf:
            if not line.startswith('#'):
                data = line.split('#')[0].split(';')
                if len(data) < 2:
                    continue
                span = create_span([int(i, 16) for i in data[0].strip().split('..')], is_bytes=ascii_props)
                name = format_name(data[1])
                if name not in obj:
                    obj[name] = []
                if name not in obj2:
                    obj2[name] = []

                if span is None:
                    continue

                obj[name].extend(span)
                obj2[name].extend(span)

    for name in list(obj.keys()):
        s = set(obj[name])
        obj[name] = sorted(s)

    for name in list(obj2.keys()):
        s = set(obj2[name])
        obj2[name] = sorted(s)

    if notexplicit:
        not_explicitly_defined(obj, notexplicit, is_bytes=ascii_props)
        not_explicitly_defined(obj2, notexplicit, is_bytes=ascii_props)

    # Convert characters values to ranges
    char2range(obj, is_bytes=ascii_props)
    char2range(obj2, is_bytes=ascii_props)

    with codecs.open(output, 'a' if append else 'w', 'utf-8') as f:
        if not append:
            f.write(HEADER)
        # Write out the Unicode properties
        f.write('%s_%s = {\n' % (prefix, obj_name))
        count = len(obj) - 1
        i = 0
        for k1, v1 in sorted(obj.items()):
            f.write('    "%s": "%s"' % (k1, v1))
            if i == count:
                f.write('\n}\n')
            else:
                f.write(',\n')
            i += 1

    with codecs.open(output_ext, 'a' if append else 'w', 'utf-8') as f:
        if not append:
            f.write(HEADER)
        # Write out the Unicode properties
        f.write('%s_%s = {\n' % (prefix, obj_ext_name))
        count = len(obj2) - 1
        i = 0
        for k1, v1 in sorted(obj2.items()):
            f.write('    "%s": "%s"' % (k1, v1))
            if i == count:
                f.write('\n}\n')
            else:
                f.write(',\n')
            i += 1
871957
public void eInit(SarlScript script, String name, IJvmTypeProvider context) {
		setTypeResolutionContext(context);
		if (this.sarlArtifact == null) {
			this.sarlArtifact = SarlFactory.eINSTANCE.createSarlArtifact();
			script.getXtendTypes().add(this.sarlArtifact);
			this.sarlArtifact.setAnnotationInfo(XtendFactory.eINSTANCE.createXtendTypeDeclaration());
			if (!Strings.isEmpty(name)) {
				this.sarlArtifact.setName(name);
			}
		}
	}
219961
def create(self, argv):
        """"""
        opts = cmdline(argv, FLAGS_CREATE)
        if len(opts.args) != 1:
            error("Command requires a search expression", 2)
        query = opts.args[0]
        job = self.service.jobs.create(opts.args[0], **opts.kwargs)
        print(job.sid)
1221178
private function createMigrations()
    {
        $scripts   = $this->locator->findScripts();
        $rollbacks = $this->locator->findRollbackScripts();

        $this->releaseChecker->checkScripts($scripts, $rollbacks);

        foreach ($scripts as $k => $script) {
            $this->createMigration($script, $rollbacks[$k]);
        }
    }
1055088
def main():
    from sar import parser

    sysstat_dir = '/var/log/sa'
    single_file = ('%s/%s' % (sysstat_dir, 'sar21'))

    # Single SAR file parsing
    insar = parser.Parser(single_file)
    print(("SAR file date: %s" % (insar.get_filedate())))
    print("Content:\n")
    pprint.pprint(insar.get_sar_info())

    print(("-" * 78))

    # Id you want to test his, please run something like
    #  $ cat /var/log/sa/sar* > sarcombined
    # to create "combined" SAR file. Then uncomment the following:
    '''
    
    '''
694459
def _MakeExecutable(self, metadata_script):
    
    mode = os.stat(metadata_script).st_mode
    os.chmod(metadata_script, mode | stat.S_IEXEC)
420958
def create(index_name, body, force, verbose):
    """"""
    result = current_search_client.indices.create(
        index=index_name,
        body=json.load(body),
        ignore=[400] if force else None,
    )
    if verbose:
        click.echo(json.dumps(result))
615441
private Script toScript(final String name, final Object[] args, final int index) {

		if (index >= args.length) {
			return null;
		}

		final Object value = args[index];

		if (value instanceof Script) {

			return (Script)value;
		}

		if (value == null) {

			logger.warn("Invalid argument {} for Structr.batch(): expected script, got null.");

		} else {

			logger.warn("Invalid argument {} for Structr.batch(): expected script, got {}", name, value.getClass());
		}

		return null;
	}
298364
def create_iam(self):
        """"""
        utils.banner("Creating IAM")
        iam.create_iam_resources(env=self.env, app=self.app)
1334093
def run():
    
    __builtins__
    script_name = sys.argv[1]
    namespace = dict(
        __file__=script_name,
        __name__='__main__',
        __doc__=None,
    )
    sys.argv[:] = sys.argv[1:]

    open_ = getattr(tokenize, 'open', open)
    script = open_(script_name).read()
    norm_script = script.replace('\\r\\n', '\\n')
    code = compile(norm_script, script_name, 'exec')
    exec(code, namespace)
939444
public function create() {
        global $OUTPUT;

        $this->time_start = microtime(true);
        if (CLI_SCRIPT) {
            return; // Temporary solution for cli scripts.
        }

        flush();
        echo $OUTPUT->render($this);
        flush();
    }
746270
def _construct_module(info, target):
    """"""

    for path in paths:
        real_path = os.path.abspath(os.path.join(target, path.format(**info)))
        log("Making directory '%s'" % real_path)
        os.makedirs(real_path)

    # pprint(info)
    for item in templates.values():
        source = os.path.join('dev/templates', item[0])
        filename = os.path.abspath(
            os.path.join(target, item[1].format(**info)))
        log("Creating file from template '%s'" % filename,
            emitter='MANAGE')
        write_template_file(source, filename, info)