<commit_before>import asyncio
from pgtulip.pool import Pool

dsn = 'dbname=jetty user=nick password=<PASSWORD> host=localhost'


@asyncio.coroutine
def test_select():
    pool = Pool(dsn)
    # init pool connections
    yield from pool.setup()
    morgify_result = yield from pool.morgify("select 1;")
    # simple query in transaction
    transaction_result = yield from pool.run_transaction(
        [
            ("select %s;", (2)),
            ("select 3;", (3)),
        ]
    )
    # simple query
    query_result = yield from pool.run_query("select %s;", (5,))

    print("morgify_result=", morgify_result)
    print("transaction_result=", transaction_result)
    print("query_result=", query_result)


loop = asyncio.get_event_loop()
loop.run_until_complete(test_select())<commit_msg>Update example<commit_after>import asyncio
import aiopg

dsn = 'dbname=jetty user=nick password=<PASSWORD> host=localhost'


@asyncio.coroutine
def test_select():
    pool = yield from aiopg.create_pool(dsn)
    with (yield from pool.cursor()) as cur:
        ret = yield from cur.execute("SELECT 1")
        assert ret == (1,)


loop = asyncio.get_event_loop()
loop.run_until_complete(test_select())
{'fraction_non_alphanumeric': 0.12154233025984912, 'fraction_numerical': 0.00586756077116513, 'mean_word_length': 3.873469387755102, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1502478', 'n_tokens_mistral': 393, 'n_tokens_neox': 384, 'n_words': 91}