Transform all raba object into pupas
965656
def pupatizeElements(self) :
		""""""
		for i in range(len(self)) :
			self[i] = self[i].pupa()
1125604
def _xls2shape(self):
        """"""

        sheets = self.workbook.sheets()
        nrows = 1
        ncols = 1
        for sheet in sheets:
            nrows = max(nrows, sheet.nrows)
            ncols = max(ncols, sheet.ncols)
        ntabs = len(sheets)

        self.code_array.shape = nrows, ncols, ntabs
1093729
def cleanup(arg):
    """"""
    arg = numpy.asarray(arg)
    if len(arg.shape) <= 1:
        arg = arg.reshape(arg.size, 1)
    elif len(arg.shape) > 2:
        raise ValueError("shapes must be smaller than 3")
    return arg
1092
def transform(self, m):
        """"""
        if not len(m) == 6:
            raise ValueError("bad sequ. length")
        self.x0, self.y0, self.x1, self.y1 = TOOLS._transform_rect(self, m)
        return self
1257925
def iu1transform(self, zeta):
        """"""
        x = real(zeta)
        y = imag(zeta)
        z = x*self.radius.real + y*self.radius.imag
        return self.rot_matrix*z + self.center
560419
def convert(self, blob, size=500):
        """"""
        file_list = []
        with make_temp_file(blob) as in_fn, make_temp_file() as out_fn:
            try:
                subprocess.check_call(["pdftoppm", "-jpeg", in_fn, out_fn])
                file_list = sorted(glob.glob(f"{out_fn}-*.jpg"))

                converted_images = []
                for fn in file_list:
                    converted = resize(open(fn, "rb").read(), size, size)
                    converted_images.append(converted)

                return converted_images
            except Exception as e:
                raise ConversionError("pdftoppm failed") from e
            finally:
                for fn in file_list:
                    try:
                        os.remove(fn)
                    except OSError:
                        pass
252782
def transform(self, attrs):
        """"""
        self.collect(attrs)
        self.add_missing_implementations()
        self.fill_attrs(attrs)
1209095
function _transformShape(canvas, ctx, params, width, height) {

	// Get conversion factor for radians
	params._toRad = (params.inDegrees ? (PI / 180) : 1);

	params._transformed = true;
	ctx.save();

	// Optionally measure (x, y) position from top-left corner
	if (!params.fromCenter && !params._centered && width !== undefined) {
		// Always draw from center unless otherwise specified
		if (height === undefined) {
			height = width;
		}
		params.x += width / 2;
		params.y += height / 2;
		params._centered = true;
	}
	// Optionally rotate shape
	if (params.rotate) {
		_rotateCanvas(ctx, params, null);
	}
	// Optionally scale shape
	if (params.scale !== 1 || params.scaleX !== 1 || params.scaleY !== 1) {
		_scaleCanvas(ctx, params, null);
	}
	// Optionally translate shape
	if (params.translate || params.translateX || params.translateY) {
		_translateCanvas(ctx, params, null);
	}

}
1091209
function transform( obj ) {
	var keys;
	var out;
	var i;
	if ( !isObject( obj ) ) {
		throw new TypeError( 'invalid input argument. Must provide an object. Value: `' + obj + '`.' );
	}
	keys = getKeys( obj );
	out = new Array( keys.length );
	for ( i = 0; i < keys.length; i++ ) {
		out[ i ] = obj[ keys[i] ];
	}
	return out;
}
33660
def from_sds(var, *args, **kwargs):
    """"""
    var.__dict__['dtype'] = HTYPE_TO_DTYPE[var.info()[3]]
    shape = var.info()[2]
    var.__dict__['shape'] = shape if isinstance(shape, (tuple, list)) else tuple(shape)
    return da.from_array(var, *args, **kwargs)
714457
def make_all(collector, **kwargs):
    """"""
    configuration = collector.configuration
    push = configuration["harpoon"].do_push
    only_pushable = configuration["harpoon"].only_pushable
    if push:
        only_pushable = True

    tag = kwargs.get("artifact", NotSpecified)
    if tag is NotSpecified:
        tag = configuration["harpoon"].tag

    images = configuration["images"]
    for layer in Builder().layered(images, only_pushable=only_pushable):
        for _, image in layer:
            if tag is not NotSpecified:
                image.tag = tag
            Builder().make_image(image, images, ignore_deps=True, ignore_parent=True)
            print("Created image {0}".format(image.image_name))
            if push and image.image_index:
                Syncer().push(image)
441154
def to_protobuf(self):
        """"""
        self._validate()
        kwargs = {k: _convert(getattr(self, k), 'to_protobuf')
                  for k in self._get_params()}
        return self._protobuf_cls(**kwargs)
1166601
function morph(object, newProperties) {
  for (let key in object) {
    delete object[key];
  }

  for (let key in newProperties) {
    object[key] = newProperties[key];
  }
}
305081
def rotmat(alpha):
    
    R = np.array(((np.cos(alpha), -np.sin(alpha)),
                 (np.sin(alpha), np.cos(alpha))))

    return R
1322098
def _deep_copy_contours(self, ufo, parent, component, transformation):
        """"""

        for nested in component.components:
            self._deep_copy_contours(
                ufo,
                parent,
                ufo[nested.baseGlyph],
                transformation.transform(nested.transformation),
            )

        if component != parent:
            pen = TransformPen(parent.getPen(), transformation)

            # if the transformation has a negative determinant, it will reverse
            # the contour direction of the component
            xx, xy, yx, yy = transformation[:4]
            if xx * yy - xy * yx < 0:
                pen = ReverseContourPen(pen)

            component.draw(pen)
904306
def doblob(morphed, blobdet, img, anno=True):
    
    keypoints = blobdet.detect(morphed)
    nkey = len(keypoints)
    kpsize = asarray([k.size for k in keypoints])
    final = img.copy()  # is the .copy necessary?

    final = cv2.drawKeypoints(img, keypoints, outImage=final,
                              flags=cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)
# %% plot count of blobs
    if anno:
        cv2.putText(final, text=str(nkey), org=(int(img.shape[1]*.9), 25),
                    fontFace=cv2.FONT_HERSHEY_PLAIN, fontScale=2,
                    color=(0, 255, 0), thickness=2)

    return final, nkey, kpsize
966539
def transform_fugou(pl, pi, sou, dou, pro, da)
      ret = { "piece" => pi }
      if pl["same"]
        ret["same"] = true
      else
        ret["to"] = pl
      end
      ret["promote"] = (pro == "成") if pro
      if da
        ret["relative"] = "H"
      else
        rel = soutai2relative(sou) + dousa2relative(dou)
        ret["relative"] = rel unless rel.empty?
      end
      ret
    end