Declare the variables defined in the dictionary d.
191472
def declare_vars(self, d):
        """"""
        for k, v in d.items():
            self.declare_var(k, v)
977181
def format_variables(variables, join_lines=True):
  """"""
  rows = []
  rows.append(("Variable", "Shape", "Type", "Collections", "Device"))
  var_to_collections = _get_vars_to_collections(variables)
  for var in sorted(variables, key=lambda var: var.op.name):
    if var.get_shape().is_fully_defined():
      shape = "x".join(str(dim) for dim in var.get_shape().as_list())
    else:
      shape = "undefined"
    dtype = repr(var.dtype.base_dtype).replace("tf.", "")
    coll = ", ".join(sorted(var_to_collections[var]))
    rows.append((var.op.name, shape, dtype, coll, _format_device(var)))
  return _format_table(rows, join_lines)
37600
private void initializeVars() {
        mNodeKey = mWtx.getNode().getDataKey();
        mFound = false;
        mIsRightSibling = false;
        mKeyMatches = -1;
    }
1032388
def get_variables(self) -> Set[str]:
        
        variables = set()
        for cmd in self._cmd:
            for var in self.__formatter.parse(cmd):
                logger.debug("Checking variable: %s", var)
                # creates and requires are special class values
                if var[1] is not None and var[1] not in ["creates", "requires"]:
                    variables.add(var[1])
        return variables
203944
def _set_declarations(self, declarations):
        """"""
        assert isinstance(declarations, CodeStatement)
        self.declarations = declarations
        declarations.scope = self.body
525630
private function buildVariableDefinitions() {
        foreach($this->getFields() as $field) {
            $variable = new Object\Variable();
            $variable->setName($field->getShortName());
            $variable->setAccess('protected');
            $variable->setAutoIncrementing($field->isAutoIncrementing());
            $variable->setDescription($field->getDescription());
            $variable->setLength($field->getLength());
            $variable->setNullable($field->isNullable());
            $variable->setPrimary($field->isPrimary());
            $variable->setType($field->getType());
            $this->getAbstractClass()->addVariable($variable);
        }
    }
176809
def check_variables(self):
        
        
        self.count = len(self.fileid)
        self.size = np.size([np.size(self.__dict__.get(par)) for par in self.par_list])
        
        infos = zip(*(self.par_list.tolist(),self.dim_list.tolist()))
#        curDim, nself = self.get_currentDim()
        
        for enum in enumerate(infos):
            varSize = np.size(self.__dict__.get(enum[1][0]))
            varShape = np.shape(self.__dict__.get(enum[1][0]))[::-1] #Data and Netcdf dimensions are inverted (not allways?)
            
            dimSize = None
            if hasattr(self.__dict__.get(enum[1][0]),'_dimensions') :
                dumDim = self.__dict__.get(enum[1][0])._dimensions
                dumDim.pop('_ndims')
                dimSize = tuple(dumDim.values())
            elif isinstance(self.__dict__.get(enum[1][0]),dict):
                if self.__dict__.get(enum[1][0]).has_key('_dimensions'):
                    dumDim = self.__dict__.get(enum[1][0])['_dimensions']
                    dumDim.pop('_ndims')
                    dimSize = tuple(dumDim.values())
            
            if dimSize is None :
                if isinstance(self._dimensions,dimStr) :
                    dimSize = (self._dimensions).get(enum[1][1])
                else :
                    dimSize = tuple([(self._dimensions).get([d]) for d in enum[1][1]])
                
            masked = isinstance(self.__dict__.get(enum[1][0]), np.ma.masked_array)
            
            #Check mask consistency (mask length should be the same as data)
            if masked :
                if (self.__dict__.get(enum[1][0]).mask.size != self.__dict__.get(enum[1][0]).data.size): raise np.ma.core.MaskError("Mask length is not consistent with data")
            
            #Check dimensions
            self.message(4, 'checking variables -> {0}(N={1}) - {2}:{3}'.format(enum[1][0],varSize,enum[1][1],dimSize))
            for n,sh in enumerate(varShape) :
                if (sh > dimSize[n]) :
                    self.Error('Object variable {0} greater than corresponding dimension ({1})'.format(enum[1][0],enum[1][1]))
                elif (sh < dimSize[n]):
                    self.message(3, 'Variable {0}(N={1}) being extended to match dimension {2}:{3}'.format(enum[1][0],varSize,enum[1][1],dimSize))  
    #                self.__dict__[enum[1][0]] = np.ma.concatenate((self.__dict__[enum[1][0]], np.ma.masked_array(np.repeat(np.nan,dimSize - varSize),mask=np.zeros(dimSize - varSize,dtype='bool'))))
    
                    #Save additonnal attributes
                    attrStr={}
                    for a in set(self.__dict__[enum[1][0]].__dict__.keys()).difference(np.ma.empty(0,dtype=bool).__dict__.keys()):
                        attrStr.update({a:self.__dict__[enum[1][0]].__dict__[a]})
                    self.__dict__[enum[1][0]] = np.ma.masked_array( np.append(self.__dict__[enum[1][0]].data,np.repeat(self.__dict__[enum[1][0]].fill_value if hasattr(self.__dict__[enum[1][0]],'fill_value') else np.NaN,dimSize[n] - varSize)),
                                                                    mask=np.append(self.__dict__[enum[1][0]].mask,np.ones(dimSize[n] - varSize,dtype='bool')) )
                    self.__dict__[enum[1][0]].__dict__.update(attrStr)
985108
def append(self, name, value):
        
        if self.vars is None:
            self.vars = {}
        if name in self.vars:
            self.vars[name].append(value)
        else:
            self.vars[name] = [value]
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      = [];
    }
1156783
private function initFromGetVariables()
    {
        $key_orderby = $this->getLinkPrefix() . 'orderby';
        $key_orderbydir = $this->getLinkPrefix() . 'orderbydir';

        if (isset($_GET[$key_orderby]) && $_GET[$key_orderby] == $this->id) {
            $this->view->orderby_column = $this;

            if (isset($_GET[$key_orderbydir])) {
                $this->setDirectionByString($_GET[$key_orderbydir]);
            }
        }
    }
40550
def __add_variables(self, *args, **kwargs):
        

        for variable in args:
            self.__variables[variable] = None
        self.__variables.update(kwargs)
908311
protected void initVariables(){
    	int ensembleSize = (int)this.memberCountOption.getValue();
        this.ensemble = new Classifier[ensembleSize];
        this.ensembleAges = new double[ensembleSize];
        this.ensembleWindows = new int[ensembleSize][(int)this.evaluationSizeOption.getValue()];    
    }
1322641
function set (dictionary) {
  for (var key in dictionary) {
    if (missing(key)) process.env[key] = dictionary[key]
  }
}
414140
def declare_var(self, key, val):
        """"""
        if val is not None:
            line = "export " + key + '=' + str(val)
        else:
            line = "unset " + key

        self._add(line)
2486
public VariableDecls declareVar(String bootiqueVariable) {
		this.extender.declareVar(bootiqueVariable, VariableNames.toEnvironmentVariableName(bootiqueVariable));
		return this;
	}
925170
def p_declare_statement(p):
    ''''''
    if len(p) == 2:
        p[0] = p[1]
    else:
        p[0] = ast.Block(p[2], lineno=p.lineno(1))
772313
def add_variable(self, name):
        """"""
        if name in self._variables:
            raise ValueError(
                "A variable named " + name + " already exists."
            )
        self._variables[name] = len(self._variables)
        self.bounds[name] = (0, None)

        new_col = np.zeros(shape=[len(self._constraints), 1])
        self._add_col_to_A(new_col)
        self._reset_solution()