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
# -*- coding: utf-8 -*- | |
# Copyright (C) 2014 Yahoo! Inc. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
# -*- coding: utf-8 -*- | |
# Copyright (C) 2014 Yahoo! Inc. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
from taskflow.types import fsm | |
import six | |
a = fsm.FSM("start") | |
a.add_state('start') | |
b = fsm.FSM("boop") | |
b.add_state("boop") | |
b.add_state("dink") |
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
$ git clone https://github.com/stackforge/doc8 | |
$ cd doc8 | |
$ virtualenv test | |
$ source test/bin/activate | |
$ pip install -r requirements.txt | |
$ python | |
Python 2.7.6 (default, Mar 22 2014, 22:59:56) | |
[GCC 4.8.2] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import restructuredtext_lint as rl |
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 six | |
def do_stuff(): | |
for i in range(0, 10): | |
yield i | |
g = do_stuff() |
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 sys | |
from pkg_resources import load_entry_point | |
import time | |
for i in range(0, 500): | |
print("===" * 3) | |
print("Run number %s" % (i + 1)) | |
print("===" * 3) | |
c = load_entry_point('nose', 'console_scripts', 'nosetests') | |
p = c(exit=False) |
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 argparse | |
import contextlib | |
import logging | |
import re | |
import readline | |
import sys | |
import termios | |
import tty | |
import html5lib |
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
# -*- coding: utf-8 -*- | |
# Copyright (C) 2014 Yahoo! Inc. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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 os | |
import pwd | |
import subprocess | |
import sys | |
from oslo.concurrency import processutils | |
from Cheetah.Template import Template | |
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
from Cheetah.Template import Template | |
from delorean import Delorean | |
import parawrap | |
def expand_template(contents, params): | |
if not params: | |
params = {} | |
tpl = Template(source=str(contents), searchList=[params]) | |
return tpl.respond() |