init the dat.gui settings
354390
function(){

            var self = this
                ,gui = this.gui = new window.dat.GUI({ autoPlace: false })
                ,op = this.options
                ,getset
                ,f
                ;

            getset = {
                get timestep(){
                    return self._world ? self._world.timestep() : 6;
                }
                ,set timestep( dt ){
                    if ( self._world ) {
                        self._world.timestep( dt );
                    }
                }
                ,get warp(){
                    return self._world ? self._world.warp() : 1;
                }
                ,set warp( w ){
                    if ( self._world ) {
                        self._world.warp( w );
                    }
                }
                ,get maxIPF(){
                    return self._world ? self._world.options.maxIPF : 16;
                }
                ,set maxIPF( m ){
                    if ( self._world ){
                        self._world.options({ maxIPF: m });
                    }
                }
                ,get sleepDisabled(){
                    return self._world ? self._world.options.sleepDisabled : false;
                }
                ,set sleepDisabled( t ){
                    if ( self._world ){
                        self._world.options.sleepDisabled = t;
                        if ( t ){
                            self._world.wakeUpAll();
                        }
                    }
                }
                ,get sleepTimeLimit(){
                    return self._world ? self._world.options.sleepTimeLimit : 500;
                }
                ,set sleepTimeLimit( t ){
                    if ( self._world ){
                        self._world.options.sleepTimeLimit = t;
                    }
                }
                ,get sleepSpeedLimit(){
                    return self._world ? self._world.options.sleepSpeedLimit : 0.005;
                }
                ,set sleepSpeedLimit( t ){
                    if ( self._world ){
                        self._world.options.sleepSpeedLimit = t;
                    }
                }
                ,get sleepVarianceLimit(){
                    return self._world ? self._world.options.sleepVarianceLimit : 0.2;
                }
                ,set sleepVarianceLimit( t ){
                    if ( self._world ){
                        self._world.options.sleepVarianceLimit = t;
                    }
                }
                ,get integrator(){
                    return self._world ? self._world.integrator().name : 'verlet';
                }
                ,set integrator( t ){
                    var intr;
                    if ( self._world ){
                        intr = self._world.integrator();
                        self._world.integrator( Physics.integrator(t, Physics.util.extend({}, intr, null)) );
                    }
                }
            };

            function pauseWorld(){
                if ( self._world ){
                    if ( self._world.isPaused() ){
                        self._world.unpause();
                    } else {
                        self._world.pause();
                    }
                }
            }

            f = gui.addFolder( 'General' );
            f.add( getset, 'integrator', [ 'improved-euler', 'verlet', 'velocity-verlet' ]);
            f.add( getset, 'timestep', 1, 20).step( 1 );
            f.add( getset, 'maxIPF', 1, 100).step( 1 );
            f.add( getset, 'warp', 0.01, 2);
            f.add( getset, 'sleepDisabled');
            f.add( getset, 'sleepTimeLimit', 1, 10000).step( 10 );
            f.add( getset, 'sleepSpeedLimit', 0.001, 1);
            f.add( getset, 'sleepVarianceLimit', 0.01, 1);
            f.add( { pause: pauseWorld }, 'pause');
            f.open();

            f = gui.addFolder( 'Draw Options' );
            f.add( op, 'drawAABB' );
            f.add( op, 'drawRealPosition' );
            f.add( op, 'drawIntervals' );
            f.add( op, 'drawContacts' );
            f.add( op, 'drawSleepState' );
            f.add( op, 'drawBodyState' );
            f.open();

            f = gui.addFolder( 'Colors' );
            f.addColor( op, 'aabbColor' );
            f.addColor( op, 'realBodyStyle' );
            f.addColor( op, 'intervalMinColor' );
            f.addColor( op, 'intervalMaxColor' );
            f.addColor( op, 'mtvColor' );
            f.addColor( op, 'contactColor' );

            gui.domElement.style.zIndex = '100';
            gui.domElement.style.position = 'absolute';
            gui.domElement.style.top = '0';
            gui.domElement.style.left = '0';
            this.el.parentNode.appendChild( gui.domElement );
        }
866632
private void init() {
        if (provider != null) {
            propertyGrid.setTarget(StringUtils.isEmpty(groupId) ? null : new Settings(groupId, provider));
        }
    }
555244
static function init()
    {
        if (SettingsDatabase::NEED_CONNECT) {
            $connection_string = 'mysql:host=' . SettingsDatabase::HOST . ';port=' . SettingsDatabase::PORT . ';dbname=' . SettingsDatabase::DBNAME;

            ORM::configure('connection_string', $connection_string);
            ORM::configure('username', SettingsDatabase::USERNAME);
            ORM::configure('password', SettingsDatabase::PASSWORD);
            ORM::configure('logging', SettingsDatabase::LOGGING);
            ORM::configure('driver_options', [
                PDO::ATTR_ERRMODE            => PDO::ERRMODE_EXCEPTION,
                PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
                PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
            ]);
        }
    }
764667
def init_current_directory():
    """"""
    settings_directory=project_path+'/.dry'
    settings_file=settings_directory+'/config.py'
    if os.path.isdir(settings_directory):
	# already initialized
	print("directory already initialized.")
	return
    # init
    os.makedirs(settings_directory)
    f = open(settings_file,'w')
    print(sample_config_file, file=f)
    f.close()
