Returns compiled update function
190522
def compiled_update_func(self):
        """"""

        def get_not_none_col_assignment(column_name):
            return ALCHEMY_TEMPLATES.not_none_col_assignment.safe_substitute(col_name=column_name)

        def get_compiled_args(arg_name):
            return ALCHEMY_TEMPLATES.func_arg.safe_substitute(arg_name=arg_name)

        join_string = "\n" + self.tab + self.tab
        columns = [n for n in self.columns if n not in self.primary_keys]
        not_none_col_assignments = join_string.join([get_not_none_col_assignment(n) for n in columns])
        update_args = ", ".join(get_compiled_args(n) for n in columns)
        return ALCHEMY_TEMPLATES.update_function.safe_substitute(not_none_col_assignments=not_none_col_assignments,
                                                                 update_args=update_args,
                                                                 class_name=self.class_name)
1145346
function webpackGetCodeOnDone (compiler, done) {
	if (!(compiler instanceof Compiler)) {
		throw new Error(`Expected compiler to be an instance of 'Compiler'`)
	}

	const outputFs = compiler.outputFileSystem
	const outputPath = compiler.outputPath

	installSourceMapSupport(outputFs)

	let compiledCode
	let error = false

	compiler.plugin('done', stats => {
		error = false
		// Server compilation errors need to be propagated to the client.
		if (stats.compilation.errors.length) {
			error = stats.compilation.errors[0]
			return
		}
		const filename = getFilename(stats, outputPath, 'main')
		const buffer = outputFs.readFileSync(filename)

		try {
			compiledCode = getCompiled(filename, buffer)
		} catch (ex) {
			error = ex
		}

		if (compiledCode) {
			done(compiledCode)
		} else {
			throw new Error(
				`webpack-get-code-on-done: Compiled code is 'undefined'. Please check latest changes that may produced this error. ${error}`
			)
		}
	})
}
862053
function softwareUpdate() {
  this._controller = null;
  this._wizard = null;

  this._aus = Cc["@mozilla.org/updates/update-service;1"].
              getService(Ci.nsIApplicationUpdateService);
  this._ums = Cc["@mozilla.org/updates/update-manager;1"].
              getService(Ci.nsIUpdateManager);
  this._vc = Cc["@mozilla.org/xpcom/version-comparator;1"].
             getService(Ci.nsIVersionComparator);
}
1019552
def _POTUpdateBuilder(env, **kw):
    
    import SCons.Action
    from SCons.Tool.GettextCommon import _POTargetFactory
    kw['action'] = SCons.Action.Action(_update_pot_file, None)
    kw['suffix'] = '$POTSUFFIX'
    kw['target_factory'] = _POTargetFactory(env, alias='$POTUPDATE_ALIAS').File
    kw['emitter'] = _pot_update_emitter
    return _POTBuilder(**kw)
88328
function compile(patch) {
  var code = "";
  patch.forEach(function(op) {
    var o = "";
    switch (op.op) {
      case "remove":
        o += "delete " + pathToStatement(op.path);
        break;
      case "add":
        o += pathToStatement(op.path) + " = " + JSON.stringify(op.value);
        break;
      case "replace":
        o += pathToStatement(op.path) + " = " + JSON.stringify(op.value);
        break;
      case "move":
        var from = pathToStatement(op.from);
        o += pathToStatement(op.path) + " = " + from + ";\n";
        o += "delete " + from;
        break;
      case "copy":
        o += pathToStatement(op.path) + " = " + from;
        break;
      case "test":
        o +=
          "if (!oo.equal(" +
          pathToStatement(op.path) +
          ", " +
          JSON.stringify(op.value) +
          ") throw new Error()";
        break;
    }
    code += o + ";\n";
  });
  return code;
}
658036
void update()
    {
        mx = x - oldX;
        my = y - oldY;
        oldX = x;
        oldY = y;
    }
450276
function compile(func) {
  return function() {
    return '(' + func.toString() + ')(' +
      utils.map(arguments, JSON.stringify).join(', ') + ');';
  }
}
505573
def cache_results(function):
    """"""
    def save_to_permacache():
        """Save the in-memory cache data to the permacache.

        There is a race condition here between two processes updating at the
        same time. It's perfectly acceptable to lose and/or corrupt the
        permacache information as each process's in-memory cache will remain
        in-tact.

        """
        update_from_permacache()
        try:
            with open(filename, 'wb') as fp:
                pickle.dump(cache, fp, pickle.HIGHEST_PROTOCOL)
        except IOError:
            pass  # Ignore permacache saving exceptions

    def update_from_permacache():
        """Attempt to update newer items from the permacache."""
        try:
            with open(filename, 'rb') as fp:
                permacache = pickle.load(fp)
        except Exception:  # TODO: Handle specific exceptions
            return  # It's okay if it cannot load
        for key, value in permacache.items():
            if key not in cache or value[0] > cache[key][0]:
                cache[key] = value

    cache = {}
    cache_expire_time = 3600
    try:
        filename = os.path.join(gettempdir(), 'update_checker_cache.pkl')
        update_from_permacache()
    except NotImplementedError:
        filename = None

    @wraps(function)
    def wrapped(obj, package_name, package_version, **extra_data):
        """Return cached results if available."""
        now = time.time()
        key = (package_name, package_version)
        if not obj.bypass_cache and key in cache:  # Check the in-memory cache
            cache_time, retval = cache[key]
            if now - cache_time < cache_expire_time:
                return retval
        retval = function(obj, package_name, package_version, **extra_data)
        cache[key] = now, retval
        if filename:
            save_to_permacache()
        return retval
    return wrapped
