Skip to content

Instantly share code, notes, and snippets.

View dewmal's full-sized avatar
🎨
Nothing

dewmal dewmal

🎨
Nothing
View GitHub Profile
@dewmal
dewmal / man_power_agency.py
Created March 11, 2026 15:32
Art Of Intelligence Community Agentic AI Project
from __future__ import annotations
import asyncio
import hashlib
import json
import os
import re
from dataclasses import dataclass, field
from datetime import datetime, timezone
from enum import Enum
import json
import os
import subprocess
import sys
import time
from pathlib import Path
from typing import Dict, List, Any
import json
import urllib.request
import urllib.error
from typing import Union

from fastapi import FastAPI

app = FastAPI()


@app.get("/")
def read_root():
@dewmal
dewmal / game2.py
Created August 15, 2024 17:07
Game Dev By Agent 1
import pygame
import sys
# Initialize Pygame
pygame.init()
# Constants
WIDTH, HEIGHT = 800, 600
WHITE = (255, 255, 255)
FPS = 60
@dewmal
dewmal / game.py
Created August 15, 2024 17:05
Game By All Agents
import pygame
import sys
# Constants
WIDTH, HEIGHT = 800, 600
BALL_RADIUS = 15
PADDLE_WIDTH, PADDLE_HEIGHT = 10, 100
WHITE = (255, 255, 255)
FPS = 60
# List of meat and sweet products
from faker import Faker
import random
import pandas as pd
# Initialize Faker
fake = Faker()
# Define number of records
num_records = 10000
@dewmal
dewmal / gist:ce9772e85b35ff62231ad1056a6eb94d
Created January 13, 2024 05:43
mvp class app github actions
name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
@dewmal
dewmal / openai_assistance_with_socketio.py
Created November 17, 2023 03:39
This script creates a WebSocket server with FastAPI and SocketIO, enabling real-time interactions with an OpenAI assistant. It handles client connections, message processing, and responses using asynchronous programming.
import asyncio
import os
import socketio
from fastapi import FastAPI
from openai import OpenAI
from socketio import AsyncNamespace
client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))
assistant = client.beta.assistants.retrieve(assistant_id=os.environ.get("OPENAI_ASSISTANT_ID"))

Act as a Linux Terminal

Contributed by: @f Reference: https://www.engraved.blog/building-a-virtual-machine-inside/

I want you to act as a linux terminal. I will type commands and you will reply with what
the terminal should show. I want you to only reply with the terminal output inside one 
unique code block, and nothing else. do not write explanations. do not type commands
unless I instruct you to do so. When I need to tell you something in English, 
I will do so by putting text inside curly brackets {like this}. My first command is pwd

image

Illuminate\Database\QueryException: SQLSTATE[42S22]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid column name 'id'. (SQL: update [candidate_has_internal_reviews] set [internal_review_status_id] = 2, [candidate_has_internal_reviews].[updated_at] = 2023-02-26 19:44:32.531 where [id] is null) in file /var/www/core/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 712

#0 /var/www/core/vendor/laravel/framework/src/Illuminate/Database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback('update [candida...', Array, Object(Closure)) #1 /var/www/core/vendor/laravel/framework/src/Illuminate/Database/Connection.php(533): Illuminate\Database\Connection->run('update [candida...', Array, Object(Closure)) #2 /var/www/core/vendor/laravel/framework/src/Illuminate/Database/Connection.php(466): Illuminate\Database\Connection->affectingStatement('update [candid