Show current available heads in the script directory
507273
def heads(directory=None, verbose=False, resolve_dependencies=False):
    """"""
    if alembic_version >= (0, 7, 0):
        config = current_app.extensions['migrate'].migrate.get_config(
            directory)
        command.heads(config, verbose=verbose,
                      resolve_dependencies=resolve_dependencies)
    else:
        raise RuntimeError('Alembic 0.7.0 or greater is required')
1080387
def available():
    """"""
    proc = popen_multiple(
        COMMANDS,
        ['-version'],
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
        creationflags=PROC_FLAGS,
    )
    proc.wait()
    return (proc.returncode == 0)
635973
def available(name):
    '''
    
    '''
    path = '/etc/rc.d/{0}'.format(name)
    return os.path.isfile(path) and os.access(path, os.X_OK)
1265607
def show
      @script_authors = Script::Author.friendly.find(params[:id])
      @versions = Phcscriptcdn::AuthorVersions.where(item_id: params[:id], item_type: 'Phcscriptcdn::Script::Author')
    end
752413
def get_available_themes():
    
    for d in settings.TEMPLATE_DIRS:
        for _d in os.listdir(d):
            if os.path.isdir(os.path.join(d, _d)) and is_theme_dir(_d):
                yield _d
1299392
def head_on_file(self, file):
        """"""
        response = HeadResponse()
        if (not os.path.isfile(file)):
            response.status_code = '404'
        else:
            response.status_code = '200'
            response.headers[
                'last-modified'] = datetime_to_str(os.path.getmtime(file))
            response.headers['content-length'] = os.path.getsize(file)
        return(response)
1020739
def current(directory=None, verbose=False, head_only=False):
    """"""
    config = current_app.extensions['migrate'].migrate.get_config(directory)
    if alembic_version >= (0, 7, 0):
        command.current(config, verbose=verbose, head_only=head_only)
    else:
        command.current(config)
1313163
def head(path, options = {}, &block)
      ensure_method_maintained_across_redirects options
      perform_request Net::HTTP::Head, path, options, &block
    end
301550
protected function includeScripts()
    {
        $config = $this->getScriptConfig();

        if (empty($config)) {
            return;
        }

        $view = $this->getView();
        $headScript = $view->headScript();

        foreach ($config as $src => $options) {
            $type = $this->getConfigValue($options, 'type', 'text/javascript');
            $attrs = $this->getConfigValue($options, 'attrs', []);
            $headScript->prependFile($src, $type, $attrs);
        }
    }
540864
def HeadList(self):
        """"""
        return [(rname, repo.currenthead) for rname, repo in self.repos.items()
                ]
677798
def show
      @script_listings = Script::Listing.friendly.find(params[:id])
      @versions = Phcscriptcdn::ListingVersions.where(item_id: params[:id], item_type: 'Phcscriptcdn::Script::Listing')
    end
212455
def _list_available_hosts(self, *args):
        '''  '''

        return [ h for h in self.inventory.list_hosts(*args) if (h not in self.stats.failures) and (h not in self.stats.dark)]
757434
def get_head_form_html(req: "Request", forms: List[Form]) -> str:
    
    # https://docs.pylonsproject.org/projects/deform/en/latest/widget.html#widget-requirements
    js_resources = []  # type: List[str]
    css_resources = []  # type: List[str]
    for form in forms:
        resources = form.get_widget_resources()  # type: Dict[str, List[str]]
        # Add, ignoring duplicates:
        js_resources.extend(x for x in resources['js']
                            if x not in js_resources)
        css_resources.extend(x for x in resources['css']
                             if x not in css_resources)
    js_links = [req.static_url(r) for r in js_resources]
    css_links = [req.static_url(r) for r in css_resources]
    js_tags = ['<script type="text/javascript" src="%s"></script>' % link
               for link in js_links]
    css_tags = ['<link rel="stylesheet" href="%s"/>' % link
                for link in css_links]
    tags = js_tags + css_tags
    head_html = "\n".join(tags)
    return head_html
499529
def show
      @script_extensions = Script::Extension.friendly.find(params[:id])
      @versions = Phcscriptcdn::ExtensionVersions.where(item_id: params[:id], item_type: 'Phcscriptcdn::Script::Extension')
    end
597996
def make_script(self):
        """"""
        self.script_path.write(self.script)
        self.script_path.permissions.make_executable()
        return self.script_path
974161
def head(self) -> Any:
        """"""

        lambda_list = self._get_value()
        return lambda_list(lambda head, _: head)
1183875
def show
      @script_versions = Script::Version.friendly.find(params[:id])
      @versions = Phcscriptcdn::ScriptversionVersions.where(item_id: params[:id], item_type: 'Phcscriptcdn::Script::Version')
    end