def install_bower(self, package, save=True, save_dev=False):
        """Installs a bower package.

        :param save: if `True`, pins the package to the Hydrogen requirements
            YAML file.
        :param save_dev: if `True`, pins the package as a development
            dependency to the Hydrogen requirements YAML file.
        :param return: a list of tuples, containing all installed package names
            and versions, including any dependencies.
        """
        requirement = Requirement.coerce(package)
        url = Bower.get_package_url(requirement.package)

        installed = []
        for name, _ in self.get_bower_package(url):
            installed.append(Requirement(name, requirement.version))

        for requirement in installed:
            if save:
                self.requirements["bower"].add(requirement, replace=True)
            if save_dev:
                self.requirements["bower-dev"].add(requirement, replace=True)
            success("installed {}".format(str(requirement)))
        if save or save_dev:
            self.requirements.save()
        return installed
def dfs(self, num, target, pos, cur_str, cur_val, mul, ret):
        if pos >= len(num):
            if cur_val == target:
                ret.append(cur_str)
        else:
            for i in xrange(pos, len(num)):
                if i != pos and num[pos] == "0":
                    continue
                nxt_val = int(num[pos:i+1])

                if not cur_str:
                    self.dfs(num, target, i+1, "%d"%nxt_val, nxt_val, nxt_val, ret)
                else:
                    self.dfs(num, target, i+1, cur_str+"+%d"%nxt_val, cur_val+nxt_val, nxt_val, ret)
                    self.dfs(num, target, i+1, cur_str+"-%d"%nxt_val, cur_val-nxt_val, -nxt_val, ret)
                    self.dfs(num, target, i+1, cur_str+"*%d"%nxt_val, cur_val-mul+mul*nxt_val, mul*nxt_val, ret)