Returns false unless all types in p are unsigned
965101
def is_unsigned(*p):
    
    from symbols.type_ import Type

    try:
        for i in p:
            if not i.type_.is_basic or not Type.is_unsigned(i.type_):
                return False

        return True
    except:
        pass

    return False
698568
def is_valid(cls, arg):
        """"""
        if isinstance(arg, list):
            allInts = allStrings = True
            for elem in arg:
                allInts = allInts and ((elem == 0) or (elem == 1))
                allStrings = allStrings and elem in cls.bitNames

            if allInts or allStrings:
                return True
        return False
694819
def _isint(string):
    
    return type(string) is int or \
           (isinstance(string, _binary_type) or isinstance(string, _text_type)) and \
           _isconvertible(int, string)
1039067
private static boolean isNumericType(Class<?> c) {
    return Number.class.isAssignableFrom(c)
        || double.class == c
        || float.class == c
        || long.class == c
        || int.class == c
        || short.class == c
        || byte.class == c;
  }
803618
private static boolean checkIpv4(byte[] bytes, int pos, int length) {
		int start = pos;
		for (int i = pos; i < length; i++) {
			// assume at least one more symbol is present after dot
			if (i == length - 1 && bytes[i] == '.') {
				return false;
			}
			if (bytes[i] == '.' || i == length - 1) {
				int v;
				if (i - start == 0 && i != length - 1) {
					return false;
				}
				try {
					v = trimAndDecodePositiveInt(bytes, start, i - start);
				} catch (ParseException e) {
					return false;
				}
				if (v < 0 || v > 255) return false;
				start = i + 1;
			}
		}
		return true;
	}
1051697
function isAbstractType(type: GraphQLType): boolean {
  const rawType = getRawType(type);
  return (
    rawType instanceof GraphQLInterfaceType ||
    rawType instanceof GraphQLUnionType
  );
}
278633
private static short unsignedValueOf(byte value) {
        short result;
        if ((value & 0x80) != 0) {
            result = (short) (value & 0x7F);
            result |= 0x80;
        } else {
            result = value;
        }
        return result;
    }
530274
public boolean hasNamedPolicy(String ptype, List<String> params) {
        return model.hasPolicy("p", ptype, params);
    }
1325684
private boolean checkType(int tagid, int tagType, int n) {
    if (TiffTags.hasTag(tagid) && !TiffTags.getTag(tagid).getName().equals("IPTC")) {
      boolean found = false;
      String stagType = TiffTags.getTagTypeName(tagType);
      if (stagType != null) {
        if (stagType.equals("SUBIFD"))
          stagType = "IFD";
        if (stagType.equals("UNDEFINED"))
          stagType = "BYTE";
        for (String vType : TiffTags.getTag(tagid).getType()) {
          String vType2 = vType;
          if (vType2.equals("UNDEFINED"))
            vType2 = "BYTE";
          if (vType2.equals(stagType)) {
            found = true;
          }
        }
      }
      if (!found) {
        validation.addError("Incorrect type for tag " + TiffTags.getTag(tagid).getName(),
            "IFD" + n, stagType);
        return false;
      }
      return true;
    }
    return false;
  }
449336
def is_dynamic(*p):  # TODO: Explain this better
    
    from symbols.type_ import Type

    try:
        for i in p:
            if i.scope == SCOPE.global_ and i.is_basic and \
                    i.type_ != Type.string:
                return False

        return True
    except:
        pass

    return False
869976
def has_type(type, names):
    """"""
    if type.arg in names:
        return type
    for t in type.search('type'): # check all union's member types
        r = has_type(t, names)
        if r is not None:
            return r
    if not hasattr(type, 'i_typedef'):
        return None
    if (type.i_typedef is not None and
        hasattr(type.i_typedef, 'i_is_circular') and
        type.i_typedef.i_is_circular == False):
        t = type.i_typedef.search_one('type')
        if t is not None:
            return has_type(t, names)
    return None
905626
def is_strict_numeric(n: Node) -> bool:
    
    return is_typed_literal(n) and cast(Literal, n).datatype in [XSD.integer, XSD.decimal, XSD.float, XSD.double]
758878
private boolean isSupportedPrimitive(PrimitiveTypeInfo type) {
        switch (type.getPrimitiveCategory()) {
            case VOID:
            case STRING:
            case BOOLEAN:
            case BYTE:
            case SHORT:
            case INT:
            case LONG:
            case FLOAT:
            case DOUBLE:
            case DATE:
            case TIMESTAMP:
                return true;
            default:
                return false;
        }
    }
955734
def _valid_other_type(x, types):
    
    return all(any(isinstance(el, t) for t in types) for el in np.ravel(x))
1002826
public static boolean isSameType(Type s, Type t, VisitorState state) {
    if (s == null || t == null) {
      return false;
    }
    Types types = state.getTypes();
    return types.isSameType(types.erasure(s), types.erasure(t));
  }
494842
def has_valid_padding(value, bits=7):
        """"""

        assert bits <= 8

        mask = (((1 << (8 - bits)) - 1) << bits)

        if isinstance(value, integer_types):
            while value:
                if value & mask:
                    return False
                value >>= 8
        elif isinstance(value, bytes):
            for byte in bytearray(value):
                if byte & mask:
                    return False
        else:
            raise TypeError

        return True
537253
def _convert_unsigned(data, fmt):
    """"""
    num = len(data)
    return struct.unpack(
        "{}{}".format(num, fmt.upper()).encode("utf-8"),
        struct.pack("{}{}".format(num, fmt).encode("utf-8"), *data)
    )