See _path for the meaning of the variables
188088
def path_from_structure(cls, ndivsm, structure):
        """"""
        return cls._path(ndivsm,  structure=structure, comment="K-path generated automatically from structure")
1283437
def _subst_vars(path, local_vars):
    
    def _replacer(matchobj):
        name = matchobj.group(1)
        if name in local_vars:
            return local_vars[name]
        elif name in os.environ:
            return os.environ[name]
        return matchobj.group(0)
    return _VAR_REPL.sub(_replacer, path)
478504
def view_variables
      instance_variables
        .select { |var| additional_var?(var) }
        .map { |var| fetch_ivar_value(var) }
    end
1023470
def _get_result_paths(self,data):
        
        result = {}
        result['Tree'] = ResultPath(Path=splitext(self._input_filename)[0] + \
                                                  '.tree')
        return result
135871
def visit_Variable(self, node):
        """"""
        var_name = node.identifier.name
        var_symbol = self.table[var_name]

        if var_symbol is None:
            raise SementicError(f"Variable `{var_name}` is not declared.")
922519
def print_path(path: Path) -> str:
    """"""
    path_str = ""
    current_path: Optional[Path] = path
    while current_path:
        path_str = (
            f".{current_path.key}"
            if isinstance(current_path.key, str)
            else f"[{current_path.key}]"
        ) + path_str
        current_path = current_path.prev
    return f"value{path_str}" if path_str else ""
1191380
function parsePath() {
  for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
    args[_key3] = arguments[_key3];
  }

  var target = args[0],
      path = args[1],
      value = args[2];
  warning(typeof path === 'string', "The second parameter(".concat(JSON.stringify(path), ") of parsePath() must be a string."));
  var pathSymbols = (path.match(PATH_REGEXP) || []).map(function (s) {
    return s.replace(/\s/g, '');
  });
  var pathWords = path.split(PATH_REGEXP).map(function (s) {
    return s.trim();
  }).filter(function (item) {
    return item !== '';
  });
  var scope = target;

  try {
    if (args.length < 3) {
      for (var index = 0, len = pathWords.length; index < len; index++) {
        var word = executeWord(pathWords[index]);

        if (index + 1 === len) {
          return scope[word];
        }

        if (isUndefined(scope[word])) {
          break;
        }

        scope = scope[word];
      }
    } else {
      for (var _index = 0, length = pathWords.length; _index < length; _index++) {
        var _word = executeWord(pathWords[_index]);

        var nextWord = pathWords[_index + 1];
        var symbol = pathSymbols[_index];

        if (isUndefined(nextWord)) {
          scope[_word] = value;
          break;
        }

        switch (symbol) {
          case '].':
          case '.':
            scope = isUndefined(scope[_word]) ? scope[_word] = {} : scope[_word];
            break;

          case '][':
          case '[':
            var nextVarWord = executeWord(nextWord);
            scope = isUndefined(scope[_word]) ? scope[_word] = typeof nextVarWord === 'number' && nextVarWord >= 0 ? [] : {} : scope[_word];
            break;

          default:
            scope[_word] = value;
            break;
        }
      }
    }
  } catch (error) {
    warning(false, "The name '%s' of Field seems is not a legal expression.", path);
  }

  if (args.length > 2) {
    return target;
  }
}
832375
def get_config_var(self, path, env=None):
        '''
        
        '''
        if env is None:
            env = {}
        result = self.conf
        for e in path.split('.'):
            if e[0] == '$':
                try:
                    result = result[env[e[1:]]]
                except KeyError as ex:
                    try:
                        result = result['.default']
                    except KeyError:
                        raise ex
            else:
                result = result[e]
        return result
54402
def describe_variables(self, v):
        
        reverse_mapping = {next(iter(var.variables)): k for k, var in self.eternal_tracked_variables.items()}
        reverse_mapping.update({next(iter(var.variables)): k for k, var in self.temporal_tracked_variables.items() if k[-1] is not None})

        for var in v.variables:
            if var in reverse_mapping:
                yield reverse_mapping[var]
536638
def save_chkpt_vars(dic, path):
    
    logger.info("Variables to save to {}:".format(path))
    keys = sorted(list(dic.keys()))
    logger.info(pprint.pformat(keys))

    assert not path.endswith('.npy')
    if path.endswith('.npz'):
        np.savez_compressed(path, **dic)
    else:
        with tf.Graph().as_default(), \
                tf.Session() as sess:
            for k, v in six.iteritems(dic):
                k = get_op_tensor_name(k)[0]
                _ = tf.Variable(name=k, initial_value=v)    # noqa
            sess.run(tf.global_variables_initializer())
            saver = tf.train.Saver()
            saver.save(sess, path, write_meta_graph=False)
904788
def path
      temporary = []
      actual_route = nil
      router do |route|
        actual_route = extract_and_format_route(route)
        temporary.push(actual_route) unless temporary.include?(actual_route)
        actual_route
      end
      temporary
    end
1141833
function getIdentifierVariableName(path) {
  if (
    path.isIdentifier()
    && path.parentPath.isCallExpression()
    && path.parentPath.parentPath.isVariableDeclarator()
  ) {
    const variableName = path.parentPath.parentPath.node.id.name;
    return variableName;
  }

  return '';
}
551198
def fetch_variables_config(path)
      descriptor = yaml_content(path)
      @variables = descriptor[::Knowledge.config.environment.to_s] || descriptor
    end
849743
def find_program_variables(code):
    
    vars = {}
    lines = code.split('\n')
    for line in lines:
        m = re.match(r"\s*" + re_prog_var_declaration + r"\s*(=|;)", line)
        if m is not None:
            vtype, dtype, names = m.groups()[:3]
            for name in names.split(','):
                vars[name.strip()] = (vtype, dtype)
    return vars
488690
def get_variables
      return unless File.exists?(ENV_FILE)

      File.open(ENV_FILE).each do |line|
        var_name = line.split("=").first
        yield var_name unless line =~ /^\#/
      end
    end
767098
def lookup_variable(context, variable)
      lookup = context

      variable.split(".").each do |value|
        lookup = lookup[value]
      end

      lookup || variable
    end
510767
def get_variables(run_name):
    
    conn, c = open_data_base_connection()
    try:
        # Get latest project
        c.execute("""SELECT variable_name FROM {}""".format(run_name))
        variable_names = np.array(c.fetchall()).squeeze(axis=1)
        variable_names = convert_list_to_dict(variable_names)
        return variable_names
    except sqlite3.OperationalError:
        logging.info("{} not found".format(run_name))
    finally:
        conn.close()