This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
This is part of a Structured Data carousel. | |
Use https://search.google.com/structured-data/testing-tool to test changes. | |
{% endcomment %} | |
{ | |
"@type": "ListItem", | |
"position": {{ include.index }}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: | |
permalink: /sitemap.xml | |
--- | |
<?xml version="1.0" encoding="UTF-8"?> | |
<urlset | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd | |
http://www.w3.org/1999/xhtml http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyAutoIndex(AutoIndex): | |
def __new__(cls, base, *args, **kwargs): | |
if isinstance(base, Flask): | |
return object.__new__(MyAutoIndexApplication) | |
raise TypeError("'base' should be Flask; Blueprint is not implemented.") | |
def render_autoindex(self, path, browse_root=None, template=None, template_context=None, endpoint='.autoindex', show_hidden=None, sort_by='name', mimetype=None): | |
i = super(MyAutoIndex, self).render_autoindex(path, browse_root, template, template_context, endpoint, show_hidden, sort_by, mimetype) | |
print i | |
return i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def key(link_name, content_type): | |
""" Generate a getter to obtain a linked resource. | |
Preconditions: | |
- links is a key in the Root Resource dictionary | |
Exceptions: | |
- BadLinkName: link_name is not in the Root Resource's links dictionary | |
""" | |
def _get(url, query_dict = None): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
time_from, time_to = process_command_line() | |
client = RBClient(sys.argv[len(sys.argv) - 1]) | |
try: | |
root = client.get_root() | |
except ServerInterfaceError as err: | |
error(err) | |
sys.exit(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def decorator(func): | |
def _decorator(): | |
func() | |
return _decorator | |
def pytest_namespace(): | |
return { | |
'decorator': decorator | |
} |