Shortcut to :meth:`add_component` but with kind='orbit'
508449
def add_orbit(self, component=None, **kwargs):
        
        kwargs.setdefault('component', component)
        return self.add_component('orbit', **kwargs)
344053
def _fit_orbit(orb,vxvv,vxvv_err,pot,radec=False,lb=False,
               customsky=False,lb_to_customsky=None,
               pmllpmbb_to_customsky=None,
               tintJ=100,ntintJ=1000,integrate_method='dopr54_c',
               ro=None,vo=None,obs=None,disp=False):
    """"""
    # Need to turn this off for speed
    coords._APY_COORDS_ORIG= coords._APY_COORDS
    coords._APY_COORDS= False
    #Import here, because otherwise there is an infinite loop of imports
    from galpy.actionAngle import actionAngleIsochroneApprox, actionAngle
    #Mock this up, bc we want to use its orbit-integration routines
    class mockActionAngleIsochroneApprox(actionAngleIsochroneApprox):
        def __init__(self,tintJ,ntintJ,pot,integrate_method='dopr54_c'):
            actionAngle.__init__(self)
            self._tintJ= tintJ
            self._ntintJ=ntintJ
            self._tsJ= nu.linspace(0.,self._tintJ,self._ntintJ)
            self._integrate_dt= None
            self._pot= pot
            self._integrate_method= integrate_method
            return None
    tmockAA= mockActionAngleIsochroneApprox(tintJ,ntintJ,pot,
                                            integrate_method=integrate_method)
    opt_vxvv= optimize.fmin_powell(_fit_orbit_mlogl,orb.vxvv,
                                   args=(vxvv,vxvv_err,pot,radec,lb,
                                         customsky,lb_to_customsky,
                                         pmllpmbb_to_customsky,
                                         tmockAA,
                                         ro,vo,obs),
                                   disp=disp)
    maxLogL= -_fit_orbit_mlogl(opt_vxvv,vxvv,vxvv_err,pot,radec,lb,
                               customsky,lb_to_customsky,pmllpmbb_to_customsky,
                               tmockAA,
                               ro,vo,obs)
    coords._APY_COORDS= coords._APY_COORDS_ORIG
    return (opt_vxvv,maxLogL)
1153233
def mkdir(*components, **kwargs):
    
    _path = path(*components)
    if not isdir(_path):
        os.makedirs(_path, **kwargs)
    return _path
1344036
def addif(self, iname):
        
        _runshell([brctlexe, 'addif', self.name, iname],
            "Could not add interface %s to %s." % (iname, self.name))
576629
def add_filter(self, component, filter_group="pyxley-filter"):
        """"""
        if getattr(component, "name") != "Filter":
            raise Exception("Component is not an instance of Filter")
        if filter_group not in self.filters:
            self.filters[filter_group] = []
        self.filters[filter_group].append(component)
359672
def selectComponent(self, component, index=None, command=QtGui.QItemSelectionModel.Toggle):
        """"""
        if command == QtGui.QItemSelectionModel.Toggle:
            if component in self._selectedComponents:
                self._selectedComponents.remove(component)
                if index is None:
                    index = self.model().indexByComponent(component)
                self.selectionChanged.emit(self.selection(), QtGui.QItemSelection(index, index))
                if len(self._selectedComponents) == 0:
                    self.hintRequested.emit('Select Components in view to modify')
            else:
                self._selectedComponents.append(component)
                self.selectionChanged.emit(self.selection(), QtGui.QItemSelection())
                self.hintRequested.emit('Select more components, or click again to toggle inclusion. To edit parameter type or bounds, select parameter field in table')
        else:
            raise Exception("Selection command not supported")
956486
function addAvailableComponents(req, res, next) {
  res.locals.components = files.getComponents();
  next();
}
584699
def substitute(script, submap):

    """"""

    match = config.TEMPLATE_RE.search(script)
    if match:
        template_type = match.groupdict()['type']
        try:
            return config.TEMPLATE_TYPEMAP[template_type](script, submap)
        except KeyError:
            logger.error('Unsupported template type: %s' % template_type)
            raise
    return script
1045211
def add_star_prefix(self):
        
        if self.path:
            self.path += '*/'
        else:
            self.path = '*/'
        self.star_prefix = True
736928
def add(substance,feature,value)
      substance = substance.id if substance.is_a? Substance
      feature = feature.id if feature.is_a? Feature
      data_entries[substance.to_s] ||= {}
      data_entries[substance.to_s][feature.to_s] ||= []
      data_entries[substance.to_s][feature.to_s] << value
      #data_entries[substance.to_s][feature.to_s].uniq! if value.numeric? # assuming that identical values come from the same source
    end
504638
def tool_builder(component, key, tool_map, *args):
    """"""
    # pylint: disable=protected-access
    tool_name = component.get(key)
    if tool_name:
        tool_fn = tool_map.get(tool_name)
        if tool_fn:
            return tool_fn[0](*args)
        raise Exception("Unknown {} '{}' for {}".format(key, tool_name, component.name))
    raise MissingToolKey(key, component)
