Given its name, create the complete modifier function
977588
function createModifierFunction (modifier) {
  return function (obj, field, value) {
    var fieldParts = typeof field === 'string' ? field.split('.') : field;

    if (fieldParts.length === 1) {
      lastStepModifierFunctions[modifier](obj, field, value);
    } else {
      if (obj[fieldParts[0]] === undefined) {
        if (modifier === '$unset') { return; }   // Bad looking specific fix, needs to be generalized modifiers that behave like $unset are implemented
        obj[fieldParts[0]] = {};
      }
      modifierFunctions[modifier](obj[fieldParts[0]], fieldParts.slice(1), value);
    }
  };
}
1039304
function completer (text) {
  const math = getMath()
  let matches = []
  let keyword
  const m = /[a-zA-Z_0-9]+$/.exec(text)
  if (m) {
    keyword = m[0]

    // scope variables
    for (const def in scope) {
      if (scope.hasOwnProperty(def)) {
        if (def.indexOf(keyword) === 0) {
          matches.push(def)
        }
      }
    }

    // commandline keywords
    ['exit', 'quit', 'clear'].forEach(function (cmd) {
      if (cmd.indexOf(keyword) === 0) {
        matches.push(cmd)
      }
    })

    // math functions and constants
    const ignore = ['expr', 'type']
    for (const func in math.expression.mathWithTransform) {
      if (math.expression.mathWithTransform.hasOwnProperty(func)) {
        if (func.indexOf(keyword) === 0 && ignore.indexOf(func) === -1) {
          matches.push(func)
        }
      }
    }

    // units
    const Unit = math.Unit
    for (let name in Unit.UNITS) {
      if (Unit.UNITS.hasOwnProperty(name)) {
        if (name.indexOf(keyword) === 0) {
          matches.push(name)
        }
      }
    }
    for (let name in Unit.PREFIXES) {
      if (Unit.PREFIXES.hasOwnProperty(name)) {
        const prefixes = Unit.PREFIXES[name]
        for (const prefix in prefixes) {
          if (prefixes.hasOwnProperty(prefix)) {
            if (prefix.indexOf(keyword) === 0) {
              matches.push(prefix)
            } else if (keyword.indexOf(prefix) === 0) {
              const unitKeyword = keyword.substring(prefix.length)
              for (const n in Unit.UNITS) {
                if (Unit.UNITS.hasOwnProperty(n)) {
                  if (n.indexOf(unitKeyword) === 0 &&
                      Unit.isValuelessUnit(prefix + n)) {
                    matches.push(prefix + n)
                  }
                }
              }
            }
          }
        }
      }
    }

    // remove duplicates
    matches = matches.filter(function (elem, pos, arr) {
      return arr.indexOf(elem) === pos
    })
  }

  return [matches, keyword]
}
369321
def _make_signature(self):
        
        # Create KEYWORD_ONLY arguments with the names of the minimizers.
        name = lambda x: x.__class__.__name__
        count = Counter(
            [name(minimizer) for minimizer in self.minimizers]
        ) # Count the number of each minimizer, they don't have to be unique

        # Note that these are inspect_sig.Parameter's, not symfit parameters!
        parameters = []
        for minimizer in reversed(self.minimizers):
            if count[name(minimizer)] == 1:
                # No ambiguity, so use the name directly.
                param_name = name(minimizer)
            else:
                # Ambiguity, so append the number of remaining minimizers
                param_name = '{}_{}'.format(name(minimizer), count[name(minimizer)])
            count[name(minimizer)] -= 1

            parameters.append(
                inspect_sig.Parameter(
                    param_name,
                    kind=inspect_sig.Parameter.KEYWORD_ONLY,
                    default={}
                )
            )
        return inspect_sig.Signature(parameters=reversed(parameters))
497735
function modifiersPressed(names) {

        // If any required modifiers are not pressed, return false
        for (var i=0; i < names.length; i++) {

            // Test whether current modifier is pressed
            var name = names[i];
            if (!(name in modifierKeysyms))
                return false;

        }

        // Otherwise, all required modifiers are pressed
        return true;

    }
246131
function jsonModifiers(modifiers) {
  return modifiers.map(function(modifier, id) {
    return {
      id: id + 1,
      name: modifier.name(),
      description: modifier.description(),
      className: modifier.className(),
      markup: modifier.markup() ? modifier.markup().toString() : null
    };
  });
}
997806
def wrap_function_name(self, name):
        """"""

        if len(name) > 32:
            ratio = 2.0/3.0
            height = max(int(len(name)/(1.0 - ratio) + 0.5), 1)
            width = max(len(name)/height, 32)
            # TODO: break lines in symbols
            name = textwrap.fill(name, width, break_long_words=False)

        # Take away spaces
        name = name.replace(", ", ",")
        name = name.replace("> >", ">>")
        name = name.replace("> >", ">>") # catch consecutive

        return name
738632
function updateModifiedFlag(conditions, modifiers) {

    for (let i = 0; i < conditions.length; ++i) {
        const condition = conditions[i];

        for (let j = 0; !condition.modified && j < modifiers.length; ++j) {
            const modifier = modifiers[j];
            let funcNode, funcVar;

            /*
             * Besides checking for the condition being in the loop, we want to
             * check the function that this modifier is belonging to is called
             * in the loop.
             * FIXME: This should probably be extracted to a function.
             */
            const inLoop = condition.isInLoop(modifier) || Boolean(
                (funcNode = getEncloseFunctionDeclaration(modifier)) &&
                (funcVar = astUtils.getVariableByName(modifier.from.upper, funcNode.id.name)) &&
                funcVar.references.some(condition.isInLoop)
            );

            condition.modified = inLoop;
        }
    }
}
600184
function genComponentModel (
  el,
  value,
  modifiers
) {
  var ref = modifiers || {};
  var number = ref.number;
  var trim = ref.trim;

  var valueExpression = 'value';
  if (trim) {
    valueExpression = "(typeof value === 'string' ? value.trim() : value)";
  }
  if (number) {
    valueExpression = "_n(" + valueExpression + ")";
  }

  el.model = {
    value: ("(" + value + ")"),
    callback: ("function (value) {" + (genAssignmentCode(value, valueExpression)) + "}")
  };
}
153061
def create(prefix, params, hint):
        """"""
        current = getattr(_BlockScope._current, "value", None)
        if current is None:
            if prefix is None:
                if not hasattr(_name.NameManager._current, "value"):
                    _name.NameManager._current.value = _name.NameManager()
                prefix = _name.NameManager._current.value.get(None, hint) + '_'
            if params is None:
                params = ParameterDict(prefix)
            else:
                params = ParameterDict(params.prefix, params)
            return prefix, params

        if prefix is None:
            count = current._counter.get(hint, 0)
            prefix = '%s%d_'%(hint, count)
            current._counter[hint] = count + 1
        if params is None:
            parent = current._block.params
            params = ParameterDict(parent.prefix+prefix, parent._shared)
        else:
            params = ParameterDict(params.prefix, params)
        return current._block.prefix+prefix, params
110902
def create_function_f_J(self):
        """"""
        return ca.Function(
            'J',
            [self.t, self.x, self.y, self.m, self.p, self.c, self.ng, self.nu],
            [ca.jacobian(self.f_x_rhs, self.x)],
            ['t', 'x', 'y', 'm', 'p', 'c', 'ng', 'nu'], ['J'], self.func_opt)
1076547
def create_info(cls, configure_func):
        # type: (Callable) -> ConfigureParamsInfo
        """"""
        call_types = getattr(configure_func, "call_types",
                             {})  # type: Dict[str, Anno]
        metas = OrderedDict()
        required = []
        defaults = OrderedDict()
        for k, anno in call_types.items():
            if k not in cls.call_types:
                scls = VMeta.lookup_annotype_converter(anno)
                metas[k] = scls.from_annotype(anno, writeable=True)
                if anno.default is NO_DEFAULT:
                    required.append(k)
                elif anno.default is not None:
                    defaults[k] = anno.default
        return ConfigureParamsInfo(metas, required, defaults)
885414
def set_function_name(f, name, cls):
    
    f.__name__ = name
    f.__qualname__ = '{klass}.{name}'.format(
        klass=cls.__name__,
        name=name)
    f.__module__ = cls.__module__
    return f
565720
def resampling_scheme(func):
    """"""

    @functools.wraps(func)
    def modif_func(W, M=None):
        M = W.shape[0] if M is None else M
        return func(W, M)

    rs_funcs[func.__name__] = modif_func
    modif_func.__doc__ = rs_doc % func.__name__.capitalize()
    return modif_func
1296570
function createScopedNameFunc() {
  return function ( name, _path ) {
    if ( name.match( /^__global__/ ) ) {
      return name.replace( /^__global__/, '' );
    }
    return 'c_' + stringHash( _path ).toString( 36 ).substr( 0, 7 ) + '_' + name;
  };
}
829222
function (name) {
		var elem = this.createElement('g');
		return defined(name) ? elem.attr({ 'class': PREFIX + name }) : elem;
	}
1015816
function createNamedClass (name, klass, baseKlass, superFunc) {
    if (!superFunc) {
        superFunc = function () {
            baseKlass.call(this);
        };
    }
    
    return new Function(
        'klass', 'superFunc',
        'return function ' + name + ' () {' +
            'superFunc.apply(this, arguments);' +
            'klass.apply(this, arguments);' +
        '};'
        )(klass, superFunc);
}
651727
function updateModifiers() {
  if (this.state.isDestroyed) {
    return;
  }
  // Deep merge modifiers options
  let options = this.defaultOptions;
  this.options.modifiers = {};
  const _this = this;
  Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
    _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
  });

  // Refactoring modifiers' list (Object => Array)
  this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
    return _extends({
      name: name
    }, _this.options.modifiers[name]);
  })
  // sort the modifiers by order
    .sort(function (a, b) {
      return a.order - b.order;
    });

  // modifiers have the ability to execute arbitrary code when Popper.js get inited
  // such code is executed in the same order of its modifier
  // they could add new properties to their options configuration
  // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
  this.modifiers.forEach(function (modifierOptions) {
    if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
      modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
    }
  });
}