Initialize instance variables
 Report inputs patch to core
345409
def send_inputs_patch(sequence)
      if has_default_thread?
        begin
          cmd = { :name => :set_inputs_patch, :patch => sequence.inputs_patch }
          @client.send_command(cmd)
        rescue Exception => e
          fail('Failed to update inputs', Log.format("Failed to apply inputs patch after execution", e, :trace))
        end
      end
      true
    ensure
      stop
    end
567430
def initialize_bindings
      bindings = self.class.get_class_bindings
      
      bindings.each do |binding|
        binding[:proc].observed_properties.each do |key_path|
          register_observer(self, key_path) do
            new_value = binding[:proc].call(self)
            if binding[:name]
              self.setValue(new_value, forKey:binding[:name])
            end
          end
        end
      end
    end
764644
def nil_instance_vars(object, vars)
    vars = Array(vars)
    vars.select { |var| object.instance_variable_get(var).nil? }
  end
458868
def _clone_post_init(self, obj=None, **kwargs):
        
        # Initialize the extra attributes
        if obj is None or obj is self:
            # We must be asrootpy-ing a ROOT object
            # or freshly init-ing a rootpy object
            for attr, value in Plottable.EXTRA_ATTRS.items():
                # Use the default value
                setattr(self, attr, value)
        else:
            for attr, value in Plottable.EXTRA_ATTRS.items():
                setattr(self, attr, getattr(obj, attr))

        # Create aliases from deprecated to current attributes
        for depattr, newattr in Plottable.EXTRA_ATTRS_DEPRECATED.items():
            setattr(Plottable, depattr,
                    property(
                        fget=Plottable._get_attr_depr(depattr, newattr),
                        fset=Plottable._set_attr_depr(depattr, newattr)))

        if obj is None or obj is self:
            # We must be asrootpy-ing a ROOT object
            # or freshly init-ing a rootpy object
            # Initialize style attrs to style of TObject
            if isinstance(self, ROOT.TAttLine):
                self._linecolor = Color(ROOT.TAttLine.GetLineColor(self))
                self._linestyle = LineStyle(ROOT.TAttLine.GetLineStyle(self))
                self._linewidth = ROOT.TAttLine.GetLineWidth(self)
            else:  # HistStack
                self._linecolor = Color(Plottable.DEFAULT_DECOR['linecolor'])
                self._linestyle = LineStyle(Plottable.DEFAULT_DECOR['linestyle'])
                self._linewidth = Plottable.DEFAULT_DECOR['linewidth']

            if isinstance(self, ROOT.TAttFill):
                self._fillcolor = Color(ROOT.TAttFill.GetFillColor(self))
                self._fillstyle = FillStyle(ROOT.TAttFill.GetFillStyle(self))
            else:  # HistStack
                self._fillcolor = Color(Plottable.DEFAULT_DECOR['fillcolor'])
                self._fillstyle = FillStyle(Plottable.DEFAULT_DECOR['fillstyle'])

            if isinstance(self, ROOT.TAttMarker):
                self._markercolor = Color(ROOT.TAttMarker.GetMarkerColor(self))
                self._markerstyle = MarkerStyle(ROOT.TAttMarker.GetMarkerStyle(self))
                self._markersize = ROOT.TAttMarker.GetMarkerSize(self)
            else:  # HistStack
                self._markercolor = Color(Plottable.DEFAULT_DECOR['markercolor'])
                self._markerstyle = MarkerStyle(Plottable.DEFAULT_DECOR['markerstyle'])
                self._markersize = Plottable.DEFAULT_DECOR['markersize']

            if obj is None:
                # Populate defaults if we are not asrootpy-ing existing object
                decor = dict(**Plottable.DEFAULT_DECOR)
                decor.update(Plottable.EXTRA_ATTRS)
                if 'color' in kwargs:
                    decor.pop('linecolor', None)
                    decor.pop('fillcolor', None)
                    decor.pop('markercolor', None)
                decor.update(kwargs)
                self.decorate(**decor)

        else:
            # Initialize style attrs to style of the other object
            if isinstance(obj, ROOT.TAttLine):
                self.SetLineColor(obj.GetLineColor())
                self.SetLineStyle(obj.GetLineStyle())
                self.SetLineWidth(obj.GetLineWidth())
            if isinstance(obj, ROOT.TAttFill):
                self.SetFillColor(obj.GetFillColor())
                self.SetFillStyle(obj.GetFillStyle())
            if isinstance(obj, ROOT.TAttMarker):
                self.SetMarkerColor(obj.GetMarkerColor())
                self.SetMarkerStyle(obj.GetMarkerStyle())
                self.SetMarkerSize(obj.GetMarkerSize())
            if kwargs:
                self.decorate(**kwargs)
1182531
def _data_dep_init(self, inputs):
    """"""

    with tf.variable_scope("data_dep_init"):
      # Generate data dependent init values
      activation = self.layer.activation
      self.layer.activation = None
      x_init = self.layer.call(inputs)
      m_init, v_init = tf.moments(x_init, self.norm_axes)
      scale_init = 1. / tf.sqrt(v_init + 1e-10)

    # Assign data dependent init values
    self.layer.g = self.layer.g * scale_init
    self.layer.bias = (-m_init * scale_init)
    self.layer.activation = activation
    self.initialized = True
1214445
private function initialize() {
        $CI = get_instance();
        $CI->config->load('dwootemplate', TRUE);
        $config = $CI->config->item('dwootemplate');
        foreach ($config as $key => $val) {
                $this->$key = $val;
        }
    }
875324
function getInstanceInitExpression(initInstanceVars) {
  let expressions = initInstanceVars.map((mv) => {
    let name = mv.name.literalToken;
    return parseExpression `this.${name} = ${mv.initializer}`;
  });
  return createCommaExpression(expressions);
}
121562
private function initialiseVariables(): void
    {
        $this->entityInterfaceFqn = $this->namespaceHelper->getEntityInterfaceFromEntityFqn($this->entityFqn);
        list($className, , $subDirs) = $this->namespaceHelper->parseFullyQualifiedName(
            $this->entityFqn,
            $this->srcSubFolderName,
            $this->projectRootNamespace
        );

        $this->singularNamespacedName = $this->namespaceHelper->getSingularNamespacedName(
            $this->entityFqn,
            $subDirs
        );
        $this->pluralNamespacedName   = $this->namespaceHelper->getPluralNamespacedName(
            $this->entityFqn,
            $subDirs
        );
        $this->setDestinationDirectory(
            $className,
            $subDirs
        );
        $plural                  = \ucfirst(MappingHelper::getPluralForFqn($this->entityFqn));
        $singular                = \ucfirst(MappingHelper::getSingularForFqn($this->entityFqn));
        $nsNoEntities            = \implode('\\', \array_slice($subDirs, 2));
        $this->singularNamespace = \ltrim($nsNoEntities . '\\' . $singular, '\\');
        $this->pluralNamespace   = \ltrim($nsNoEntities . '\\' . $plural, '\\');
        $this->dirsToRename      = [];
        $this->filesCreated      = [];
    }
52353
private void initializeVariables() throws SAXException {
        prev = '\u0000';
        // First line
        line = 0;
        column = 1;
        linePrev = 0;
        columnPrev = 1;
        nextCharOnNewLine = true;

        // Set up the buffers for data and names
        dataBufferPos = 0;
        dataBuffer = new char[DATA_BUFFER_INITIAL];
        nameBufferPos = 0;
        nameBuffer = new char[NAME_BUFFER_INITIAL];

        // Set up the DTD hash tables
        elementInfo = new HashMap<>();
        entityInfo = new HashMap<>();
        notationInfo = new HashMap<>();
        skippedPE = false;

        // Set up the variables for the current
        // element context.
        currentElement = null;
        currentElementContent = CONTENT_UNDECLARED;

        // Set up the input variables
        sourceType = INPUT_NONE;
        inputStack = new LinkedList<>();
        entityStack = new LinkedList<>();
        tagAttributePos = 0;
        tagAttributes = new String[100];
        //rawReadBuffer = new byte[READ_BUFFER_MAX];
        readBufferOverflow = -1;

        inLiteral = false;
        expandPE = false;
        peIsError = false;

        doReport = false;

        inCDATA = false;

        symbolTable = new Object[SYMBOL_TABLE_LENGTH][];

        if (handler.checkNormalization) {
            normalizationChecker = new NormalizationChecker(handler);
            normalizationChecker.setErrorHandler(handler.getErrorHandler());
            normalizationChecker.start();
        } else {
            normalizationChecker = null;
        }
        if (handler.characterHandler != null) {
            characterHandler = handler.characterHandler;
            handler.characterHandler = null;
            characterHandler.start();
        } else {
            characterHandler = null;
        }
    }
1069482
private void loadInstanceField(XField instanceField, Instruction obj) {
        if (RLE_DEBUG) {
            System.out.println("[loadInstanceField for field " + instanceField + " in instruction " + handle);
        }

        ValueNumberFrame frame = getFrame();

        try {
            ValueNumber reference = frame.popValue();

            AvailableLoad availableLoad = new AvailableLoad(reference, instanceField);
            if (RLE_DEBUG) {
                System.out.println("[getfield of " + availableLoad + "]");
            }
            ValueNumber[] loadedValue = frame.getAvailableLoad(availableLoad);

            if (loadedValue == null) {
                // Get (or create) the cached result for this instruction
                ValueNumber[] inputValueList = new ValueNumber[] { reference };
                loadedValue = getOutputValues(inputValueList, getNumWordsProduced(obj));

                // Make the load available
                frame.addAvailableLoad(availableLoad, loadedValue);
                if (RLE_DEBUG) {
                    System.out.println("[Making load available " + availableLoad + " <- " + vlts(loadedValue) + "]");
                }
            } else {
                // Found an available load!
                if (RLE_DEBUG) {
                    System.out.println("[Found available load " + availableLoad + " <- " + vlts(loadedValue) + "]");
                }
            }

            pushOutputValues(loadedValue);

            if (VERIFY_INTEGRITY) {
                checkConsumedAndProducedValues(obj, new ValueNumber[] { reference }, loadedValue);
            }
        } catch (DataflowAnalysisException e) {
            throw new InvalidBytecodeException("Error loading from instance field", e);
        }
    }
