How to use descarteslabs - 10 common examples

To help you get started, we’ve selected a few descarteslabs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github descarteslabs / descarteslabs-python / descarteslabs / client / services / metadata / smoke_tests / test_metadata.py View on Github external
def test_derived_bands_get(self):
        band_id = "derived:ndvi"
        try:
            d_band = self.instance.get_derived_band(band_id)
            assert "bands" in d_band
        except NotFoundError:
            pass
github descarteslabs / descarteslabs-python / descarteslabs / workflows / types / primitives / string.py View on Github external
    @typecheck_promote(sep=lambda: (Str, NoneType), maxsplit=Int)
    def split(self, sep=None, maxsplit=-1):
        """
        Return a ``List[Str]`` of the words in the string, using sep as the delimiter string.

          sep
            The delimiter according which to split the string.
            None (the default value) means split according to any whitespace,
            and discard empty strings from the result.
          maxsplit
            Maximum number of splits to do.
            -1 (the default value) means no limit.
        """
        from ..containers import List

        return List[Str]._from_apply("Str.split", self, sep=sep, maxsplit=maxsplit)
github descarteslabs / descarteslabs-python / descarteslabs / workflows / types / math / arithmetic.py View on Github external
@typecheck_promote(
    (Int, Float, Image, ImageCollection), (Int, Float, Image, ImageCollection)
)
def arctan2(y, x):
    """
    Element-wise arc tangent of ``y/x`` choosing the quadrant correctly.

    The quadrant (i.e., branch) is chosen so that ``arctan2(y, x)`` is
    the signed angle in radians between the ray ending at the origin and
    passing through the point (1,0), and the ray ending at the origin and
    passing through the point (x, y).  (Note the role reversal: the
    "y-coordinate" is the first function parameter, the "x-coordinate"
    is the second.)  By IEEE convention, this function is defined for
    x = +/-0 and for either or both of y and x = +/-inf (see
    Notes for specific values).

    Parameters
github descarteslabs / descarteslabs-python / descarteslabs / workflows / types / geospatial / image.py View on Github external
    @typecheck_promote((lambda: Image, lambda: _DelayedImageCollection(), Int, Float))
    def __lt__(self, other):
        return _result_type(other)._from_apply("lt", self, other)
github descarteslabs / descarteslabs-python / descarteslabs / workflows / types / geospatial / image.py View on Github external
    @typecheck_promote((lambda: Image, lambda: _DelayedImageCollection(), Int, Float))
    def __rpow__(self, other):
        return _result_type(other)._from_apply("pow", other, self)
github descarteslabs / descarteslabs-python / descarteslabs / workflows / types / datetimes / datetime_.py View on Github external
    @typecheck_promote(lambda: Datetime)
    def __ne__(self, other):
        return Bool._from_apply("ne", self, other)
github descarteslabs / descarteslabs-python / descarteslabs / workflows / types / primitives / number.py View on Github external
    @typecheck_promote(lambda: (Int, Float))
    def __sub__(self, other):
        return _binop_result(self, other)._from_apply("sub", self, other)
github descarteslabs / descarteslabs-python / descarteslabs / workflows / types / primitives / string.py View on Github external
    @typecheck_promote(chars=lambda: (Str, NoneType))
    def lstrip(self, chars=None):
        """
        Return a copy of the string with leading whitespace removed.

        If chars is given and not None, remove characters in chars instead.
        """
        return self._from_apply("Str.lstrip", self, chars)
github descarteslabs / descarteslabs-python / descarteslabs / workflows / types / primitives / number.py View on Github external
    @typecheck_promote(lambda: (Int, Float))
    def __le__(self, other):
        return Bool._from_apply("le", self, other)
github descarteslabs / descarteslabs-python / descarteslabs / workflows / types / primitives / string.py View on Github external
    @typecheck_promote(lambda: Str)
    def __eq__(self, other):
        return Bool._from_apply("eq", self, other)