Patches a bundle with a delta.
503998
function patchBundle(bundle: Bundle, delta: DeltaBundle): Bundle {
  const map = new Map(bundle.modules);

  for (const [key, value] of delta.modified) {
    map.set(key, value);
  }

  for (const [key, value] of delta.added) {
    map.set(key, value);
  }

  for (const key of delta.deleted) {
    map.delete(key);
  }

  const modules = Array.from(map.entries());

  return {
    pre: bundle.pre,
    post: bundle.post,
    modules,
  };
}
960254
def patch(cls):
        
        orig = distutils.core.Distribution
        distutils.core.Distribution = cls
        try:
            yield
        finally:
            distutils.core.Distribution = orig
262642
function bundleJsFiles () {
  return concat(jsFiles)
    .then((output) => {
      const uglified = UglifyJS.minify(output)
      if (uglified.error) {
        throw new Error(uglified.error)
      }
      return uglified.code
    })
}
1153911
def patched(f):
    """"""

    def wrapped(*args, **kwargs):

        kwargs['return_response'] = False
        kwargs['prefetch'] = True

        return f(*args, **kwargs)

    return wrapped
1294194
def wye_to_delta(z1,z2,z3):
    """"""
    summand = z1*z2 + z2*z3 + z3*z1
    return (summand/z2,summand/z1,summand/z3)
670165
def merge(self, resolvable, packages, parent=None):
    """"""
    self.__tuples.append(_ResolvedPackages(resolvable, OrderedSet(packages),
                                           parent, resolvable.is_constraint))
    self._check()
499637
function rebundle (file) {
    var stream = bundler.bundle();
    if (file) {
      console.log('[gulp]', chalk.cyan('[watchify] rebundled due to:'), chalk.green(file));
    }

    console.log('[gulp]', chalk.cyan('[watchify] assets'), chalk.red('building'));
    stream
      .on('error', handleError('Browserify'))
      .pipe(source('isomorphic.js'))
      .pipe(buffer())
      .pipe(replace('{{ISOMORPHIC_ENV}}', args.name))
      .pipe(gulpIf(args.uglify, uglify()))
      .pipe(gulp.dest('./public')).on("end", function () {
        console.log('[gulp]', chalk.cyan('[watchify] assets'), chalk.green('complete'));
      });
  }
1215210
def cleanup_bundle():
    
    paths = ['./vendored', './bundle.zip']
    for path in paths:
        if os.path.exists(path):
            log.debug("Deleting %s..." % path)
            if os.path.isdir(path):
                shutil.rmtree(path)
            else:
                os.remove(path)
825682
def patchCurses(self):
        
        if (sys.version_info)[:3] == (3, 4, 0):
            self.addchar = lambda y, x, *args: self.win.addch(x, y, *args)
        else:
            self.addchar = self.win.addch
398931
public void update(int delta) {
		if ((sprite == null) && (defaultImageName != null)) {
			loadSystemParticleImage();
		}
		
		removeMe.clear();
		ArrayList emitters = new ArrayList(this.emitters);
		for (int i=0;i<emitters.size();i++) {
			ParticleEmitter emitter = (ParticleEmitter) emitters.get(i);
			if (emitter.isEnabled()) {
				emitter.update(this, delta);
				if (removeCompletedEmitters) {
					if (emitter.completed()) {
						removeMe.add(emitter);
						particlesByEmitter.remove(emitter);
					}
				}
			}
		}
		this.emitters.removeAll(removeMe);
		
		pCount = 0;
		
		if (!particlesByEmitter.isEmpty())
		{
			Iterator it= particlesByEmitter.keySet().iterator();
			while (it.hasNext())
			{
				ParticleEmitter emitter = (ParticleEmitter) it.next();
				if (emitter.isEnabled()) {
					ParticlePool pool = (ParticlePool) particlesByEmitter.get(emitter);
					for (int i=0;i<pool.particles.length;i++) {
						if (pool.particles[i].life > 0) {
							pool.particles[i].update(delta);
							pCount++;
						}
					}
				}
			}
		}
	}
1081175
void setupBundles() {

        Locale oldLocale;

        synchronized (BundleHandler.class) {
            oldLocale = BundleHandler.getLocale();

            BundleHandler.setLocale(Locale.getDefault());

            hnd_column_remarks =
                BundleHandler.getBundleHandle("column-remarks", null);
            hnd_table_remarks = BundleHandler.getBundleHandle("table-remarks",
                    null);

            BundleHandler.setLocale(oldLocale);
        }
    }
830914
function updateAllPackages(rootPkgPath, packagesPath) {
  const paths = findPackages(packagesPath);

  return paths.reduce((promise, pkgPath) => promise.then(() => updateSinglePackage(rootPkgPath, pkgPath)), Promise.resolve());
}
1370824
public static void delta(int[] data) {
                for (int i = data.length - 1; i > 0; --i) {
                        data[i] -= data[i - 1];
                }
        }
1156557
def default_bundle_config():
    """"""

    import os
    from ambry.util import AttrDict

    config = AttrDict()
    f = os.path.join(
        os.path.dirname(
            os.path.realpath(__file__)),
        'bundle.yaml')

    config.update_yaml(f)

    return config
857835
public void updateMorphTime(float delta) {
		offset += delta;
		if (offset < 0) {
			int index = shapes.indexOf(current);
			if (index < 0) {
				index = shapes.size() - 1;
			}
			
			int nframe = rational(index+1);
			setFrame(index, nframe, offset);
			offset += 1;
		} else if (offset > 1) {
			int index = shapes.indexOf(next);
			if (index < 1) {
				index = 0;
			}
			
			int nframe = rational(index+1);
			setFrame(index, nframe, offset);
			offset -= 1;
		} else {
			pointsDirty = true;
		}
	}
375224
def bundle(context, yes, bundle_name):
    """"""
    bundle_obj = context.obj['store'].bundle(bundle_name)
    if bundle_obj is None:
        click.echo(click.style('bundle not found', fg='red'))
        context.abort()
    version_obj = bundle_obj.versions[0]
    if version_obj.included_at:
        question = f"remove bundle version from file system and database: {version_obj.full_path}"
    else:
        question = f"remove bundle version from database: {version_obj.created_at.date()}"
    if yes or click.confirm(question):
        if version_obj.included_at:
            shutil.rmtree(version_obj.full_path, ignore_errors=True)
        version_obj.delete()
        context.obj['store'].commit()
        click.echo(f"version deleted: {version_obj.full_path}")
133047
function (done) {
      var p = clone(pkg);
      delete p.devDependencies;
      var content = JSON.stringify(p, null, 2);
      write_if_not_exists('package.json', content, done);
    }