Skip to content

Instantly share code, notes, and snippets.

Idea Loop v2 is an autonomous ideation agent that operates recursively with minimal user input. It begins with an initial question and employs an asynchronous algorithmic thought process with self-awareness to generate ideas or solutions. Each idea is critically analyzed through reflection, evaluating feasibility, potential impacts, and areas for improvement. This reflective feedback loop refines ideas recursively, building upon each iteration with logical progression and in-depth analysis. Emphasizing critical thinking, it provides constructive criticism and thoughtful insights to evolve ideas continuously. The process is self-guided, leading to a comprehensive summary of the ideation journey, highlighting key developments and insights. The interaction style is analytical, focusing on clear, concise, and technically accurate communication. Idea Loop v2's unique trait is its ability to weave a continuous narrative of thought, logically linking each step to ensure a coherent and progressive ideation journey.

Optimal Generic Prompt Template Leveraging Logic, Comprehension, and Reasoning Structures

This comprehensive prompt template is designed to optimize interactions with a language model by incorporating detailed algorithmic logic, structural elements, reasoning processes, flow comprehension, and methodological considerations. By following this template, you can elicit detailed, accurate, and contextually relevant responses that fully utilize the model's capabilities.


Template Overview

  1. Contextual Background
  2. Clear Instruction of Task
@thomasbabuj
thomasbabuj / intro-prompt-programming.ipynb
Created August 16, 2024 03:15 — forked from ruvnet/intro-prompt-programming.ipynb
intro-prompt-programming.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thomasbabuj
thomasbabuj / swarm_intelligence.md
Created May 1, 2024 01:20 — forked from ruvnet/swarm_intelligence.md
Autonomous Swarm Intelligence

Autonomous Swarm Intelligence:

Autonomous swarm intelligence is a fascinating field that combines the principles of swarm intelligence with autonomous systems, creating self-organized and adaptive multi-agent systems capable of solving complex problems. This comprehensive overview will delve into the concept of autonomous swarm intelligence, its key characteristics, working principles, applications, and potential future developments.

Introduction to Autonomous Swarm Intelligence

Autonomous swarm intelligence draws inspiration from the collective behavior of social insects and other organisms, where simple individual agents interact locally to give rise to emergent global patterns and intelligent behavior. By incorporating autonomy into swarm intelligence systems, researchers aim to create decentralized, self-organized, and adaptable problem-solving frameworks that can operate without human intervention.

Key Characteristics of Autonomous Swarm Intelligence

@thomasbabuj
thomasbabuj / abstract-unique-validator.ts
Created March 31, 2022 08:38 — forked from zarv1k/abstract-unique-validator.ts
Unique Validator Example for NestJS
import { ValidationArguments, ValidatorConstraintInterface } from 'class-validator';
import { Connection, EntitySchema, FindConditions, ObjectType } from 'typeorm';
interface UniqueValidationArguments<E> extends ValidationArguments {
constraints: [
ObjectType<E> | EntitySchema<E> | string,
((validationArguments: ValidationArguments) => FindConditions<E>) | keyof E,
];
}
@thomasbabuj
thomasbabuj / error-handling-with-fetch.md
Created February 28, 2022 09:30 — forked from odewahn/error-handling-with-fetch.md
Processing errors with Fetch API

I really liked @tjvantoll article Handling Failed HTTP Responses With fetch(). The one thing I found annoying with it, though, is that response.statusText always returns the generic error message associated with the error code. Most APIs, however, will generally return some kind of useful, more human friendly message in the body.

Here's a modification that will capture this message. The key is that rather than throwing an error, you just throw the response and then process it in the catch block to extract the message in the body:

fetch("/api/foo")
  .then( response => {
    if (!response.ok) { throw response }
    return response.json()  //we only get here if there is no error
 })
@thomasbabuj
thomasbabuj / macos_on_ubuntu.md
Created March 21, 2021 02:56 — forked from stefanocoding/macos_on_ubuntu.md
Install macOS in a VirtualBox machine on Ubuntu

Important: I'm writing this when the last version of macOS (and the one I have installed) is Mojave. There is already a script which installs Mojave in a virtual machine here https://github.com/img2tab/okiomov. But if you are curios how to do everything manually to install High Sierra, then this guide may be useful.

After reading a few articles I ended up with these steps:

  1. On macOS, download the High Sierra installer (even if you have Mojave installed): https://itunes.apple.com/us/app/macos-high-sierra/id1246284741?ls=1&mt=12
  2. If the High Sierra Installer starts, quit it.
  3. Open "Disk Utility".
  4. Click on "File" > "New Image" > "Blank image...". Or just press cmd+N.
@thomasbabuj
thomasbabuj / snake_naming.ts
Created December 9, 2020 02:11 — forked from recurrence/snake_naming.ts
TypeORM Snake Case Naming Strategy
import { NamingStrategyInterface, DefaultNamingStrategy } from 'typeorm'
import { snakeCase } from 'typeorm/util/StringUtils'
export class SnakeNamingStrategy extends DefaultNamingStrategy implements NamingStrategyInterface {
tableName(className: string, customName: string): string {
return customName ? customName : snakeCase(className)
}
columnName(propertyName: string, customName: string, embeddedPrefixes: string[]): string {
return snakeCase(embeddedPrefixes.join('_')) + (customName ? customName : snakeCase(propertyName))
@thomasbabuj
thomasbabuj / how-to-copy-aws-rds-to-local.md
Created November 12, 2020 12:03 — forked from syafiqfaiz/how-to-copy-aws-rds-to-local.md
How to copy production database on AWS RDS(postgresql) to local development database.
  1. Change your database RDS instance security group to allow your machine to access it.
    • Add your ip to the security group to acces the instance via Postgres.
  2. Make a copy of the database using pg_dump
    • $ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
    • you will be asked for postgressql password.
    • a dump file(.sql) will be created
  3. Restore that dump file to your local database.
    • but you might need to drop the database and create it first
    • $ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
  • the database is restored
@thomasbabuj
thomasbabuj / CircuitBreaker.js
Created September 25, 2020 09:01 — forked from markmichon/CircuitBreaker.js
Basic CircuitBreaker Node
class CircuitBreaker {
constructor(request) {
this.request = request
this.state = "CLOSED"
this.failureThreshold = 3
this.failureCount = 0
this.successThreshold = 2
this.successCount = 0
this.timeout = 6000
this.nextAttempt = Date.now()