853047
private void updateToolTip() {
        // Try to set tool tip on frame. On Mac OS X 10.5,
        // the number of components is different, so try to be safe.
        int n = getComponentCount() - 1;
        if (n > 1) {
            n = 1;
        } else if (n < 0) {
            return;
        }
        Component c = getComponent(n);
        // this will work at least for Metal L&F
        if (c != null && c instanceof JComponent) {
            ((JComponent)c).setToolTipText(getUrl());
        }
    }
1080499
def add(self, callback=None, name=None, shortcut=None, alias=None,
            docstring=None, menu=None, verbose=True):
        """"""
        if callback is None:
            # Allow to use either add(func) or @add or @add(...).
            return partial(self.add, name=name, shortcut=shortcut,
                           alias=alias, menu=menu)
        assert callback

        # Get the name from the callback function if needed.
        name = name or callback.__name__
        alias = alias or _alias(name)
        name = name.replace('&', '')
        shortcut = shortcut or self._default_shortcuts.get(name, None)

        # Skip existing action.
        if name in self._actions_dict:
            return

        # Set the status tip from the function's docstring.
        docstring = docstring or callback.__doc__ or name
        docstring = re.sub(r'[ \t\r\f\v]{2,}', ' ', docstring.strip())

        # Create and register the action.
        action = _create_qaction(self.gui, name, callback,
                                 shortcut,
                                 docstring=docstring,
                                 alias=alias,
                                 )
        action_obj = Bunch(qaction=action, name=name, alias=alias,
                           shortcut=shortcut, callback=callback, menu=menu)
        if verbose and not name.startswith('_'):
            logger.log(5, "Add action `%s` (%s).", name,
                       _get_shortcut_string(action.shortcut()))
        self.gui.addAction(action)
        # Add the action to the menu.
        menu = menu or self.menu
        # Do not show private actions in the menu.
        if menu and not name.startswith('_'):
            self.gui.get_menu(menu).addAction(action)
        self._actions_dict[name] = action_obj
        # Register the alias -> name mapping.
        self._aliases[alias] = name

        # Set the callback method.
        if callback:
            setattr(self, name, callback)
1203045
def add(*args):
    """"""
    if len(args) > 2:
        return add(args[0], add(args[1], args[1:]))

    if len(args) == 1:
        return args[0]

    part1, part2 = args

    if isinstance(part2, Poly):

        if part2.dim > part1.dim:
            part1 = chaospy.dimension.setdim(part1, part2.dim)
        elif part2.dim < part1.dim:
            part2 = chaospy.dimension.setdim(part2, part1.dim)

        dtype = chaospy.poly.typing.dtyping(part1.dtype, part2.dtype)

        core1 = part1.A.copy()
        core2 = part2.A.copy()

        if np.prod(part2.shape) > np.prod(part1.shape):
            shape = part2.shape
            ones = np.ones(shape, dtype=int)
            for key in core1:
                core1[key] = core1[key]*ones
        else:
            shape = part1.shape
            ones = np.ones(shape, dtype=int)
            for key in core2:
                core2[key] = core2[key]*ones

        for idx in core1:
            if idx in core2:
                core2[idx] = core2[idx] + core1[idx]
            else:
                core2[idx] = core1[idx]
        out = core2

        return Poly(out, part1.dim, shape, dtype)

    part2 = np.asarray(part2)

    core = part1.A.copy()
    dtype = chaospy.poly.typing.dtyping(part1.dtype, part2.dtype)

    zero = (0,)*part1.dim

    if zero not in core:
        core[zero] = np.zeros(part1.shape, dtype=int)

    core[zero] = core[zero] + part2

    if np.prod(part2.shape) > np.prod(part1.shape):

        ones = np.ones(part2.shape, dtype=dtype)
        for key in core:
            core[key] = core[key]*ones

    return Poly(core, part1.dim, None, dtype)
1102115
def add_lib_element(type, value, front = false)
      elem = [type, value.instance_of?(String) ? value : value.name]
      if front
        lib_elements.unshift(elem)
      else
        lib_elements << elem
      end
    end
1175462
def _add(self, command, *args, **kwargs):
        
        if self.indexable:
            self.index(args)
        return self._traverse_command(command, *args, **kwargs)
995644
public void addChemComp(ChemComp comp){

		dictionary.put(comp.getId(),comp);
		String rep = comp.getPdbx_replaces();
		if ( (rep != null) && ( ! rep.equals("?"))){
			replaces.put(comp.getId(),rep);
		}

		String isrep = comp.getPdbx_replaced_by();
		if ( (isrep != null) && ( ! isrep.equals("?"))){
			isreplacedby.put(comp.getId(),isrep);
		}
	}