212526
def _init_values(self, context=None):
        
        if context is None:
            context = self.env.context
        # Get basic fields (no relational ones)
        basic_fields = []
        for field_name in self._columns:
            field = self._columns[field_name]
            if not getattr(field, 'relation', False):
                basic_fields.append(field_name)
        # Fetch values from the server
        if self.ids:
            rows = self.__class__.read(
                self.ids, basic_fields, context=context, load='_classic_write')
            ids_fetched = set()
            for row in rows:
                ids_fetched.add(row['id'])
                for field_name in row:
                    if field_name == 'id':
                        continue
                    self._values[field_name][row['id']] = row[field_name]
            ids_in_error = set(self.ids) - ids_fetched
            if ids_in_error:
                raise ValueError(
                    "There is no '{model}' record with IDs {ids}.".format(
                        model=self._name, ids=list(ids_in_error)))
        # No ID: fields filled with default values
        else:
            default_get = self.__class__.default_get(
                list(self._columns), context=context)
            for field_name in self._columns:
                self._values[field_name][None] = default_get.get(
                    field_name, False)
670735
private void initIndexVariable(String name, TemplateParserContext context) {
    this.indexVariableInfo = context.addLocalVariable("int", name.trim());
  }
140363
def _initialize_counters(model_class, name, bases, attrs):
    """"""
    model_class._counters = []
    for k, v in attrs.iteritems():
        if isinstance(v, Counter):
            model_class._counters.append(k)
1136871
function initModule (args) {
    debug('new ImmutableCoreController', args)
    // require object for args
    assert.equal(typeof args, 'object', 'argument must be object')
    // get name from args if set
    if (args.name) {
        // require name to be string
        assert.equal(typeof args.name, 'string', 'name must be string')
        // set name
        this.name = args.name
    }
    else {
        // use model name if set
        if (args.model) {
            this.name = args.model.name
        }
        // require name
        else {
            throw new Error('name required')
        }
    }
    // set model
    this.model = args.model
    // module name is model name with Controller appended
    this.moduleName = this.name+'Controller'
    // create new immutable module for model - this will throw error
    // if moduleName is already defined
    this.module = immutable.module(this.moduleName, {})
    // add info to module meta
    this.module.meta.class = 'ImmutableCoreController'
    this.module.meta.instance = this
    // set default limit for index results
    this.defaultLimit = args.defaultLimit || DEFAULT_LIMIT
}
152770
def init_arg_names(obj):
    
    # doing something wildly hacky by pulling out the arguments to
    # __init__ or __new__ and hoping that they match fields defined on the
    # object
    try:
        init_code = obj.__init__.__func__.__code__
    except AttributeError:
        try:
            init_code = obj.__new__.__func__.__code__
        except AttributeError:
            # if object is a namedtuple then we can return its fields
            # as the required initial args
            if hasattr(obj, "_fields"):
                return obj._fields
            else:
                raise ValueError("Cannot determine args to %s.__init__" % (obj,))

    arg_names = init_code.co_varnames[:init_code.co_argcount]
    # drop self argument
    nonself_arg_names = arg_names[1:]
    return nonself_arg_names
1161439
def __initializeFromRaw(self):
        """"""

        for (key, value) in self.raw_data.items():
            if key.startswith("@"):
                # be compatible with IncludedInBuild
                if "@oslc_cm:label" != key:
                    continue

            attr = key.split(":")[-1].replace("-", "_")
            attr_list = attr.split(".")

            # ignore long attributes
            if len(attr_list) > 1:
                # attr = "_".join([attr_list[-2],
                #                  attr_list[-1]])
                continue

            self.field_alias[attr] = key

            if isinstance(value, OrderedDict):
                value_text = value.get("#text")
                if value_text is not None:
                    value = value_text
                else:
                    # request detailed info using rdf:resource
                    value = list(value.values())[0]

                    try:
                        value = self.__get_rdf_resource_title(value)
                    except (exception.RTCException, Exception):
                        self.log.error("Unable to handle %s", value)
            self.setattr(attr, value)
182002
function ImmutableCoreModel (args) {
    // store copy of original args
    this.args = _.cloneDeep(args)
    // initialize global data
    this.initGlobal(args)
    // create module and set options
    this.initModule(args)
    // initialize column spec for model
    this.initColumns(args)
    // initialize multi-column indexes
    this.initIndexes(args)
    // create and validate JSON schema
    this.initJsonSchema(args)
    // add create method to module
    this.initCreate(args)
    // add query method to module
    this.initQuery(args)
    // add associated actions
    this.initActions(args)
    // initialize any model views
    this.initViews(args)
    // initialize related models
    this.initRelations(args)
    // initialize access control
    this.initAccessControl(args)
    // create columnsId
    this.initIds()
}