set up some local variables and functions that we can reuse for all tweens - we do this only once and cache things to improve performance
322607
function(s1, s2, v, d) { 
				var s = {}, val, p;
				for (p in s2) {
					if (p !== "cssText") if (p !== "length") if (isNaN(p)) if (s1[p] != (val = s2[p])) if (val !== _transformProp) if (typeof(val) === "number" || typeof(val) === "string") {
						s[p] = ((val === "" || val === "auto") && typeof(s1[p]) === "string" && s1[p].replace(_NaNExp, "") !== "") ? 0 : val; //if the ending value is defaulting ("" or "auto"), we check the starting value and if it can be parsed into a number (a string which could have a suffix too, like 700px), then we swap in 0 for "" or "auto" so that things actually tween.
						if (d) {
							d.props.push(p);
						}
					}
				}
				if (v) {
					for (p in v) { //copy properties (except className)
						if (p !== "className") {
							s[p] = v[p];
						}
					}
				}
				return s;
			}
669629
def _scoped_variables(self, nodes_list, **kwargs):
        

        tmp_vars = []
        for node in nodes_list:

            is_assign_node = isinstance(node, nodes.Assign)
            name = node.target.name if is_assign_node else node.name

            # create a temp variable name
            tmp_var = next(self.temp_var_names)

            # save previous context value
            with self._execution():

                # save the current value of this name
                self.output.write('var %s = %s.%s;' % (tmp_var, self.context_name, name))

                # add new value to context
                self.output.write('%s.%s = ' % (self.context_name, name))

                if is_assign_node:
                    self._process_node(node.node, **kwargs)
                else:
                    self.output.write(node.name)

                self.output.write(';')

            tmp_vars.append((tmp_var, name))

        yield

        # restore context
        for tmp_var, name in tmp_vars:
            with self._execution():
                self.output.write('%s.%s = %s;' % (self.context_name, name, tmp_var))
95283
private void initVariables() {
    mSumCapacityBytes = 0;
    mSumUsedBytes = 0;
    mSumCapacityBytesOnTierMap = new TreeMap<>(FileSystemAdminShellUtils::compareTierNames);
    mSumUsedBytesOnTierMap = new TreeMap<>(FileSystemAdminShellUtils::compareTierNames);

    // TierInfoMap is of form Map<Tier_Name, Map<Worker_Name, Worker_Tier_Value>>
    mCapacityTierInfoMap = new TreeMap<>(FileSystemAdminShellUtils::compareTierNames);
    mUsedTierInfoMap = new TreeMap<>(FileSystemAdminShellUtils::compareTierNames);
  }
649541
def memoize(func):
    

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        """ wrap it up and store info in a cache """
        cache = args[0].memoized
        refresh = args[0].refresh_interval
        use_cache = args[0].use_cache

        # short circuit if not using cache
        if use_cache is False:
            return func(*args, **kwargs)

        if func.__name__ not in cache:
            cache[func.__name__] = dict()
            if "defaults" not in cache:
                cache["defaults"] = dict()
            cache["defaults"][func.__name__] = parse_all_arguments(func)
        # build a key; should also consist of the default values
        defaults = cache["defaults"][func.__name__].copy()
        for key, val in kwargs.items():
            defaults[key] = val
        tmp = list()
        tmp.extend(args[1:])
        for k in sorted(defaults.keys()):
            tmp.append("({0}: {1})".format(k, defaults[k]))

        # handle possible unicode characters
        if sys.version_info < (3, 0):
            tmp = [unicode(x) for x in tmp]
        key = " - ".join(tmp)

        # set the value in the cache if missing or needs to be refreshed
        if key not in cache[func.__name__]:
            cache[func.__name__][key] = (time.time(), func(*args, **kwargs))
        else:
            tmp = cache[func.__name__][key]
            # determine if we need to refresh the data...
            if refresh is not None and time.time() - tmp[0] > refresh:
                cache[func.__name__][key] = (time.time(), func(*args, **kwargs))
        return cache[func.__name__][key][1]

    return wrapper
597027
function()
			{
				var tweenTime = (new Date()).getTime() / 1000;

				var time = tweenTime - _tweenTime;
				if (time < 0)
					time = 0;
				else if (time > 0.1)
					time = 0.1;
				_tweenTime = tweenTime;

				var runInfos = _tweenRunInfo.values();
				var runInfo;
				var position;
				for (var i = 0, l = runInfos.length; i < l; i++)
				{
					runInfo = runInfos[i];

					runInfo.time += time;

					position = runInfo.time / runInfo.duration;
					if (position > 1)
						position = 1;

					if (!runInfo.tween.updateTween(position))
						position = 1;

					if (position == 1)
						TweenRunner.stop(runInfo.tween);
				}
			}
