Returns true if supplied with a hash that has any recognized
 +environments+ in its root keys.
497738
def environment_keys?(hash)
      hash.is_a?(Hash) && hash.any? { |k, _| environments.include?(k.to_s) }
    end
1236702
protected function keyIsAlreadyInstalled()
    {
        $key = 'APP_KEY=base64:';
        $output = $this->execSSH("cd $this->domain;cat .env");
        if (str_contains($output, $key)) {
            return true;
        }
        return false;
    }
626918
def env(prefix='GH_')
      @envs ||= begin
        envs = ENV.select { |env| env.start_with? prefix }
                  .map { |k, v| [k.sub(/^#{prefix}/, ''), v] }
        down_symbolize_key(envs)
      end
      @envs.merge(dotenv)
    end
74427
protected function verifyEnvironment(): bool
    {
        if ($this->option('force') || $this->config->isSafe()) {
            //Safe to run
            return true;
        }

        $this->writeln("<fg=red>Confirmation is required to run migrations!</fg=red>");

        if (!$this->askConfirmation()) {
            $this->writeln("<comment>Cancelling operation...</comment>");

            return false;
        }

        return true;
    }
923906
private static boolean isHashConfigurationIsSupported(long numBuckets, int tagBits, int hashSize) {
		int hashBitsNeeded = getTotalBitsNeeded(numBuckets, tagBits);
		switch (hashSize) {
		case 32:
		case 64:
			return hashBitsNeeded <= hashSize;
		default:
		}
		if (hashSize >= 128)
			return tagBits <= 64 && getIndexBitsUsed(numBuckets) <= 64;
		return false;
	}
10298
def has_key(cls, *args):
        
        key = args if len(args) > 1 else args[0]
        return key in cls._instances
1372017
def _env_fixup (was)
    env = Hash[was]
    libs = (env['RUBYLIB'] || '').split(File::PATH_SEPARATOR)
    libdir = File.expand_path('../../', __FILE__)
    libs.unshift(libdir) if
      libs.find_index {|p| libdir == File.absolute_path(p) }.nil?
    env['RUBYLIB'] = libs.join(File::PATH_SEPARATOR)
    return env
  end
698751
def have_environment_marker_support():
    
    try:
        from pkg_resources import parse_version
        from setuptools import __version__
        return parse_version(__version__) >= parse_version('0.7.2')
    except Exception:
        return False
514277
def _have(self, name=None):
        
        if name is None:
            return (
                (k, v) for k, v  in self.env.items()
                if k.startswith('HAVE_')
            )
        return self.env.get('HAVE_' + self.env_key(name)) == True
587023
def get_environments():
    """"""
    envs = []
    for root, subfolders, files in os.walk('environments'):
        for filename in files:
            if filename.endswith(".json"):
                path = os.path.join(
                    root[len('environments'):], filename[:-len('.json')])
                envs.append(get_environment(path))
    return sorted(envs, key=lambda x: x['name'])
530023
def skin_namespace_hash(options = {})
      { 
        :match   =>  options[:match] ? options[:match] : /[\/]/, 
        :replace =>  options[:replace] ? options[:replace] : "_", 
        :prefix  =>  options[:prefix] ? options[:prefix] : nil,
        :root    =>  options[:root] ? options[:root] : "root"
      }
    end
1339766
def sanitized_environment
      env = environment
      return if env.empty?

      {}.tap do |out|
        Appsignal.config[:request_headers].each do |key|
          out[key] = env[key] if env[key]
        end
      end
    end
208927
boolean isEnvKeyInteresting(final String key) {
    final List<String> disallowedKeys = Arrays.asList("windir", "SystemDrive", "CommonProgramFiles", "ComSpec", "SystemRoot", "Path", "ProgramFiles");

    if (key == null || key.length() == 0)
      return false;
    // No all-uppercase keys
    if (key.toUpperCase().equals(key))
      return false;
    // No keys in the list
    if (disallowedKeys.contains(key))
      return false;

    return true;
  }
118147
def check_environment(self, environment):
        

        non_strings = []
        for (k,v) in environment.items():
            if not isinstance(v, basestring):
                non_strings.append(k)
        if non_strings:
            raise ValueError("The following environment variables are not strings: {}".format(", ".join(non_strings)))
        else:
            return True
249552
public static boolean isSystemKey(String key) {
        for (String prefix : Config13Constants.SYSTEM_PREFIXES) {
            if (key.startsWith(prefix)) {
                return true;
            }
        }
        return false;
    }
984102
public function has(string $key) : bool
    {
        $k = $this->keyConvert($key);
        return getenv($k) !== false;
    }
711837
public static boolean verifyEnvironment() {
        if (!PRODUCTION.equals(getEnv())) {
            return true;
        } else {
            File tokenFile = new File("/etc/xian/xian_runtime_production.token");
            if (tokenFile.exists() && tokenFile.isFile()) {
                String token = PlainFileUtil.readAll(tokenFile);
                return "cbab75c745ac9707cf75b719a76e81284abc04c0ae96e2506fd247e9a3d9ca04".equals(token);
            }
            return false;
        }
    }