Skip to content

Instantly share code, notes, and snippets.

@cirolini
cirolini / openai-cooking-assistant-with-tools.py
Created April 16, 2025 14:28
A simple, interactive example demonstrating how to integrate OpenAI's GPT model with function calling to create a cooking assistant that suggests recipes based on ingredients provided by the user.
import os
import json
from openai import OpenAI
# -------------------------------
# Conversation history (memory)
# -------------------------------
conversation = []
# -------------------------------
@SamStudio8
SamStudio8 / acct_parse.py
Last active November 28, 2023 16:12
SGE QACCT Parsing
"""
Provides functions for the purpose of parsing a Sun Grid Engine (SGE)
accounting file for job metadata.
"""
__author__ = "Sam Nicholls <msn@aber.ac.uk>"
__copyright__ = "Copyright (c) Sam Nicholls"
__version__ = "0.0.32"
__maintainer__ = "Sam Nicholls <msn@aber.ac.uk>"