637801
def local_init(bucket_count, bucket_width, start_priority)
      @width = bucket_width
      old = @buckets
      @buckets = if @cached_buckets == nil
        Array.new(bucket_count) { [] }
      else
        n = @cached_buckets.size
        if bucket_count < n
          # shrink the array
          @cached_buckets.slice!(bucket_count, n)
        else
          # expand the array
          @cached_buckets.fill(n, bucket_count - n) { [] }
        end
        @cached_buckets
      end
      @cached_buckets = old

      @last_priority = start_priority
      i = start_priority / bucket_width # virtual bucket
      @last_bucket = (i % bucket_count).to_i
      @bucket_top = (i+1) * bucket_width + 0.5 * bucket_width

      # set up queue size change thresholds
      @shrink_threshold = bucket_count / 2 - 2
      @expand_threshold = 2 * bucket_count
    end
455384
function setLocalVariable( $varName, $varValue, $rootNamespace )
    {
        $this->CurrentLocalVariablesNames[$rootNamespace][$varName] = 1;
        $this->setVariable( $varName, $varValue, $rootNamespace );
    }
1110170
function (nodes, i, container, _parent, counter) {
	var node = nodes[i].clone();

	nodes[i].clear();

	return function (others) {
		var local_promises = [];
		if (node.children.length) {
			transclude(others, node.children);
		}

		node.children    = others;
		node.is_resolved = true;

		collect_components([node], container, local_promises, _parent, counter);

		return $q.all(local_promises).then(function () {
			nodes[i] = node;
		});
	};
}
626513
private void initialize(Map context) {
    // Guard against recursion.
    context.put(jsTypeTree, this);

    // Create temporary accumulators for the contents of the fields and variants instance
    // variables.
    List tmpFields = new ArrayList();
    List tmpVariants = new ArrayList();

    // Perform tasks assigned to the recursive 'number' subroutine (see comment there)
    number(jsTypeTree, context, false, 0, tmpFields, tmpVariants);

    // Move information from temporaries into permanent instance variables
    fields = (JSField[])tmpFields.toArray(new JSField[0]);
    variants = (JSVariant[])tmpVariants.toArray(new JSVariant[0]);

    // Compute the contents of the 'boxed' instance variable, which is deriveable from the
    // contents of those JSVariants which have found their way into 'fields.'  These are
    // all intended to be boxed variants because they were detected to be underneath
    // JSRepeated nodes during the 'number' process.
    int boxLen = 0; // accumulate total length of boxed array
    for (int i = 0; i < fields.length; i++)
      if (fields[i] instanceof JSVariant)
        // On the first pass, we box the variant and accumulate its accessor count
        boxLen += ((JSVariant)fields[i]).box(context).getAccessorCount();
    boxed = new int[boxLen][];
    int boxIndex = 0;

    // On the second pass through the boxed variants, we get their accessor count a second
    // time and use it this time to fill in the contents of the 'boxed' instance variable
    // proper.
    for (int i = 0; i < fields.length; i++)
      if (fields[i] instanceof JSVariant)
        for (int j = 0; j < ((JSVariant)fields[i]).getBoxed().getAccessorCount(); j++)
          boxed[boxIndex++] = new int[] { i, j };

    // Set the 'accessor' property of every JSField in the tree (see comment on
    // setAccessors).
    setAccessors(0, this);

    // Set the multiChoiceCount for each node in the tree.  Note this must be done
    // after boxing any variants found underneath JSRepeated nodes, since boxing changes
    // the multiChoiceCount.  setMultiChoiceCount is a recursive method that will set
    // counts starting from the leaves working back to the root.
    jsTypeTree.setMultiChoiceCount();

    // Compute the serialForm if it isn't already there due to the deserializing
    // constructor
    if (serialForm == null) {
      // Store the name in a convenient non-null form
      name = jsTypeTree.getFeatureName();
      if (name == null)
        name = "";
      try {
        byte[] utfname = name.getBytes("UTF8");
        serialForm = new byte[2 + utfname.length + 2 + jsTypeTree.encodedTypeLength()];
        ArrayUtil.writeShort(serialForm, 0, (short)utfname.length);
        System.arraycopy(utfname, 0, serialForm, 2, utfname.length);
        int limits[] = new int[] { 2 + utfname.length, serialForm.length };
        JSType.setCount(serialForm, limits, version);
        jsTypeTree.encodeType(serialForm, limits);
      } catch (UnsupportedEncodingException e) {
        FFDCFilter.processException(e, "initialize", "604");
        IllegalArgumentException ex = new IllegalArgumentException();
        ex.initCause(e);
        throw ex;
      }
    }

    // Compute the schemaID, which is a 64-bit truncated SHA-1 hash over the serialForm.
    schemaID = CryptoHash.hash(serialForm);
    schemaLongID = Long.valueOf(schemaID);
  }
