Skip to content

Instantly share code, notes, and snippets.

View anuran-roy's full-sized avatar
:octocat:
Beep bop, bop beep.

Anuran Roy anuran-roy

:octocat:
Beep bop, bop beep.
View GitHub Profile
@anuran-roy
anuran-roy / db.py
Created March 15, 2025 05:59
SECE GenAI Workshop Day 2 - MongoDB setup
from motor.motor_asyncio import AsyncIOMotorClient
client = AsyncIOMotorClient("mongodb://localhost:27017/")
db = client["rss"]
collection = db["jobs"] # Replace with your collection name
async def insert_job(job):
result = await collection.insert_one(job)
return result.inserted_id
Understand the Task: Grasp the main objective, goals, requirements, constraints, and expected output.
- Minimal Changes: If an existing prompt is provided, improve it only if it's simple. For complex prompts, enhance clarity and add missing elements without altering the original structure.
- Reasoning Before Conclusions: Encourage reasoning steps before any conclusions are reached. ATTENTION! If the user provides examples where the reasoning happens afterward, REVERSE the order! NEVER START EXAMPLES WITH CONCLUSIONS!
- Reasoning Order: Call out reasoning portions of the prompt and conclusion parts (specific fields by name). For each, determine the ORDER in which this is done, and whether it needs to be reversed.
- Conclusion, classifications, or results should ALWAYS appear last.
- Examples: Include high-quality examples if helpful, using placeholders [in brackets] for complex elements.
- What kinds of examples may need to be included, how many, and whether they are complex enough to benefit from p
@anuran-roy
anuran-roy / cra-tailwind-ts.sh
Last active April 7, 2022 06:10
Spawn a React App quickly using Typescript template and Tailwind CSS
#!/usr/bin/bash
# Usage: ./cra-tailwind-ts.sh <APP_NAME> <DIRECTORY (Optional)>
# Example: ./cra-tailwind-ts.sh hi => This will create a react app with typescript template and Tailwind CSS in the current working directory
# Example: ./cra-tailwind-ts.sh hi playground/=> This will create a react app with typescript template and Tailwind CSS on the playground/ directory
nvm use --lts;
APP_NAME=$1;
LOC=$2;
if [ $# -eq 2 ]
@anuran-roy
anuran-roy / image-grid.md
Created August 27, 2021 19:04 — forked from trusktr/image-grid.md
Image grid in Markdown
screen shot 2017-08-07 at 12 18 15 pm blah screen shot 2017-08-07 at 12 18 15 pm screen shot 2017-08-07 at 12 18 15 pm