Initialize the OSTree for a release
549853
def ostree_init(self, release):
        """"""
        out = release['output_dir'].rstrip('/')
        base = os.path.dirname(out)
        if not os.path.isdir(base):
            self.log.info('Creating %s', base)
            os.makedirs(base, mode=0755)
        if not os.path.isdir(out):
            self.mock_chroot(release, release['ostree_init'])
1117111
public void init(WriteStream os)
  {
    _os = os;
    _openCount.set(1);
    
    switch (_peer) {
    case CLIENT:
      _nextStreamId = 1;
      break;
      
    case SERVER:
      _nextStreamId = 2;
      break;
      
    default:
      throw new IllegalStateException(String.valueOf(_peer));
    }

    if (_conn.isHeaderHuffman()) {
      _outHeader = new OutHeaderHuffman(os);
    }
    else {
      _outHeader = new OutHeader(os);
    }
  }
748686
def init():
    """"""
    default_config_path = path.join(
        (os.environ.get('TLDR_CONFIG_DIR') or path.expanduser('~')),
        '.tldrrc')
    if path.exists(default_config_path):
        click.echo("There is already a config file exists, "
                   "skip initializing it.")
    else:
        repo_path = click.prompt("Input the tldr repo path(absolute path)")
        if not path.exists(repo_path):
            sys.exit("Repo path not exist, clone it first.")

        platform = click.prompt("Input your platform(linux, osx or sunos)")
        if platform not in ['linux', 'osx', 'sunos']:
            sys.exit("Platform should be in linux, osx or sunos.")

        colors = {
            "description": "blue",
            "usage": "green",
            "command": "cyan"
        }

        config = {
            "repo_directory": repo_path,
            "colors": colors,
            "platform": platform
        }
        with open(default_config_path, 'w') as f:
            f.write(yaml.safe_dump(config, default_flow_style=False))

        click.echo("Initializing the config file at {0}".format(
            default_config_path))
643033
private void initialize() {
        this.setName(NAME);
        this.setOrder(1);	// High order so that cmdline updates are installed asap
        this.downloadManager = new DownloadManager(Model.getSingleton().getOptionsParam().getConnectionParam());
        this.downloadManager.start();
        // Do this before it can get overwritten by the latest one
        this.getPreviousVersionInfo();
	}
1042726
function init(){

    // set NODE_ENV to --env value
    if (argv.env) {
        set('NODE_ENV', argv.env);
    }

    // load evironment files
    ['./.env', './config/.env', './env', './config/env'].map(file => {

        try {

            load(file);

        } catch(err) {

            if (env('DEBUG')) {
                console.error(`Env: ${err.message}`);
            }

        }

    });

    // set default vars
    set('NODE_ENV', 'development');

    ['DEVELOPMENT', 'PRODUCTION'].map(str => {
        set(str, get('NODE_ENV') === str.toLowerCase());
    });

}
627282
protected void initNode() {
        /**
         * quick fix for integration tests. if hosts property set to "embedded" then a local node is start.
         * maven dependencies need to be defined correctly for this to work
         */
        ClassLoader cl = Thread.currentThread().getContextClassLoader();

        try {
            // Need to use the classloader for Elasticsearch to pick up the property files when
            // running in an OSGi environment
            Thread.currentThread().setContextClassLoader(TransportClient.class.getClassLoader());

            final Properties properties = new Properties();
            try {
                InputStream stream = null;

                if (System.getProperties().containsKey("jboss.server.config.dir")) {
                    File file = new File(System.getProperty("jboss.server.config.dir") + File.separatorChar +
                            HAWKULAR_ELASTICSEARCH_PROPERTIES);
                    stream = new FileInputStream(file);
                } else {
                    stream = this.getClass().getResourceAsStream(File.separatorChar +
                                    HAWKULAR_ELASTICSEARCH_PROPERTIES);
                }
                properties.load(stream);
                stream.close();
            } catch (IOException e) {
                log.log(Level.SEVERE, "Failed to load elasticsearch properties", e);
            }

            node = NodeBuilder.nodeBuilder()
                    .settings(ImmutableSettings.settingsBuilder()
                            .put(properties)).node();

            node.start();
            client = node.client();
        } finally {
            Thread.currentThread().setContextClassLoader(cl);
        }

        if (log.isLoggable(Level.FINEST)) {
            log.finest("Initialized Elasticsearch node=" + node + " client=" + client);
        }
    }
1304795
def release(major=False, minor=False, patch=True, pypi_index=None):
    """"""
    relver = next_release(major, minor, patch)
    start_rel_branch(relver)
    prepare_release(relver)
    finish_rel_branch(relver)
    publish(pypi_index)
452041
def normalize_init_values(cls, release, species, server):
        
        release = check_release_number(release)
        species = check_species_object(species)
        return (release, species, server)
61763
protected static function initStableRelease()
    {
        $releasePathStable = '';
        $path = \Deployer\get('deploy_path');
        $hasStableRelease = \Deployer\test("[ -d $path/current/ ]");
        if ($hasStableRelease) {

            // make shure we do not have an array at this point TODO: Check why this workaround is necessary
            $readlinkBin = \Deployer\get('readlink_bin');
            if (is_array($readlinkBin)) {
                $readlinkBin = current($readlinkBin);
            }

            if (PHP_OS === 'Darwin') {
                $releasePathStable = (string)\Deployer\run("$readlinkBin -n $path/current");
            } else {
                $releasePathStable = (string)\Deployer\run("$readlinkBin -f $path/current/");
            }
            \Deployer\set('release_path_stable', $releasePathStable);
        }
        if (\Deployer\isVerbose()) {
            \Deployer\writeln("release_path_stable = '{$releasePathStable}'");
        }
    }
