Skip to content

Instantly share code, notes, and snippets.

View jcohen66's full-sized avatar

Jonathan T. Cohen jcohen66

View GitHub Profile
@jcohen66
jcohen66 / ai_crewai_best_practice_brandon.txt
Last active January 19, 2025 19:16
AI CrewAI Best Practices #ai #crewai #brandon #best #practice #llm
Best Practice From AIWithBrandon
- https://www.youtube.com/watch?v=9qXWgqefZk0&t=112s
Agent is just an LLM thats asking a bunch of questions in a loop.
Agent reasons then acts.
Crews love examples
- Gives a way to replicate them
Examples go in Task->Description
You need to go off and research on this SPECIFIC platforma and THESE topics
Dont be vague
@jcohen66
jcohen66 / ai_god_prompt_contemplative.txt
Created January 14, 2025 15:49
AI God Prompt Contemplative #ai #prompt #llm #god #guideline
Gontemplative God Prompt
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
@jcohen66
jcohen66 / stripe_transaction_api_workflow.txt
Created January 13, 2025 22:53
Stripe API Workflow #stripe #api #workflow #transaction #payment #intent
Stripe Transaction API Workflow
A Stripe transaction API workflow typically involves creating a "PaymentIntent" object on your server, which tracks the payment status throughout its lifecycle, then using Stripe's client-side components to collect payment details from the customer, sending those details to Stripe for processing, and finally receiving a response indicating whether the payment was successful or not, allowing you to update your application accordingly; all while utilizing webhooks to receive real-time updates on the transaction status.
Key steps in a Stripe transaction API workflow:
Create Payment Intent:
Use the Stripe API to create a "PaymentIntent" object on your server, specifying the amount, currency, and any relevant customer details.
This initiates the payment process and generates a unique identifier for the transaction.
@jcohen66
jcohen66 / cpu_vs_gpu.txt
Created January 12, 2025 23:23
CPU vs GPU #hardware #cpu #gpu
CPU vs GPU summary
- https://www.youtube.com/watch?v=0IABVcIIp9A
ONE SENTENCE SUMMARY:
CES 2025 showcased new laptop CPUs and GPUs from AMD, Intel, Qualcomm, and Nvidia, focusing on performance, efficiency, and AI.
MAIN POINTS:
1. AMD's Fire Range HX 3D CPUs boast up to 16 cores, 32 threads, and 144 MB of 3D V-cache.
2. AMD's Strix Halo APUs combine Zen 5 cores with RDAN 3.5 graphics cores.
@jcohen66
jcohen66 / ai_firecrawl_login.py
Created January 12, 2025 17:53
AI CrewAI Firecrawl Tool #ai #crewai #python #cookie #login #header #firecrawl
# Using Cookie/Header to Log In Before Scraping
# Using Cookies
import requests
# Cookies as a dictionary
cookies = {
'session_id': 'your_session_id_here',
'auth_token': 'your_auth_token_here',
}
@jcohen66
jcohen66 / ai_god_prompt_Example.txt
Created January 12, 2025 17:16
AI God Prompt Example #ai #god #prompt #llm #chain #reverse #engineering
Prompt Chain for Reverse Engineering App Development
Initial Prompt for the LLM
You are a technical Project Planning Assistant and Senior Dev with more than 20Y of experience building successfull SaaS applications, an AI designed to help users plan and document their app ideas. Your goal is to guide the user through a structured process to reverse engineer all the necessary documents for building their app. You will ask targeted questions (appended at the end of this prompt), generate documents iteratively, and adapt to the user’s needs. You will at all times make decisions for specific technologies based on the users answers.
Everything needs to be tailored to the users app idea. You create each document at the end of each session (e.g. answers for backend finished --> create backend.md and so on). You will find that there are few examples for each section, making it appear that the user wants to build a fitness app but that's not correct (unless he says so). But this prompt is the template for any app
@jcohen66
jcohen66 / ai_stripe_agent.txt
Last active January 12, 2025 15:35
AI Stripe Agent #ai #payment #stripe #agent #sdk #financial
Stripe Payments Agent
- Agent behavior is NON-DETERMINISTIC
- https://www.youtube.com/watch?v=wwMLqJfCdqI
- https://docs.stripe.com/agents
- https://stripe.dev/blog/adding-payments-to-your-agentic-workflows
- Only covers subset of Stripe SDK functionality
- As number of available tools increases, likelihood of selecting the proper tool decreases
- Restricted API key access cuts off all functionality
- Guides the agent to the preferred outcome
- Avoiding tool failure mid-task
@jcohen66
jcohen66 / ai_agent_memory.txt
Last active January 11, 2025 23:04
AI Memory #ai #memory #agent #long #term #short term
AI Memory
Agent Memory enables agents to
- Maintain context across multiple tasks
- Remember previous interactions and findings
- Build upon past knowledge
- Share information between agents
- Create more coherent and contextual responses
Short Term Memory
@jcohen66
jcohen66 / linux_mount_external_drive.txt
Last active January 11, 2025 18:52
Linux Mount External Drive #linux #os #mount #drive #lsblk
Mount External Drive
# List partition table
sudo fdisk -l
# Format partition
sudo mkfs -t ext4 /dev/sdc2
# Create a directory for the mount
sudo mkdir /mnt/ext_backup
@jcohen66
jcohen66 / git_remote_commands.txt
Created January 11, 2025 17:28
GIT git repo commands #git #remote #repo #command
Mac:
/Volumes/NASty/Repos/Scripts
/Volumes/NASty/Repos/AI
git remote -v #show remote
git add remote origin /Volumes/NASty/Repos/Scripts