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 collections import deque | |
import bonobo | |
from bonobo.config import use_context_processor | |
def rolling_deque(self, context): | |
buffer = yield deque() | |
while len(buffer): | |
retval = buffer.popleft() |
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
#! /bin/bash | |
# Exit if something fails | |
set -e | |
# Show everything | |
set -x | |
# Set version | |
export VERSION=`git describe` |
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 contextlib import contextmanager | |
import bonobo | |
def get_graph(**options): | |
graph = bonobo.Graph([1,2,3], bonobo.PrettyPrinter()) | |
return graph | |
@contextmanager |
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 bonobo | |
from bonobo.util.bags import BagType | |
from bonobo_quirksmode.config import set_output_type | |
def generate(): | |
yield from ('a', 'b', 'c') | |
LetterBag = BagType('LetterBag', ['letter']) |
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
{ | |
"name": "my-project", | |
"dependencies": { | |
"some-dep": "file:$(python -c 'import os, some_dep; print(os.path.dirname(some_dep.__file__))')/" | |
} | |
} |
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 bonobo | |
from bonobo.config import ContextProcessor, use_context | |
from bonobo.constants import NOT_MODIFIED | |
def extract(): | |
yield 'hello' | |
yield 'world' | |
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 bonobo | |
def get_graph(**options): | |
graph = bonobo.Graph() | |
graph.add_chain(...) | |
return graph | |
def get_services(**options): | |
return {} |
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 | |
from time import sleep | |
import os | |
import re | |
import bonobo | |
from atomicwrites import atomic_write | |
from fs.osfs import OSFS | |
from texools.files import new_file_check |
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 mondrian | |
# One line setup (excepthook=True tells mondrian to handle uncaught exceptions) | |
mondrian.setup(excepthook=True) | |
# Use logging, as usual. | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) |
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 datetime | |
import os | |
import time | |
import bonobo | |
from atomicwrites import atomic_write | |
from bonobo.constants import NOT_MODIFIED | |
from fs.osfs import OSFS |
NewerOlder