Skip to content

Instantly share code, notes, and snippets.

@kylemcdonald
kylemcdonald / function-calling.ipynb
Created June 14, 2023 01:10
Example of OpenAI function calling API to extract data from LAPD newsroom articles.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AkiraKito
AkiraKito / gist:4064958
Created November 13, 2012 09:56
Make the query only for the hours and minutes (datetime.time object) using SQLAlchemy
# -*- coding: utf-8 -*-
from sqlalchemy import Column, Time, Integer, Boolean, create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
# SQL statements and expressions API
# cf. http://docs.sqlalchemy.org/en/rel_0_7/core/expression_api.html
from sqlalchemy import and_, extract