Returns :class:`Variables` instance.
776263
def variables(self):
        
        return Variables([(k, self._unescape(k, v), sl) for k, v, sl in self._nodes_to_values()])
105128
def variable(self):
        """"""
        # Use a character invalid in python identifiers to avoid clashing.
        name = "@py_assert" + str(next(self.variable_counter))
        self.variables.append(name)
        return name
558858
def vars_class(cls):
    
    return dict(chain.from_iterable(
        vars(cls).items() for cls in reversed(cls.__mro__)))
1025575
def _get_stage_variables(stage_variables):
    '''
    
    '''
    ret = dict()
    if stage_variables is None:
        return ret

    if isinstance(stage_variables, six.string_types):
        if stage_variables in __opts__:
            ret = __opts__[stage_variables]
        master_opts = __pillar__.get('master', {})
        if stage_variables in master_opts:
            ret = master_opts[stage_variables]
        if stage_variables in __pillar__:
            ret = __pillar__[stage_variables]
    elif isinstance(stage_variables, dict):
        ret = stage_variables

    if not isinstance(ret, dict):
        ret = dict()

    return ret
277927
def parse_variables(args):
    

    if args is None:
        return {}

    def parse_variable(string):
        tokens = string.split('=')
        name = tokens[0]
        value = '='.join(tokens[1:])
        return name, value

    return {
        name: value
        for name, value in (parse_variable(v) for v in args)
    }
149752
def singleton(cls):
    

    # the only way to implement nonlocal closure variables in Python 2.X
    instances = {}

    def get_instance():
        if cls not in instances:
            instances[cls] = cls()
        return instances[cls]

    return get_instance
538316
def var(self):
        
        return self._constructor(self.values.var(axis=0, keepdims=True))
268573
def fetch(self):
        
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return VariableInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            environment_sid=self._solution['environment_sid'],
            sid=self._solution['sid'],
        )
866086
def vars(self):
        
        # cache _var_params
        if self._var_params is None:
            self._var_params = ParameterSet([var.get_parameter() for var in self._vars])
        return self._var_params
1169107
def to_vars_dict(self):
        
        return {
            'gcloud_client_id':      self._client_id,
            'gcloud_client_secret':  self._client_secret,
            'gcloud_network':        self._network,
            'gcloud_project_id':     self._project_id,
            'gcloud_zone':           self._zone,
        }
19740
def create_variable_is_dict(self):
        
        variable_name = '{}_is_dict'.format(self._variable)
        if variable_name in self._variables:
            return
        self._variables.add(variable_name)
        self.l('{variable}_is_dict = isinstance({variable}, dict)')
604381
def get_variables(self):
        
        state_variables = self.model['variables']['StateVar']
        for var in state_variables:
            state_var_tag = etree.SubElement(self.variable, 'StateVar', attrib={'vnamePrev': var['vnamePrev'],
                                                                                'vnameCurr': var['vnameCurr'],
                                                                                'fullyObs': 'true' if var['fullyObs']
                                                                                else 'false'})
            self._add_value_enum(var, state_var_tag)

        obs_variables = self.model['variables']['ObsVar']
        for var in obs_variables:
            obs_var_tag = etree.SubElement(self.variable, 'ObsVar', attrib={'vname': var['vname']})
            self._add_value_enum(var, obs_var_tag)

        action_variables = self.model['variables']['ActionVar']
        for var in action_variables:
            action_var_tag = etree.SubElement(self.variable, 'ActionVar', attrib={'vname': var['vname']})
            self._add_value_enum(var, action_var_tag)

        reward_var = self.model['variables']['RewardVar']
        for var in reward_var:
            etree.SubElement(self.variable, 'RewardVar', attrib={'vname': var['vname']})

        return self.__str__(self.variable)[:-1]
1153188
def _get_value(self, var):
        """"""
        return self._problem._p.getVarByName(self._problem._variables[var]).x
1242856
def vars(self):
        
        return self.independent_vars + self.dependent_vars + [self.sigmas[var] for var in self.dependent_vars]
857773
def vars_(self):
        
        return [x for x in self[self.current_scope].values() if x.class_ == CLASS.var]
214385
def bound_variable(self):
        
        class BoundVariable:
            def __init__(self, variable):
                self.__variable = variable
                self.changed_event = Event.Event()
                self.needs_rebind_event = Event.Event()
                def property_changed(key):
                    if key == "value":
                        self.changed_event.fire()
                self.__variable_property_changed_listener = variable.property_changed_event.listen(property_changed)
            @property
            def value(self):
                return self.__variable.value
            def close(self):
                self.__variable_property_changed_listener.close()
                self.__variable_property_changed_listener = None

        return BoundVariable(self)
1048927
def get_variables(self):
        
        variables = [variable.find('NAME').text for variable in self.network.findall('VARIABLE')]
        return variables