Example #1
0
def bayesdb_csv_file(csv):
    with test_core.bayesdb() as bdb:
        with tempfile.NamedTemporaryFile(prefix='bayeslite') as f:
            with open(f.name, 'w') as out:
                out.write(csv)
            yield (bdb, f.name)
Example #2
0
def bayesdb_csv_file(csv):
    with test_core.bayesdb() as bdb:
        with tempfile.NamedTemporaryFile(prefix='bayeslite') as f:
            with open(f.name, 'w') as out:
                out.write(csv)
            yield (bdb, f.name)
Example #3
0
def bayesdb_csv_stream(csv):
    with test_core.bayesdb() as bdb:
        yield (bdb, StringIO.StringIO(csv))
Example #4
0
def bayesdb_csv_stream(csv):
    with test_core.bayesdb() as bdb:
        yield (bdb, StringIO.StringIO(csv))