1137625
function upToDate (imPath, type) {
          return readFile(imPath)
            .then(getChecksum)
            .then(function (sum) {
              var key = imPath + type
              var isUpToDate = cachedState[key] === sum
              cachedState[key] = sum
              return isUpToDate
            })
        }
358465
def update_cache(func):
    
    @wraps(func)
    def wrapper(self, *args, **kwargs):
        """The wrapper function."""
        lazy = kwargs.get('lazy', False)
        kwargs.pop('lazy', None)

        if not lazy:
            self.get_json()

        ret = func(self, *args, **kwargs)

        # If returning a string assume it is an update message
        if isinstance(ret, str) and not lazy:
            self.set_json(ret)
        else:
            return ret

    return wrapper
1191422
def update(self, func, **kw):
        ""
        func.__name__ = self.name
        func.__doc__ = getattr(self, 'doc', None)
        func.__dict__ = getattr(self, 'dict', {})
        func.__defaults__ = getattr(self, 'defaults', ())
        func.__kwdefaults__ = getattr(self, 'kwonlydefaults', None)
        func.__annotations__ = getattr(self, 'annotations', None)
        callermodule = sys._getframe(3).f_globals.get('__name__', '?')
        func.__module__ = getattr(self, 'module', callermodule)
        func.__dict__.update(kw)
853552
def _update_expression(self):
        ''''''
        self._expression = re.compile(
            '^{0}(?P<index>(?P<padding>0*)\d+?){1}$'
            .format(re.escape(self.head), re.escape(self.tail))
        )
500631
function getUpdates() {
		return _client.method('WaitForUpdatesEx', {
			_this: _client._updatesCollector,
			version: _client._updatesVersion,
			options: {
				maxWaitSeconds: 0
			}
		})
		.then(function(set) {
			if (set) {

				// update the version
				_client._updatesVersion = set.version;
				
				// get only the updates
				var updates   = [];
				var filterSet = _.get(set, 'filterSet');
				filterSet     = Array.isArray(filterSet) ? filterSet : [filterSet];
				
				// loop through the filter sets
				_.forEach(filterSet, function(f) {
					
					var objectSet = _.get(f, 'objectSet');
					objectSet     = Array.isArray(objectSet) ? objectSet : [objectSet];
					
					// format the objects
					_.forEach(objectSet, function(u) {
						u.obj = {
							type: _.get(u, 'obj.attributes.type'),
							id: _.get(u, 'obj.$value')
						};
						
						// make the change set an array
						u.changeSet = Array.isArray(u.changeSet) ? u.changeSet : [u.changeSet];
						
						// update change set
						_.forEach(u.changeSet, function(c) {
							c.val = _.get(c, 'val.$value');
						});
						
						// push the update
						updates.push(u);
					});
				});

				// emit the results
				_client.emit('updates', updates);
			}
		});
	}
17035
def update_wrapper(wrapper,
                   wrapped,
                   assigned = functools.WRAPPER_ASSIGNMENTS,
                   updated = functools.WRAPPER_UPDATES):
    
    # workaround for http://bugs.python.org/issue3445
    assigned = tuple(attr for attr in assigned if hasattr(wrapped, attr))
    wrapper = functools.update_wrapper(wrapper, wrapped, assigned, updated)
    # workaround for https://bugs.python.org/issue17482
    wrapper.__wrapped__ = wrapped
    return wrapper
579090
function generateOutput(source) {
    return __awaiter(this, void 0, void 0, function () {
        var isCached, artifact, compiled, artifact, _a;
        return __generator(this, function (_b) {
            switch (_b.label) {
                case 0: return [4 /*yield*/, caching.has(source.codeHash)];
                case 1:
                    isCached = _b.sent();
                    if (!isCached) return [3 /*break*/, 3];
                    return [4 /*yield*/, caching.get(source.codeHash)];
                case 2:
                    artifact = _b.sent();
                    return [2 /*return*/, artifact];
                case 3: return [4 /*yield*/, solc_install_1.installVersion(source.solcVersion)];
                case 4:
                    _b.sent();
                    return [4 /*yield*/, compile_1.default(source)];
                case 5:
                    compiled = _b.sent();
                    _a = {
                        compiled: compiled
                    };
                    return [4 /*yield*/, output_files_1.createJavascriptFile(source, compiled)];
                case 6:
                    _a.javascript = _b.sent();
                    return [4 /*yield*/, output_files_1.createTypescriptFile(source, compiled)];
                case 7:
                    artifact = (_a.typescript = _b.sent(),
                        _a);
                    return [4 /*yield*/, caching.set(source.codeHash, artifact)];
                case 8:
                    _b.sent();
                    return [2 /*return*/, artifact];
            }
        });
    });
}
251699
private function getUpdateChangeSetHandler()
    {
        return function ($key, $value, $obj) {
            $op = '$set';
            if (null === $value) {
                $op = '$unset';
                $value = 1;
            }
            $obj[$op][$key] = $value;
            return $obj;
        };
    }
225521
def _update_classmethod(self, oldcm, newcm):
        """"""
        # While we can't modify the classmethod object itself (it has no
        # mutable attributes), we *can* extract the underlying function
        # (by calling __get__(), which returns a method object) and update
        # it in-place.  We don't have the class available to pass to
        # __get__() but any object except None will do.
        self._update(None, None, oldcm.__get__(0), newcm.__get__(0))