Initializes global state
774070
def init(canvas_size=(512, 512), max_depth=12, face_color=None, background_color=None):
    """"""
    global _background_color
    _background_color = background_color
    global _ctx
    global cnt_elements
    global MAX_DEPTH
    global WIDTH
    global HEIGHT

    _init_state()
    sys.setrecursionlimit(20000)
    MAX_DEPTH = max_depth
    WIDTH, HEIGHT = canvas_size

    if face_color is not None:
        r, g, b = htmlcolor_to_rgb(face_color)
        _state["ctx"].set_source_rgb(r, g, b)
        hue, saturation, brightness = colorsys.rgb_to_hsv(r, g, b)
        _state["color"] = (hue, saturation, brightness, 1)
    logger.debug("Init done")
216047
public function Init()
    {
        $oGlobal = TGlobal::instance();
        $this->aUserInput = $oGlobal->GetUserData('aInput');
        if (!is_array($this->aUserInput)) {
            $this->aUserInput = array();
        }

        if (!array_key_exists(MTShopArticleCatalogCore::URL_ITEM_ID, $this->aUserInput)) {
            $oGlobal = TGlobal::instance();
            $this->aUserInput[MTShopArticleCatalogCore::URL_ITEM_ID] = $oGlobal->GetUserData(MTShopArticleCatalogCore::URL_ITEM_ID);
        }

        $aInitInputData = array('name', 'email', 'toname', 'toemail', 'comment', 'captcha');
        foreach ($aInitInputData as $sField) {
            if (!array_key_exists($sField, $this->aUserInput)) {
                $this->aUserInput[$sField] = '';
            }
        }
        $this->aUserInput = $this->FilterUserData($this->aUserInput);
    }
640669
private void initialize() {
		this.setCursor(new java.awt.Cursor(java.awt.Cursor.WAIT_CURSOR));
		this.setResizable(false);
		this.setContentPane(getAboutPanel());
		this.pack();
		centerFrame();
	}
377125
public function initialize()
    {
        //The global dispatcher

        //state the application is initialized;
        //register aliases as class mocks such that static calls on mock map to instance calls;
        $this->createAliasMock(
            array_merge(
                $this->aliases, [
                    "route" => 'Budkit\Routing\Router', //this such that we can call Route::add to add router;
                    'controller' => 'Budkit\Routing\Controller',
                    'view' => 'Budkit\View\Display'
                ]
            )
        );

        //Trigger the app initialise event;
        $this->observer->trigger(new Event("app.init", $this));
    }
1208312
def init():
    
    global ORG
    global LEXER
    global MEMORY
    global INITS
    global AUTORUN_ADDR
    global NAMESPACE

    ORG = 0  # Origin of CODE
    INITS = []
    MEMORY = None  # Memory for instructions (Will be initialized with a Memory() instance)
    AUTORUN_ADDR = None  # Where to start the execution automatically
    NAMESPACE = GLOBAL_NAMESPACE  # Current namespace (defaults to ''). It's a prefix added to each global label
    gl.has_errors = 0
    gl.error_msg_cache.clear()
1108379
def sg_init(sess):
     
    """
    # initialize variables
    sess.run(tf.group(tf.global_variables_initializer(),
                      tf.local_variables_initializer()))
77072
static void init() {
		initialContextFactory = System.getProperty(Context.INITIAL_CONTEXT_FACTORY);
		System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
				MonitoringInitialContextFactory.class.getName());
	}
374874
public void registerGlobal(IGlobalScope scope) {
        log.trace("Registering global scope: {}", scope.getName(), scope);
        globals.put(scope.getName(), scope);
    }
1047769
def initialise():
    
    global settings, project_settings

    # Global changes settings
    settings = Changes.load()

    # Project specific settings
    project_settings = Project.load(GitHubRepository(auth_token=settings.auth_token))
30417
private void initialize() {
		// ZAP: Rebrand
		this.setIconImages(DisplayUtils.getZapIconImages());

		this.setVisible(false);
		this.setTitle(Constant.PROGRAM_NAME);

    	final Dimension dim = restoreWindowSize();
    	if (dim == null) {
    		this.setSize(WINDOW_DEFAULT_WIDTH, WINDOW_DEFAULT_HEIGHT);
    	}
    	final Point point = restoreWindowLocation();
    	if (point == null) {
    		centerFrame();
    	}
    	restoreWindowState();
    	this.addWindowStateListener(new FrameWindowStateListener());
    	this.addComponentListener(new FrameResizedListener());
	}
398
function initialize() {
  var flags = [];

  Object.keys( levels ).forEach(function( type, level ) {
    var method = type.toLowerCase();
    exports[ method ] = log.bind( exports, type, level, false );
    exports[ method ].json = log.bind( exports, type, level, true );
    if ( new RegExp( '\\b' + type + '\\b', 'i' ).test( env ) ) {
      flags.push( level );
    }
  });

  loglevel = Math.min.apply( Math, flags );
}
401479
public void init() {
        if (initialized) {
            return;
        }
        Widget parent = inputWidget.getParent();
        while (parent != null && !parent.getClass().getName().equals("com.google.gwt.user.client.ui.Widget")) {
            helpBlock = findHelpBlock(inputWidget);
            if (helpBlock != null) {
                break;
            } else {
                parent = parent.getParent();
            }
        }
        initialized = true;
    }
537410
protected function init()
    {
        $this->addCommand(new SyncCommand());
        $this->addCommand(new MakesumCommand());

        $this->addGlobalOption('e')
            ->alias('env')
            ->description('The environment application name or class.')
            ->defaultValue('dev');
    }
396579
function init() {
        // This function is called during Ghost's initialization.
        // Reading translation file for messages from core .js files and keeping its content in memory
        // The English file is always loaded, until back-end translations are enabled in future versions.
        // Before that, see previous tasks on issue #6526 (error codes or identifiers, error message
        // translation at the point of display...)
        coreStrings = fs.readFileSync(path.join(__dirname, '..', '..', 'translations', 'en.json'));

        // if translation file is not valid, you will see an error
        try {
            coreStrings = JSON.parse(coreStrings);
        } catch (err) {
            coreStrings = undefined;
            throw err;
        }

        _private.initializeIntl();
    }
700859
protected function initializeProxy(): void
    {
        //Initialize internal vars
        $this->states = [];
        $this->activesStates = [];
        $this->callerStatedClassesStack = new \SplStack();
        //Creates
        $this->loadStates();
    }
714931
public function saveGlobalState()
    {
        if ($this->_stateChanged) {
            $this->_stateChanged = false;
            $this->statePersister->save($this->_globalState);
        }
    }
1006393
function init() {
      var _this = this;

      this._shouldSyncFromOpts = true;
      this.on('update', function () {
        if (_this._shouldSyncFromOpts) _this.trigger('sync');
        _this._shouldSyncFromOpts = true;
      });
    }