Get files from environment variables
185465
function getFiles () {
  const FUCK_ENV = process.env.FUCK_ENV
    || process.env.npm_package_config_FUCK_ENV
    || FUCK_ENV_DEFAULT
  return FUCK_ENV.split(',').map(file => path.resolve(root, file))
}
517977
def _GetFilePaths(self, path, pathtype, kb):
    """"""

    environ_vars = artifact_utils.GetWindowsEnvironmentVariablesMap(kb)
    path_guesses = path_detection_windows.DetectExecutablePaths([path],
                                                                environ_vars)

    if not path_guesses:
      # TODO(user): yield a ParserAnomaly object
      return []

    return [
        rdf_paths.PathSpec(path=path, pathtype=pathtype)
        for path in path_guesses
    ]
113706
def get_env_dirs(self):
        """"""
        repo_dirs = next(os.walk(self.env_root))[1]
        if '.git' in repo_dirs:
            repo_dirs.remove('.git')  # not relevant for any repo operations
        return repo_dirs
950260
public static function getEnvironmentVariables() {
    $dir = shell_exec('pwd');
    $dir_parts = explode(DIRECTORY_SEPARATOR, $dir);
    $project = trim(array_pop($dir_parts));
    $client = trim(array_pop($dir_parts));
    $dir = $dir . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'project' . DIRECTORY_SEPARATOR . $client . DIRECTORY_SEPARATOR . $project;
    $environment_file = file_get_contents($dir . DIRECTORY_SEPARATOR . 'environment.yml');
    if (!$environment_file) {
      throw new MissingEnvironmentConfigurationException("The environment configuration is missing, please contact your administrator.");
    }
    return new EnvironmentVariables(Yaml::parse($environment_file));
  }
214409
def get_env():
    ''' 
    '''
    if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
        # PyInstaller uses _MEIPASS and only works with jinja2.FileSystemLoader
        templates_path = join(sys._MEIPASS, 'bokeh', 'core', '_templates')
    else:
        # Non-frozen Python and cx_Freeze can use __file__ directly
        templates_path = join(dirname(__file__), '_templates')

    return Environment(loader=FileSystemLoader(templates_path))
899625
def getenv(option_name, default=None):
    """"""
    env = "%s_%s" % (NAMESPACE.upper(), option_name.upper())
    return os.environ.get(env, default)
1352714
def get_yaml_files_at_env_root(self):
        """"""
        yaml_files = glob.glob(
            os.path.join(self.env_root, '*.yaml')
        )
        yml_files = glob.glob(
            os.path.join(self.env_root, '*.yml')
        )
        return yaml_files + yml_files
222656
def env(mounts):
    
    f_mounts = [m.strip("/") for m in mounts]

    root = local.path("/")

    ld_libs = [root / m / "lib" for m in f_mounts]
    ld_libs.extend([root / m / "lib64" for m in f_mounts])

    paths = [root / m / "bin" for m in f_mounts]
    paths.extend([root / m / "sbin" for m in f_mounts])
    paths.extend([root / m for m in f_mounts])
    return paths, ld_libs
552164
def get_environment_vars(filename):
    """"""
    if sys.platform == "linux" or sys.platform == "linux2":
        return {
            'LD_PRELOAD': path.join(LIBFAKETIME_DIR, "libfaketime.so.1"),
            'FAKETIME_SKIP_CMDS': 'nodejs',     # node doesn't seem to work in the current version.
            'FAKETIME_TIMESTAMP_FILE': filename,
        }
    elif sys.platform == "darwin":
        return {
            'DYLD_INSERT_LIBRARIES': path.join(LIBFAKETIME_DIR, "libfaketime.1.dylib"),
            'DYLD_FORCE_FLAT_NAMESPACE': '1',
            'FAKETIME_TIMESTAMP_FILE': filename,
        }
    else:
        raise RuntimeError("libfaketime does not support '{}' platform".format(sys.platform))
1313377
def list_env(self, saltenv='base'):
        '''
        
        '''
        load = {'saltenv': saltenv,
                'cmd': '_file_list'}
        return salt.utils.data.decode(self.channel.send(load)) if six.PY2 \
            else self.channel.send(load)
599248
def get_environment_paths(config, env):
    
    if env is None:
        return config.get(Config.DEFAULTS, 'environment')

    # Config option takes precedence over environment key.
    if config.has_option(Config.ENVIRONMENTS, env):
        env = config.get(Config.ENVIRONMENTS, env).replace(' ', '').split(';')
    else:
        env = os.getenv(env)
        if env:
            env = env.split(os.pathsep)
    return [i for i in env if i]
447599
def _get_env(self):
        
        env = {}
        for k, v in os.environ.items():
            k = k.decode() if isinstance(k, bytes) else k
            v = v.decode() if isinstance(v, bytes) else v
            env[k] = v
        return list(env.items())
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
331684
def get_from_environment():
    '''
        
    '''
    name = os.environ.get("EXECJS_RUNTIME", "")
    if not name:
        return None

    try:
        return _find_runtime_by_name(name)
    except exceptions.RuntimeUnavailableError:
        return None
1002347
def load_env(print_vars=False):
    
    env_file = os.environ.get('ENV_FILE', '.env')
    try:
        variables = open(env_file).read().splitlines()
        for v in variables:
            if '=' in v:
                key, value = v.split('=', 1)
                if key.startswith('#'):
                    continue
                if key not in os.environ:
                    if value.startswith('"') and value.endswith('"') or \
                                    value.startswith("'") and value.endswith("'"):
                        os.environ[key] = ast.literal_eval(value)
                    else:
                        os.environ[key] = value
                    if print_vars:
                        print(key, os.environ[key])
    except IOError:
        pass
1307530
def get_py_files(dir_name: str) -> list:
    """"""
    return flatten([
        x for x in
        [["{0}/{1}".format(path, f) for f in files if f.endswith(".py")]
         for path, _, files in os.walk(dir_name)
         if not path.startswith("./build")] if x
    ])
1290790
def _settings_from_env(self):
        """"""
        return {attr: self._val_from_env(env, attr)
                for env, attr in const.ENV_TO_ATTR.items()
                if env in os.environ}