Skip to content

Instantly share code, notes, and snippets.

@antnieszka
antnieszka / temporary_venv.py
Created November 1, 2019 22:36
Create python venv and install dependencies in temp dir
import os
import tempfile
import subprocess
dependencies = """
flake8
black
""".strip()
# create temporary directory for venv
@antnieszka
antnieszka / async_websocket.py
Last active December 12, 2019 19:02
Async websocket server with rabbit consumer
#!/usr/bin/env python3
import itertools
import os
import random
import aio_pika
import asyncio
import logging
import websockets
@antnieszka
antnieszka / Exclude_tables.md
Created August 18, 2020 12:09 — forked from utek/Exclude_tables.md
Define ignored tables in alembic.ini

Add this in your ini file:

[alembic:exclude]
tables = spatial_ref_sys

In env.py:

def exclude_tables_from_config(config_):
    tables_ = config_.get("tables", None)

if tables_ is not None: