Returns true if env_a touches env_b.
174617
private static boolean envelopeTouchesEnvelope_(Envelope2D env_a,
			Envelope2D env_b, double tolerance, ProgressTracker progress_tracker) {
		if (env_a.getHeight() <= tolerance && env_a.getWidth() <= tolerance) {// treat
																				// env_a
																				// as
																				// point
			Point2D pt_a = env_a.getCenter();
			return pointTouchesEnvelope_(pt_a, env_b, tolerance,
					progress_tracker);
		}

		if (env_b.getHeight() <= tolerance && env_b.getWidth() <= tolerance) {// treat
																				// env_b
																				// as
																				// point
			Point2D pt_b = env_b.getCenter();
			return pointTouchesEnvelope_(pt_b, env_a, tolerance,
					progress_tracker);
		}

		Envelope2D _env_a;
		Envelope2D _env_b;

		if (env_a.getHeight() > tolerance
				&& env_a.getWidth() > tolerance
				&& (env_b.getHeight() <= tolerance || env_b.getWidth() <= tolerance)) {
			// swap a and b
			_env_a = env_b;
			_env_b = env_a;
		} else {
			_env_a = env_a;
			_env_b = env_b;
		}

		if (_env_a.getHeight() <= tolerance || _env_a.getWidth() <= tolerance) {// treat
																				// env_a
																				// as
																				// line

			if (_env_b.getHeight() <= tolerance
					|| _env_b.getWidth() <= tolerance) {// treat env_b as line

				Line line_a = new Line(), line_b = new Line();
				double[] scalars_a = new double[2];
				double[] scalars_b = new double[2];
				Point2D pt = new Point2D();
				_env_a.queryLowerLeft(pt);
				line_a.setStartXY(pt);
				_env_a.queryUpperRight(pt);
				line_a.setEndXY(pt);
				_env_b.queryLowerLeft(pt);
				line_b.setStartXY(pt);
				_env_b.queryUpperRight(pt);
				line_b.setEndXY(pt);

				line_a.intersect(line_b, null, scalars_a, scalars_b, tolerance);
				int count = line_a.intersect(line_b, null, null, null,
						tolerance);

				if (count != 1)
					return false;

				return scalars_a[0] == 0.0 || scalars_a[1] == 1.0
						|| scalars_b[0] == 0.0 || scalars_b[1] == 1.0;
			}

			// treat env_b as area

			Envelope2D env_b_deflated = new Envelope2D(), env_inter = new Envelope2D();
			env_b_deflated.setCoords(_env_b);
			env_b_deflated.inflate(-tolerance, -tolerance);
			env_inter.setCoords(env_b_deflated);
			env_inter.intersect(_env_a);

			if (!env_inter.isEmpty()
					&& (env_inter.getHeight() > tolerance || env_inter
							.getWidth() > tolerance))
				return false;

			assert (!envelopeDisjointEnvelope_(_env_a, _env_b, tolerance,
					progress_tracker));
			return true; // we already know they intersect within a tolerance
		}

		Envelope2D env_inter = new Envelope2D();
		env_inter.setCoords(_env_a);
		env_inter.intersect(_env_b);

		if (!env_inter.isEmpty() && env_inter.getHeight() > tolerance
				&& env_inter.getWidth() > tolerance)
			return false;

		return true; // we already know they intersect within a tolerance
	}
407736
function booleanEnvTrace(condition) {
    var conditionObj = parseCondition(condition);

    if (conditionObj.negate)
      return traceCondition(conditionalComplement(condition), false);
    else
      return traceCondition(condition, true);
  }
1187359
private static boolean multiPointEqualsEnvelope_(MultiPoint multipoint_a,
			Envelope envelope_b, double tolerance,
			ProgressTracker progress_tracker) {
		Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
		multipoint_a.queryEnvelope2D(env_a);
		envelope_b.queryEnvelope2D(env_b);

		if (env_b.getHeight() > tolerance || env_b.getWidth() > tolerance)
			return false;

		// only true if all the points of the multi_point degenerate to a point
		// equal to the envelope
		return envelopeEqualsEnvelope_(env_a, env_b, tolerance,
				progress_tracker);
	}
