Skip to content

Instantly share code, notes, and snippets.

View 0bserver07's full-sized avatar
:shipit:
Coding Agents & Program Synthesis

Yad Konrad 0bserver07

:shipit:
Coding Agents & Program Synthesis
View GitHub Profile
@0bserver07
0bserver07 / env.py
Created June 12, 2017 18:09 — forked from logston/env.py
A snippet for getting Alembic to recognize multiple model classes in multiple modules
# Inspired by http://liuhongjiang.github.io/hexotech/2015/10/14/alembic-support-multiple-model-files/
def combine_metadata():
from sqlalchemy import MetaData
import models # models file into which all models are imported
model_classes = []
for model_name in models.__all__:
model_classes.append(getattr(models, model_name))
@0bserver07
0bserver07 / ImageMagick-snippets.md
Created November 21, 2016 03:17 — forked from MohamedAlaa/ImageMagick-snippets.md
ImageMagick Snippets

Remove white background color of an image in ImageMagick

$ convert  your.jpg  -transparent white  your.png

Flatten a transparent image with a white background: