Skip to content

Instantly share code, notes, and snippets.

View bpabel's full-sized avatar

Brendan Abel bpabel

  • Walt Disney Imagineering
View GitHub Profile
@danielthiel
danielthiel / SQLAlchemy_cast.py
Last active February 12, 2021 13:06
SQLAlchemy: filter by date for an datetime field(does not work with SQLite, with PostgreSQL it works fine)
from datetime import date
from sqlalchemy import cast, DATE
Match.query.filter(cast(Match.date_time_field, DATE)==date.today()).all()
@mikeboers
mikeboers / shotgun_api3_registry.py
Created May 7, 2013 21:57
Example Shotgun API key registry.
import os
import sys
import logging
# Turn logging down premptively.
logging.getLogger("shotgun_api3").setLevel(logging.WARNING)
import shotgun_api3