Add default transformations
503132
function es5Plugins(){
    return [
      require('babel-plugin-check-es2015-constants'),
      require('babel-plugin-transform-es2015-arrow-functions'),
      require('babel-plugin-transform-es2015-block-scoped-functions'),
      require('babel-plugin-transform-es2015-block-scoping'),
      require('babel-plugin-transform-es2015-classes'),
      require('babel-plugin-transform-es2015-computed-properties'),
      require('babel-plugin-transform-es2015-destructuring'),
      require('babel-plugin-transform-es2015-duplicate-keys'),
      require('babel-plugin-transform-es2015-for-of'),
      require('babel-plugin-transform-es2015-function-name'),
      require('babel-plugin-transform-es2015-literals'),
      require('babel-plugin-transform-es2015-object-super'),
      require('babel-plugin-transform-es2015-parameters'),
      require('babel-plugin-transform-es2015-shorthand-properties'),
      require('babel-plugin-transform-es2015-spread'),
      require('babel-plugin-transform-es2015-sticky-regex'),
      require('babel-plugin-transform-es2015-template-literals'),
      require('babel-plugin-transform-es2015-typeof-symbol'),
      require('babel-plugin-transform-es2015-unicode-regex'),
      require('babel-plugin-transform-async-to-generator'),
      require('babel-plugin-transform-exponentiation-operator'),
      require('babel-plugin-transform-regenerator')
    ];
  }
1342568
protected void initTransformers() {
		if (jsBlockTrans == null)
			jsBlockTrans = new JSStringTransformer();
		URLStringTransformer anchorTrans = new URLStringTransformer();
		anchorTrans.setJsTransformer(jsBlockTrans);

		transformers = new HashMap<String, StringTransformer>();
		transformers.put("fw", new URLStringTransformer("fw_"));
		transformers.put("if", new URLStringTransformer("if_"));
		transformers.put("cs", new URLStringTransformer("cs_"));
		transformers.put("js", new URLStringTransformer("js_"));
		transformers.put("im", new URLStringTransformer("im_"));
		transformers.put("oe", new URLStringTransformer("oe_"));
		transformers.put("an", anchorTrans);
		transformers.put("jb", jsBlockTrans);
		transformers.put("ci", new InlineCSSStringTransformer());
		transformers.put("mt", new MetaRefreshUrlStringTransformer());
		transformers.put("ss", new SrcsetStringTransformer());
		transformers.put("in", new RegexReplaceStringTransformer("^.*$", ""));
		
		if (customTransformers != null) {
			transformers.putAll(customTransformers);
			customTransformers = null;
		}
	}
716376
def add_defaults_to_kwargs(defaults, **kwargs):
    
    defaults = dict(defaults)
    defaults.update(kwargs)
    return defaults
1374021
def add_on_cpu(self, transforms):
        """"""
        if not isinstance(transforms, list):
            transforms = [transforms]
        self.cpu_transforms.extend(transforms or [])
        return self
516225
function contoursTransform(contours, transforms) {
    if (!contours || !contours.length || !transforms || !transforms.length) {
        return contours;
    }

    contours.forEach(function (p) {
        for (var i = 0, l = transforms.length; i < l; i++) {
            var transform = transforms[i];
            var params = transform.params;
            switch (transform.name) {
                case 'translate':
                    pathAdjust(p, 1, 1, params[0], params[1]);
                    break;
                case 'scale':
                    pathAdjust(p, params[0], params[1]);
                    break;
                case 'matrix':
                    pathTransform(p, params[0], params[1], params[2], params[3], params[4], params[5]);
                    break;
            }
        }
    });

    return contours;
}
253407
function transformDefaultClassExports(content) {
  return content.replace(/^(\s*)export default (abstract )?class ([\w]+)/mg, function(m0, m1, m2, m3) {
    return m1 + 'export { ' + m3 + ' as default, ' + m3 + ' };\n' +
      m1 + (m2 || '') + 'class ' + m3
  })
}
1072963
function _cloneTransforms(transforms) {
	// Clone the object itself
	transforms = extendObject({}, transforms);
	// Clone the object's masks array
	transforms.masks = transforms.masks.slice(0);
	return transforms;
}
419842
public ParallelTransformation addTransformations(Transformation<?, ?>... transformations)
	{
		for (Transformation<?, ?> transformation : transformations)
		{
			duration = Math.max(duration, transformation.totalDuration());
			listTransformations.add(transformation);
		}

		return this;
	}
552906
public function setUpDispatcherDefaults()
    {
        // Set the defaults for the dispatcher
        $this->dispatcher->setDefaultTask('Danzabar\CLI\Tasks\Utility\Help');
        $this->dispatcher->setDefaultAction('main');

        // Set no suffixes
        $this->dispatcher->setTaskSuffix('');
        $this->dispatcher->setActionSuffix('');
    }
1178777
def install_default_formatters(self):
        
        self.add_simple_formatter('b', '<strong>%(value)s</strong>')
        self.add_simple_formatter('i', '<em>%(value)s</em>')
        self.add_simple_formatter('u', '<u>%(value)s</u>')
        self.add_simple_formatter('s', '<strike>%(value)s</strike>')
        self.add_simple_formatter('hr', '<hr />', standalone=True)
        self.add_simple_formatter('sub', '<sub>%(value)s</sub>')
        self.add_simple_formatter('sup', '<sup>%(value)s</sup>')

        def _render_list(name, value, options, parent, context):
            list_type = options['list'] if (options and 'list' in options) else '*'
            css_opts = {
                '1': 'decimal', '01': 'decimal-leading-zero',
                'a': 'lower-alpha', 'A': 'upper-alpha',
                'i': 'lower-roman', 'I': 'upper-roman',
            }
            tag = 'ol' if list_type in css_opts else 'ul'
            css = ' style="list-style-type:%s;"' % css_opts[list_type] if list_type in css_opts else ''
            return '<%s%s>%s</%s>' % (tag, css, value, tag)
        self.add_formatter('list', _render_list, transform_newlines=False, strip=True, swallow_trailing_newline=True)

        # Make sure transform_newlines = False for [*], so [code] tags can be embedded without transformation.
        def _render_list_item(name, value, options, parent, context):
            if not parent or parent.tag_name != 'list':
                return '[*]%s<br />' % value

            return '<li>%s</li>' % value
        self.add_formatter('*', _render_list_item, newline_closes=True, transform_newlines=False,
            same_tag_closes=True, strip=True)

        self.add_simple_formatter('quote', '<blockquote>%(value)s</blockquote>', strip=True,
            swallow_trailing_newline=True)
        self.add_simple_formatter('code', '<code>%(value)s</code>', render_embedded=False, transform_newlines=False,
            swallow_trailing_newline=True, replace_cosmetic=False)
        self.add_simple_formatter('center', '<div style="text-align:center;">%(value)s</div>')

        def _render_color(name, value, options, parent, context):
            if 'color' in options:
                color = options['color'].strip()
            elif options:
                color = list(options.keys())[0].strip()
            else:
                return value
            match = re.match(r'^([a-z]+)|^(#[a-f0-9]{3,6})', color, re.I)
            color = match.group() if match else 'inherit'
            return '<span style="color:%(color)s;">%(value)s</span>' % {
                'color': color,
                'value': value,
            }
        self.add_formatter('color', _render_color)

        def _render_url(name, value, options, parent, context):
            if options and 'url' in options:
                # Option values are not escaped for HTML output.
                href = self._replace(options['url'], self.REPLACE_ESCAPE)
            else:
                href = value
            # Completely ignore javascript: and data: "links".
            if re.sub(r'[^a-z0-9+]', '', href.lower().split(':', 1)[0]) in ('javascript', 'data', 'vbscript'):
                return ''
            # Only add the missing http:// if it looks like it starts with a domain name.
            if '://' not in href and _domain_re.match(href):
                href = 'http://' + href
            return self.url_template.format(href=href.replace('"', '%22'), text=value)
        self.add_formatter('url', _render_url, replace_links=False, replace_cosmetic=False)
956015
protected void setUpTransform(SingularValueDecomposition svd)
    {
        Vec diag = new DenseVector(dimensions);
        
        double[] s = svd.getSingularValues();
        
        for(int i = 0; i < dimensions; i++)
            diag.set(i, 1.0/Math.sqrt(s[i]+regularization));
        
        transform = new SubMatrix(svd.getU().transpose(), 0, 0, dimensions, s.length).clone();
        
        Matrix.diagMult(diag, transform);
    }
1144324
private void addFileToTransform(Map<Transformer,Map<String,Set<URI>>> gs, Transformer t, Source s) {
        Map<String,Set<URI>> fs = gs.get(t);
        if (fs == null) {
            fs = new HashMap<String,Set<URI>>();
            gs.put(t, fs);
        }
        Set<URI> ss = fs.get(s.pkg().name());
        if (ss == null) {
            ss = new HashSet<URI>();
            fs.put(s.pkg().name(), ss);
        }
        ss.add(s.file().toURI());
    }
252782
def transform(self, attrs):
        """"""
        self.collect(attrs)
        self.add_missing_implementations()
        self.fill_attrs(attrs)
697323
def recalc_transforms(self, trcat=None):
        
        if trcat is None:
            trcat = self.trcat

        self.tform = {
            'window_to_native': trcat.WindowNativeTransform(self),
            'cartesian_to_window': trcat.CartesianWindowTransform(self),
            'cartesian_to_native': (trcat.RotationTransform(self) +
                                    trcat.CartesianNativeTransform(self)),
            'data_to_cartesian': (trcat.DataCartesianTransform(self) +
                                  trcat.ScaleTransform(self)),
            'data_to_scrollbar': (trcat.DataCartesianTransform(self) +
                                  trcat.RotationTransform(self)),
            'data_to_window': (trcat.DataCartesianTransform(self) +
                               trcat.ScaleTransform(self) +
                               trcat.RotationTransform(self) +
                               trcat.CartesianWindowTransform(self)),
            'data_to_percentage': (trcat.DataCartesianTransform(self) +
                                   trcat.ScaleTransform(self) +
                                   trcat.RotationTransform(self) +
                                   trcat.CartesianWindowTransform(self) +
                                   trcat.WindowPercentageTransform(self)),
            'data_to_native': (trcat.DataCartesianTransform(self) +
                               trcat.ScaleTransform(self) +
                               trcat.RotationTransform(self) +
                               trcat.CartesianNativeTransform(self)),
            'wcs_to_data': trcat.WCSDataTransform(self),
            'wcs_to_native': (trcat.WCSDataTransform(self) +
                              trcat.DataCartesianTransform(self) +
                              trcat.ScaleTransform(self) +
                              trcat.RotationTransform(self) +
                              trcat.CartesianNativeTransform(self)),
        }
24567
function addDefaultProps (props, mixinDefaultProps) {
  if (mixinDefaultProps) {
    for (let key in mixinDefaultProps) {
      if (props[key] === undefined) {
        props[key] = mixinDefaultProps[key];
      }
    } 
  }
}
700449
function() {
            var self            = this,
                transformName   = '',
                effectsIn       = self.config.animation.effectsIn || self.config.animation.effects,
                effectsOut      = self.config.animation.effectsOut || self.config.animation.effects;

            self.callActions('beforeParseEffects', arguments);

            self.effectsIn      = new mixitup.StyleData();
            self.effectsOut     = new mixitup.StyleData();
            self.transformIn    = [];
            self.transformOut   = [];

            self.effectsIn.opacity = self.effectsOut.opacity = 1;

            self.parseEffect('fade', effectsIn, self.effectsIn, self.transformIn);
            self.parseEffect('fade', effectsOut, self.effectsOut, self.transformOut, true);

            for (transformName in mixitup.transformDefaults) {
                if (!(mixitup.transformDefaults[transformName] instanceof mixitup.TransformData)) {
                    continue;
                }

                self.parseEffect(transformName, effectsIn, self.effectsIn, self.transformIn);
                self.parseEffect(transformName, effectsOut, self.effectsOut, self.transformOut, true);
            }

            self.parseEffect('stagger', effectsIn, self.effectsIn, self.transformIn);
            self.parseEffect('stagger', effectsOut, self.effectsOut, self.transformOut, true);

            self.callActions('afterParseEffects', arguments);
        }
261159
function runTransforms(transforms, upgradeFile, ref, data, locals) {
  log('debug', `Running ${transforms.length} transforms`);
  return bluebird.reduce(transforms, function (acc, val) {
    var key = val.toString();

    // Parsefloat strips decimals with `.0` leaving just the int,
    // let's add them back in
    if (!_.includes(key, '.')) {
      key += '.0';
    }

    return bluebird.try(upgradeFile[key].bind(null, ref, acc, locals))
      .catch(e => {
        log('error', `Error upgrading ${ref} to version ${key}: ${e.message}`, {
          errStack: e.stack,
          cmptData: JSON.stringify(acc)
        });
        return bluebird.reject(e);
      });
  }, data)
    .then(function (resp) {
      // Assign the version number automatically
      resp._version = transforms[transforms.length - 1];
      return resp;
    });
}