485686
function () {
        this._tweenHandler = $B.bind(function (e) {
            var i, c_value;
            for ( i = 0; i < this._propLength; ++i ) {
                var f_property = this._f_props[i],
                    b_property = this._b_props[i],
                    fName = f_property.name,
                    fValue = f_property.value;

                //Color
                if( f_property.unit == 'color' ) {
                    c_value = $B.color.mix( b_property.value, fValue, e.percent, f_property.colorType );
                } else {
                    c_value = ( fValue * e.percent + b_property.value ) + f_property.unit;
                }

                //Opacity
                if ( fName == 'opacity' ) {
                    $B.style.opacity( this._target, fValue * e.percent + b_property.value );
                    //ScrollTop
                } else if ( fName == 'scrollTop' ) {
                    $B( this._target ).scrollTop( Number(c_value) );
                    //ScrollLeft
                } else if ( fName == 'scrollLeft' ) {
                    $B( this._target ).scrollLeft( Number(c_value) );
                } else {
                    this._target.style[f_property.styleName] = c_value;
                }
            }

            this.dispatch( e.type, e );
        }, this);

        this._tweenCore = new $B.utils.TweenCore( this._duration, 0, 1, this._option, this._data )
                .addListener( 'tween', this._tweenHandler )
                .addListener( 'complete', this._tweenHandler )
                .addListener( 'seekcomplete', this._tweenHandler );
    }
386065
function _animateFunc(func, element, duration, opts) {
  opts = Object.assign({}, opts);
  var tween;
  return new Promise(function(resolve, reject, onCancel) {
    opts.onComplete = resolve;
    tween = func(element, duration, opts);
    onCancel &&
      onCancel(function() {
        tween.kill();
      });
  });
}
1227025
protected void createVariableLocal(String variableName, Object value, ExecutionEntity sourceActivityExecution) {
    ensureVariableInstancesInitialized();

    if (variableInstances.containsKey(variableName)) {
      throw new ActivitiException("variable '" + variableName + "' already exists. Use setVariableLocal if you want to overwrite the value");
    }

    createVariableInstance(variableName, value, sourceActivityExecution);
  }
1267726
function createLocalCache() {
    var localCache = lruCache({ max: 100, maxAge: 60000 });
    return {
        get: function (key) {
            return new Q(localCache.get(key));
        },
        set: function (key, value) {
            localCache.set(key, value);
        },
        del: function (key) {
            localCache.set(key, null);
        }
    };
}
24774
function Tweenable (opt_initialState, opt_config) {
      this._currentState = opt_initialState || {};
      this._configured = false;
      this._scheduleFunction = DEFAULT_SCHEDULE_FUNCTION;

      // To prevent unnecessary calls to setConfig do not set default configuration here.
      // Only set default configuration immediately before tweening if none has been set.
      if (typeof opt_config !== 'undefined') {
        this.setConfig(opt_config);
      }
    }
404063
function(m) {
            // cache elements in local variables, for speedup:
            var this0 = this.elements[0];
            var this1 = this.elements[1];
            var this2 = this.elements[2];
            var this3 = this.elements[3];
            var this4 = this.elements[4];
            var this5 = this.elements[5];
            var this6 = this.elements[6];
            var this7 = this.elements[7];
            var this8 = this.elements[8];
            var this9 = this.elements[9];
            var this10 = this.elements[10];
            var this11 = this.elements[11];
            var this12 = this.elements[12];
            var this13 = this.elements[13];
            var this14 = this.elements[14];
            var this15 = this.elements[15];
            var m0 = m.elements[0];
            var m1 = m.elements[1];
            var m2 = m.elements[2];
            var m3 = m.elements[3];
            var m4 = m.elements[4];
            var m5 = m.elements[5];
            var m6 = m.elements[6];
            var m7 = m.elements[7];
            var m8 = m.elements[8];
            var m9 = m.elements[9];
            var m10 = m.elements[10];
            var m11 = m.elements[11];
            var m12 = m.elements[12];
            var m13 = m.elements[13];
            var m14 = m.elements[14];
            var m15 = m.elements[15];

            var result = [];
            result[0] = this0 * m0 + this1 * m4 + this2 * m8 + this3 * m12;
            result[1] = this0 * m1 + this1 * m5 + this2 * m9 + this3 * m13;
            result[2] = this0 * m2 + this1 * m6 + this2 * m10 + this3 * m14;
            result[3] = this0 * m3 + this1 * m7 + this2 * m11 + this3 * m15;
            result[4] = this4 * m0 + this5 * m4 + this6 * m8 + this7 * m12;
            result[5] = this4 * m1 + this5 * m5 + this6 * m9 + this7 * m13;
            result[6] = this4 * m2 + this5 * m6 + this6 * m10 + this7 * m14;
            result[7] = this4 * m3 + this5 * m7 + this6 * m11 + this7 * m15;
            result[8] = this8 * m0 + this9 * m4 + this10 * m8 + this11 * m12;
            result[9] = this8 * m1 + this9 * m5 + this10 * m9 + this11 * m13;
            result[10] = this8 * m2 + this9 * m6 + this10 * m10 + this11 * m14;
            result[11] = this8 * m3 + this9 * m7 + this10 * m11 + this11 * m15;
            result[12] = this12 * m0 + this13 * m4 + this14 * m8 + this15 * m12;
            result[13] = this12 * m1 + this13 * m5 + this14 * m9 + this15 * m13;
            result[14] = this12 * m2 + this13 * m6 + this14 * m10 + this15 * m14;
            result[15] = this12 * m3 + this13 * m7 + this14 * m11 + this15 * m15;
            return new CSG.Matrix4x4(result);
        }
892739
function(target, value, tween) {
				this._wdw = (target === _window);
				this._target = target;
				this._tween = tween;
				if (typeof(value) !== "object") {
					value = {y:value}; //if we don't receive an object as the parameter, assume the user intends "y".
				}
				this.vars = value;
				this._autoKill = (value.autoKill !== false);
				this.x = this.xPrev = this.getX();
				this.y = this.yPrev = this.getY();
				if (value.x != null) {
					this._addTween(this, "x", this.x, (value.x === "max") ? _max(target, "x") : value.x, "scrollTo_x", true);
					this._overwriteProps.push("scrollTo_x");
				} else {
					this.skipX = true;
				}
				if (value.y != null) {
					this._addTween(this, "y", this.y, (value.y === "max") ? _max(target, "y") : value.y, "scrollTo_y", true);
					this._overwriteProps.push("scrollTo_y");
				} else {
					this.skipY = true;
				}
				return true;
			}
207576
def _initialize_variables(self):
    """"""
    # Initialize global variables.
    self._global_vars = {}  # Indexed by (MTF dimension, mesh dimension)
    for mtf_dimension_name in (
        self._layout_validator.splittable_mtf_dimension_names):
      for mesh_dimension_name in (
          self._layout_validator.mesh_dimension_name_to_size):
        name = _global_var_name(mtf_dimension_name, mesh_dimension_name)
        self._global_vars[(mtf_dimension_name, mesh_dimension_name)] = (
            self._model.NewBoolVar(name))

    # Initialize local variables.
    self._local_vars = {}  # Indexed by (tensorflow dimension set), then name of
    # assignment.
    for mtf_dimension_set in self._mtf_dimension_sets:
      self._local_vars[mtf_dimension_set] = {}
      for assignment in self._assignments[mtf_dimension_set]:
        # TODO(joshuawang): Avoid hash collision no matter what dimension names
        # are; don't hash by this local var name, swap to using a tuple encoding
        # of the full assignment instead.
        name = _local_var_name(mtf_dimension_set, assignment)
        self._local_vars[mtf_dimension_set][name] = (
            self._model.NewBoolVar(name))

    # Initialize memory variable. We need a crude upper bound on memory, so we
    # use the total size of all tensors under the empty assignment.
    # NOTE(joshuawang): This bound could be improved by factoring in the
    # schedule.
    memory_upper_bound = 0
    for tensor_name in self._graph.get_all_tensor_names():
      if self._graph.is_tensor_on_canonical_device(tensor_name):
        memory_upper_bound += int(self._graph.get_tensor_size(tensor_name))
    self._memory_var = self._model.NewIntVar(0, memory_upper_bound, "z")