250250
def vcs_init(self):
        """"""
        VCS(os.path.join(self.outdir, self.name), self.pkg_data)
142857
def init(*, output_dir=FS_DEFAULT_OUTPUT_DIR, dry_run=False, **kwargs):
    
    # Output directory
    global _output_dir
    _output_dir = output_dir

    # Dry run mode
    global _dry_run
    _dry_run = dry_run

    # Type checks
    utils.chkstr(_output_dir, 'output_dir')

    # log the thing
    log.msg("Output directory will be: {output_dir}"
            .format(output_dir=_output_dir))

    # Create output directory if it does not exist
    if not os.path.exists(_output_dir):
        log.msg_warn("Output path '{out_dir}' does not exist, creating it ..."
                     .format(out_dir=_output_dir))
        if not _dry_run:
            # create the actual root output directory
            os.makedirs(_output_dir)
            # set folder permissions to 0770
            os.chmod(_output_dir, stat.S_IRWXU | stat.S_IRWXG)
1201274
function init() {
    try {
        keepOrganized().then((AllFiles) => {
            console.log('Marked Reference Links');
            console.log('Created Directory Tree');
            console.log('Setting up watchers...');
            let watcher = new Watcher(AllFiles);
            console.log('Watching for file changes...');
            watcher.on('update', () => {
                console.log('Updating dirTree...')
                keepOrganized().then((AllFiles) => {
                    console.log('Updated dirTree.');
                    watcher.update(AllFiles);
                })
            })
        })
    } catch (err) {
        console.error(err);
    }
}
225779
def init():
    
    yass_conf = os.path.join(CWD, "yass.yml")
    if os.path.isfile(yass_conf):
        print("::ALERT::")
        print("It seems like Yass is already initialized here.")
        print("If it's a mistake, delete 'yass.yml' in this directory")
    else:
        print("Init Yass in %s ..." % CWD)
        copy_resource("skel/", CWD)
        stamp_yass_current_version(CWD)
        print("Yass init successfully!")
        print("Run 'yass serve' to view the site")

    footer()
865904
def on_init(app):  # pylint: disable=unused-argument
    
    docs_path = os.path.abspath(os.path.dirname(__file__))
    root_path = os.path.abspath(os.path.join(docs_path, '..'))
    apidoc_path = 'sphinx-apidoc'
    swg2rst_path = 'swg2rst'
    if hasattr(sys, 'real_prefix'):  # Check to see if we are in a virtualenv
        # If we are, assemble the path manually
        bin_path = os.path.abspath(os.path.join(sys.prefix, 'bin'))
        apidoc_path = os.path.join(bin_path, apidoc_path)
        swg2rst_path = os.path.join(bin_path, swg2rst_path)
    check_call([apidoc_path, '-o', docs_path, os.path.join(root_path, 'user_tasks'),
                os.path.join(root_path, 'user_tasks/migrations')])
    json_path = os.path.join(docs_path, 'swagger.json')
    rst_path = os.path.join(docs_path, 'rest_api.rst')
    check_call([swg2rst_path, json_path, '-f', 'rst', '-o', rst_path])
499418
function buildTree(index, api) {
  const modules = {};

  const dependency = (module, parent) => {
    const filepath = api.resolve(module, parent);
    if (modules[filepath] != null) {
      return modules[filepath];
    }

    const src = api.getFileContents(module, parent, "utf8");
    const basic = api.parser(src);
    const [nestedImports, hasMemory] = parseImports(basic, api);

    const deps = {};

    Object.keys(nestedImports).forEach(mod => {
      if (mod.indexOf(".") === 0) {
        const dep = dependency(mod, filepath);
        deps[mod] = dep;
      }
    });

    const patched = inferImportTypes(basic, deps, api);
    const ast = api.semantics(patched);

    api.validate(ast, {
      lines: src.split("\n"),
      filename: module.split("/").pop(),
    });

    const result = {
      ast,
      deps,
      filepath,
      hasMemory,
    };
    modules[filepath] = result;

    return result;
  };

  const root = dependency(index, null);

  return {
    root,
    modules,
  };
}
703040
private static void init() {
        if (hasInitialized) {
            return;
        }

        final String osName = System.getProperty("os.name");

        if (osName != null) {
            final String osNameLower = osName.toLowerCase();

            isWindows = osNameLower.contains("windows");
            isMac = osNameLower.contains("mac os x") || osNameLower.contains("darwin");
            isLinux = osNameLower.contains("nux");
            isUnix = osNameLower.contains("nix") || osNameLower.contains("nux");
            isSolaris = osNameLower.contains("sunos") || osNameLower.contains("solaris");
        }

        lineEnder = isWindows ? "\r\n" : "\n";

        final String model = System.getProperty("sun.arch.data.model");
        // sun.arch.data.model=32 // 32 bit JVM
        // sun.arch.data.model=64 // 64 bit JVM
        if (StringUtils.isBlank(model)) {
            bit32 = true;
            bit64 = false;
        } else if ("64".equals(model)) {
            bit32 = false;
            bit64 = true;
        } else {
            bit32 = true;
            bit64 = false;
        }

    }
1241091
public function init()
    {
        $autoloader = 'Net/Growl/Autoload.php';

        if (!$handle = @fopen($autoloader, 'r', true)) {
            throw new BuildException(
                'The Growl Notify task requires the Net_Growl PEAR package.'
            );
        } else {
            fclose($handle);
            include_once $autoloader;
        }

        $this->setTaskName('GrowlNotify');
        $this->setName();
        $this->setSticky(false);
        $this->setMessage();
        $this->setTitle();
        $this->setNotification();
        $this->setAppicon();
        $this->setHost();
        $this->setPassword();
        $this->setPriority();
        $this->setProtocol();
        $this->setIcon();
    }