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
import logging | |
import re | |
import sys | |
REPLACEMENTS = { | |
"’": "'", | |
"—": "--", | |
"“": "``", | |
"”": "''", |
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
File: | |
https://github.com/jlafon/ansible-profile/blob/d9dd334b4690271bd9e4afb43323ec435f19baec/callback_plugins/profile_tasks.py |
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
(venv)jack@neptune-vm:~/z/imports$ python | |
Python 2.7.12 (default, Nov 20 2017, 18:23:56) | |
[GCC 5.4.0 20160609] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from a import foo | |
>>> foo | |
<module 'a.foo' from 'a/foo.py'> |
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
f = open(__file__, 'w') | |
f.truncate() |
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
<HTML> | |
<HEAD> | |
<TITLE>Your Title Here</TITLE> | |
</HEAD> | |
<BODY BGCOLOR="FFFFFF"> |
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
# This is bsed on the example at https://github.com/acoomans/flask-autodoc/blob/master/examples/simple/blog.py | |
# It adds SQLAlchemy models, and uses Flask-Restless to create a REST API for manipulating these | |
from flask import Flask | |
from flask.ext.autodoc import Autodoc | |
from flask.ext.restless import APIManager | |
from flask.ext.sqlalchemy import SQLAlchemy | |
app = Flask(__name__) | |
app.debug = True |