Skip to content

Instantly share code, notes, and snippets.

import axios from 'axios';
// Canvas API settings
const canvasApiUrl = 'https://canvas.instructure.com/api/v1';
const apiKey = 'The API Key';
const headers = {
'Authorization': `Bearer ${apiKey}`
};

Example AI Project Design Document

1. Project Overview

Project Name:

AI Multi-Agent System for Automated Customer Support

Project Goal:

Develop an AI-driven multi-agent system to provide efficient and personalized customer support.

Collisions

Box Collisions

Box collisions are an essential concept in game development, particularly when dealing with 2D physics. A box collision occurs when two boxes (game objects) overlap or intersect with each other in a game world. To handle box collisions, you typically follow these steps:

  1. Defining collision boxes: First, you need to define the collision boxes for your game objects. These boxes are usually rectangles or axially-aligned bounding boxes (AABBs) that enclose the objects. You can store the position (x, y), width, and height of each collision box.

  2. Checking for collisions: Next, you need to check for collisions between the boxes in your game world. You can do this by comparing the position and dimensions of each box. If two boxes overlap, you have a collision.

# app.py
from flask import Flask, request, jsonify, redirect, g
import sqlite3
import string
import random
import os

app = Flask(__name__)
DATABASE = 'urls.db'

Install ArchCraft the easy way!

  • download ArchCraft iso
  • download Etcher
  • run etcher and select the iso, and a pendrive to put it on (will erase the data on pendrive ~5mins)
  • put pendrive in usb of your and turn on and hit whatever button for boot menu on your computer, sometimes f2 / f10/ f12 but your mileage will vary
  • select to boot nvidia efi / whichever gpu you have.
  • select install from the welcome screen
  • choose timezone, location, keyboard, username computer name etc;
  • select partition to install on
  • make a coffee while waiting for install to finish (12mins)

AI Projects Ideation List

AI Projects using Agents, RAG, OpenAI Langraph, and LangChain

  1. Personalized News Aggregator

    • Build an agent that curates personalized news articles based on the user's interests. Use RAG to retrieve relevant information from various news sources and OpenAI Langraph for natural language understanding and summarization.
  2. Intelligent Customer Support Bot

    • Develop a customer support chatbot that can understand and resolve customer queries. Utilize LangChain for dialogue management, RAG for fetching relevant support articles, and OpenAI Langraph for generating natural responses.

Step 1: Setting Up the Environment

First, we need to install Pygame if it's not already installed. You can do this by running:

pip install pygame

Step 2: Importing Required Modules

At the beginning of our script, we import necessary modules from Pygame:

Recommended Workflow for Python Project with Docker

1. Set Up Project Directory

mkdir my_project
cd my_project

2. Create Virtual Environment (Optional for Local Development)

Recommended Workflow for Python Project with Docker

1. Set Up Project Directory

mkdir my_project
cd my_project

2. Create Virtual Environment (Optional for Local Development)

Chat Agent with Persistent Conversations

To create a custom chat agent with persistent conversation contexts, you have several options for storing and managing the conversation data. Both SQL and graph databases can be used effectively, depending on your specific requirements and preferences. Here’s a detailed comparison and guidance on implementing persistence with each type:

SQL Database Implementation

A SQL database is a good choice if your data model is relatively simple and you prefer a structured, relational approach. Here’s how you could implement it:

1. Schema Design

  • Users Table: Stores user information.
  • Conversations Table: Stores conversation metadata, including a reference to the user.