973179
def _check_environ(variable, value):
    """"""
    if is_not_none(value):
        return value
    else:
        value = os.environ.get(variable)
        if is_none(value):
            stop(''.join([variable,
                          """ not supplied and no entry in environmental
                           variables"""]))
        else:
            return value
1033845
def get_wrapper_by_cls(env, cls):
    """"""
    currentenv = env
    while True:
        if isinstance(currentenv, cls):
            return currentenv
        elif isinstance(currentenv, gym.Wrapper):
            currentenv = currentenv.env
        else:
            return None
795700
def env(name, value)
      ENV[name] = value

      if value
        Stairs.configuration.env_adapter.set name, value
      else
        Stairs.configuration.env_adapter.unset name
      end
    end
711759
def has_value(self):
        
        if self._get_envvar_value() is not not_set:
            return True
        else:
            return self.default is not not_set or self._value is not not_set
392144
public boolean touches(IndexRange other) {
        checkArgNotNull(other, "other");
        return other.end == start || end == other.start;
    }
1116783
def _objects_touch_each_other(self, object1: Object, object2: Object) -> bool:
        
        in_vertical_range = object1.y_loc <= object2.y_loc + object2.size and \
                            object1.y_loc + object1.size >= object2.y_loc
        in_horizantal_range = object1.x_loc <= object2.x_loc + object2.size and \
                            object1.x_loc + object1.size >= object2.x_loc
        touch_side = object1.x_loc + object1.size == object2.x_loc or \
                     object2.x_loc + object2.size == object1.x_loc
        touch_top_or_bottom = object1.y_loc + object1.size == object2.y_loc or \
                              object2.y_loc + object2.size == object1.y_loc
        return (in_vertical_range and touch_side) or (in_horizantal_range and touch_top_or_bottom)
784473
private static boolean polylineDisjointEnvelope_(Polyline polyline_a,
			Envelope envelope_b, double tolerance,
			ProgressTracker progress_tracker) {
		Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
		polyline_a.queryEnvelope2D(env_a);
		envelope_b.queryEnvelope2D(env_b);

		if (envelopeInfContainsEnvelope_(env_b, env_a, tolerance))
			return false;

		return !linearPathIntersectsEnvelope_(polyline_a, env_b, tolerance,
				progress_tracker);
	}
808535
def _with_env(self, env):
        """"""
        res = self._browse(env, self._ids)
        return res
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
27329
def overlaps(self, other):
        
        if self.chrom != other.chrom: return False
        if self.start >= other.end: return False
        if other.start >= self.end: 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
815972
def is_in_virtualenv():
    

    pipenv_active = os.environ.get("PIPENV_ACTIVE", False)
    virtual_env = None
    use_system = False
    ignore_virtualenvs = bool(os.environ.get("PIPENV_IGNORE_VIRTUALENVS", False))

    if not pipenv_active and not ignore_virtualenvs:
        virtual_env = os.environ.get("VIRTUAL_ENV")
        use_system = bool(virtual_env)
    return (use_system or virtual_env) and not (pipenv_active or ignore_virtualenvs)
1318727
def canintersect(self, other):
		'''
			
		'''
		return not (self.max < other.min or other.max < self.min)
1289538
def has_envconfig() -> bool:
        
        if (os.getenv("VAULT_TOKEN", None) or
                (os.getenv("VAULT_APPID", None) and os.getenv("VAULT_USERID", None)) or
                (os.getenv("VAULT_SSLCERT", None) and os.getenv("VAULT_SSLKEY", None)) or
                (os.getenv("VAULT_ROLEID", None) and os.getenv("VAULT_SECRETID", None))):
            return True

        return False