This file contains hidden or 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
#!/usr/bin/env python | |
#https://github.com/psycopg/psycopg2/issues/261 | |
import psycopg2 | |
ISOLEVEL = psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT | |
import time |
This file contains hidden or 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
@app.route("/sitemap") | |
@app.route("/sitemap/") | |
@app.route("/sitemap.xml") | |
def sitemap(): | |
""" | |
Route to dynamically generate a sitemap of your website/application. | |
lastmod and priority tags omitted on static pages. | |
lastmod included on dynamic content such as blog posts. | |
""" | |
from flask import make_response, request, render_template |
This file contains hidden or 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
import threading | |
from typing import Any | |
class PropagatingThread(threading.Thread): | |
"""A Threading Class that raises errors it caught, and returns the return value of the target on join.""" | |
def __init__(self, *args, **kwargs): | |
self._target = None | |
self._args = () |
OlderNewer