1175075
function setupGui() {
  // Create training buttons and info texts
  for (let i = 0; i < NUM_CLASSES; i++) {
    const div = document.createElement('div');
    document.body.appendChild(div);
    div.style.marginBottom = '10px';

    // Create training button
    const button = document.createElement('button');
    button.innerText = 'Train ' + i;
    div.appendChild(button);

    // Listen for mouse events when clicking the button
    button.addEventListener('click', () => {
      training = i;
      requestAnimationFrame(() => training = -1);
    });

    // Create info text
    const infoText = document.createElement('span');
    infoText.innerText = ' No examples added';
    div.appendChild(infoText);
    infoTexts.push(infoText);
  }
}
46885
private void init() throws IOException {
    WR = new Path(conf.get("fs.snapshot.waitingroom", "/.WR"));
    WR = WR.makeQualified(dfs);
  }
640669
private void initialize() {
		this.setCursor(new java.awt.Cursor(java.awt.Cursor.WAIT_CURSOR));
		this.setResizable(false);
		this.setContentPane(getAboutPanel());
		this.pack();
		centerFrame();
	}
487985
def init(self, **settings):
        """"""
        if self.get_status() != 'not-initialized':
            raise ClusterError(
                'cluster in {!r} has already been initialized'.format(
                    self._data_dir))

        process = subprocess.run(
            [self._pg_basebackup, '-h', self._master['host'],
             '-p', self._master['port'], '-D', self._data_dir,
             '-U', self._repl_user],
            stdout=subprocess.PIPE, stderr=subprocess.STDOUT)

        output = process.stdout

        if process.returncode != 0:
            raise ClusterError(
                'pg_basebackup init exited with status {:d}:\n{}'.format(
                    process.returncode, output.decode()))

        with open(os.path.join(self._data_dir, 'recovery.conf'), 'w') as f:
            f.write(textwrap.dedent("""\
                standby_mode = 'on'
                primary_conninfo = 'host={host} port={port} user={user}'
            """.format(
                host=self._master['host'],
                port=self._master['port'],
                user=self._repl_user)))

        return output.decode()
547297
private void buildGui() {
		initWidget(UI_BINDER.createAndBindUi(this));
		zoomInElement.getElement().setInnerText("+");
		zoomOutElement.getElement().setInnerText("-");
		getElement().getStyle().setPosition(Position.ABSOLUTE);
		getElement().getStyle().setTop(5, Unit.PX);
		getElement().getStyle().setLeft(5, Unit.PX);

		if (Dom.isTouchSupported()) {
			initializeForTouchDevice();
		} else {
			initializeForDesktop();
		}
	}
1184073
def init_ui(self):
        """"""
        board_width = self.ms_game.board_width
        board_height = self.ms_game.board_height
        self.create_grid(board_width, board_height)
        self.time = 0
        self.timer = QtCore.QTimer()
        self.timer.timeout.connect(self.timing_game)
        self.timer.start(1000)
720380
def main(self, *args, **kwargs):
        '''
        
        '''
        obj = kwargs.get('obj')
        if obj is None:
            obj = ScriptInfo(create_app=self.create_app)
        # This is the import line: allows create_app to access the settings
        obj.settings = kwargs.pop('settings', 'udata.settings.Defaults')
        kwargs['obj'] = obj
        return super(UdataGroup, self).main(*args, **kwargs)
662094
function main() {
    loadDependencies();
    setInitialData();
    domHelpers.initDomElements();

    setDataInInputField();
    setConfigInInputField();
    setChartSelectorType();
    setNewChart();
    setHandlers();
}
958701
def __do_init(self, dat_dict):
        
        for k, v in dat_dict.items():
            if isinstance(v, dict):
                self.cfg.init(k, v['val'], v['proto'])
            else:
                self.cfg.init(k, v)
        self.cfg.sync()
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))
310608
private static function init(): void
    {
        if (!static::$initialized) {
            $baseClass = Base::getInstance();
            static::$initialized = true;
            static::$backend = (string)$baseClass->Session->Backend;
            static::$savePath = $baseClass->parsePath($baseClass->Session->SavePath);
            static::$savePath = \trim(\session_save_path()) != '' ? \session_save_path() : static::$savePath;

            Directory::create(static::$savePath);
        }
    }
1327532
def init(name, runtime):
    """"""
    runtime = click.unstyle(runtime)

    stdout.write(
        style.format_command(
            'Initializing',
            '%s %s %s' % (name, style.gray('@'), style.green(runtime))
        )
    )

    config = Config(os.getcwd())
    config.set('runtime', runtime)
    config.save()

    generate.main(['init', name], standalone_mode=False)
    run.main(['python', 'manage.py', 'migrate'])
111429
def initialize_ui(self):
        

        LOGGER.debug("> Initializing '{0}' Component ui.".format(self.__class__.__name__))

        self.__Port_spinBox_set_ui()
        self.__Address_lineEdit_set_ui()
        self.__File_Command_lineEdit_set_ui()
        self.__Connection_End_lineEdit_set_ui()

        self.__add_actions()

        # Signals / Slots.
        self.Port_spinBox.valueChanged.connect(self.__Port_spinBox__valueChanged)
        self.Address_lineEdit.editingFinished.connect(self.__Address_lineEdit__editFinished)
        self.File_Command_lineEdit.editingFinished.connect(self.__File_Command_lineEdit__editFinished)
        self.Connection_End_lineEdit.editingFinished.connect(self.__Connection_End_lineEdit__editFinished)

        self.initialized_ui = True
        return True