:returns: True if the hazard is precomputed
421659
def hazard_precomputed(self):
        
        if 'gmfs' in self.inputs or 'hazard_curves' in self.inputs:
            return True
        elif self.hazard_calculation_id:
            parent = list(util.read(self.hazard_calculation_id))
            return 'gmf_data' in parent or 'poes' in parent
894802
def is_valid_poes(self):
        
        if self.hazard_maps or self.uniform_hazard_spectra:
            return bool(self.poes)
        else:
            return True
676339
def are_in_interval(s, l, r, border = 'included'):
        
        return numpy.all([IntensityRangeStandardization.is_in_interval(x, l, r, border) for x in s])
211421
def preprocess_x_y(x, y):
    
    def is_iterable_slicable(a):
        if hasattr(a, "__iter__") and hasattr(a, "__getitem__"):
            return True
        else:
            return False

    if is_iterable_slicable(x):
        if is_iterable_slicable(x[0]):
            return x, y
        else:
            return (x,), (y,)
    else:
        raise ValueError("invalid input!")
409246
def unsafe(self):
        
        (scheme, netloc, path, params, query, frag) = urlparse(self.src_uri)
        if (scheme != ''):
            return(False)
        s = os.path.normpath(self.src_uri)
        d = os.path.normpath(self.dst_path)
        lcp = os.path.commonprefix([s, d])
        return(s == lcp or d == lcp)
464194
def coordinates_present?(*args)
      args.each do |a|
        # note that Float::NAN != Float::NAN
        # still, this could probably be improved:
        return false if (!a.is_a?(Numeric) or a.to_s == "NaN")
      end
      true
    end
1044716
def ok(self):
        
        try:
            coord.Angle(self._value, unit=u.deg)
            return True
        except ValueError:
            return False
1229651
@Override
    public boolean isPrecomputed(InferenceType inferenceType) {
        if (inferenceType.equals(InferenceType.CLASS_HIERARCHY)) {
            return reasoner.isClassified();
        } else {
            return false;
        }
    }
51237
def safe(self,x):
        """"""
        x[np.isinf(x)] = 1
        x[np.isnan(x)] = 1
        return x
561820
def is_final(self):
        
        return (self.is_contiguous and self.fillorder == 1 and
                self.predictor == 1 and not self.is_subsampled)
1258185
def is_inexact(arg):
    '''
    
    '''
    return (is_inexact(mag(arg)) if is_quantity(arg) else
            is_npscalar(u, np.inexact) or is_npvalue(arg, np.inexact))
40701
def _check_bounds(self, v):
        
        below_bounds = v < self._x[0]
        above_bounds = v > self._x[-1]

        if self.bounds_error and below_bounds.any():
            raise ValueError("A value in x_new is below the interpolation "
                "range.")
        if self.bounds_error and above_bounds.any():
            raise ValueError("A value in x_new is above the interpolation "
                "range.")

        return below_bounds, above_bounds
55007
public boolean checkForDangerousProps() {

        final Map<String, String> dangerousProps = new HashMap<>();
        dangerousProps.put("ro.debuggable", "1");
        dangerousProps.put("ro.secure", "0");

        boolean result = false;

        String[] lines = propsReader();

        if (lines == null){
            // Could not read, assume false;
            return false;
        }

        for (String line : lines) {
            for (String key : dangerousProps.keySet()) {
                if (line.contains(key)) {
                    String badValue = dangerousProps.get(key);
                    badValue = "[" + badValue + "]";
                    if (line.contains(badValue)) {
                        QLog.v(key + " = " + badValue + " detected!");
                        result = true;
                    }
                }
            }
        }
        return result;
    }
383341
def confidence_interval_hazard_(self):
        
        return self._compute_confidence_bounds_of_transform(self._hazard, self.alpha, self._ci_labels)
550564
def isuncertainties(arg_list):
    
    for arg in arg_list:
        if isinstance(arg, (list, tuple)) and isinstance(arg[0], uct.UFloat):
            return True
        elif isinstance(arg, np.ndarray) and isinstance(
                np.atleast_1d(arg)[0], uct.UFloat):
            return True
        elif isinstance(arg, (float, uct.UFloat)) and \
                isinstance(arg, uct.UFloat):
            return True
    return False
510478
def is_pre_prepare_time_correct(self, pp: PrePrepare, sender: str) -> bool:
        
        tpcKey = (pp.viewNo, pp.ppSeqNo)

        if (self.last_accepted_pre_prepare_time and
                pp.ppTime < self.last_accepted_pre_prepare_time):
            return False
        elif ((tpcKey not in self.pre_prepare_tss) or
                ((pp, sender) not in self.pre_prepare_tss[tpcKey])):
            return False
        else:
            return (
                abs(pp.ppTime - self.pre_prepare_tss[tpcKey][pp, sender]) <=
                self.config.ACCEPTABLE_DEVIATION_PREPREPARE_SECS
            )
375909
def hazard_units(hazard):
    
    units = definition(hazard)['continuous_hazard_units']
    return sorted(units, key=lambda k: k['key'])