Skip to content

Instantly share code, notes, and snippets.

View PrashamTrivedi's full-sized avatar
🏠
Working from home

Prasham Trivedi PrashamTrivedi

🏠
Working from home
View GitHub Profile
@disler
disler / README.md
Last active April 9, 2025 22:08
Four Level Framework for Prompt Engineering
@codingthefuturewithai
codingthefuturewithai / yt-aider-cursor-windsurf-tutorial-prompts.md
Created November 19, 2024 02:02
Prompts from YouTube tutorial: Aider, Cursor, Windsurf: Build Apps with a SINGLE prompt, NO coding!

Sequential Prompts from Original RAG with aider and Claude 3.5 Sonnet Tutorial

LangChain RAG App Prompts

Initial RAG App Setup

Prompt: Use the LangChain RAG tutorial documentation, which I provided to you previously, to generate a simple RAG app in Python that uses the LangChain v0.2 framework. The app will allow the user to provide the URL for a web page and ask questions related to the contents of the page. The user interface will be the command line for now. The app should use OpenAI models and APIs. Generate all the required files, functions, methods, imports, etc. but don't implement any functions yet. Instead, just insert comments. Also, generate the Python requirements.txt file. Only implement the features I've requested.


Cody AI Prompts

Generate Requirements for an Idea: I have an idea for a new software project. If I haven't already given my idea to you, ask me to provide it before proceeding.

Using my project idea, generate a set of core requirements. Keep the requirements simple and focused on the aspects that are most likely to impact the architecture.

Present the list of requirements in an organized manner. Categorize as appropriate. Give each core feature a unique number I can use later to refer back to that feature.

Give me this in markdown format and offer to let me insert your generated content into a new file.

@LouisCAD
LouisCAD / LifecycleCoroutines.kt
Last active July 3, 2022 11:47
CoroutineScope and Job integration with Lifecycle for Android. Meant to be used for your coroutines in lifecycle aware components. OUTDATED. See up to date implementation here: https://github.com/LouisCAD/Splitties/tree/master/modules/lifecycle-coroutines
import android.arch.lifecycle.GenericLifecycleObserver
import android.arch.lifecycle.Lifecycle
import android.arch.lifecycle.Lifecycle.Event.ON_DESTROY
import android.arch.lifecycle.LifecycleOwner
import kotlinx.coroutines.experimental.CoroutineScope
import kotlinx.coroutines.experimental.Dispatchers
import kotlinx.coroutines.experimental.Job
import kotlinx.coroutines.experimental.android.Main
fun Lifecycle.createJob(cancelEvent: Lifecycle.Event = ON_DESTROY): Job {
@alexjlockwood
alexjlockwood / ObjectAnimatorCompat.java
Last active January 1, 2018 10:52
ObjectAnimator motion along a path for pre-Lollipop devices (https://j.mp/object-animator-path-motion)
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.graphics.Path;
import android.graphics.PathMeasure;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import java.util.ArrayList;
import java.util.List;
@CodingDoug
CodingDoug / README.md
Last active October 3, 2020 20:18
Uploading images to Cloud Storage via the web and identifying them with Google Cloud Vision API

Uploading images to Cloud Storage via the web and identifying them with Google Cloud Vision API

If you're trying to do this, you came to the right place!

Watch this code work in real time: https://twitter.com/CodingDoug/status/945035556555186176

Setup

These instructions assume that you already have a Firebase project, and billing is enabled. Billing is required to use the Vision API.

@android10
android10 / README.md
Last active November 29, 2020 00:50
Keep a FORKED repository synced with UPSTREAM on Github

Configure a remote that points to the upstream repository in Git.

  • List the current configured remote repository for your fork.
git remote -v
origin  [email protected]:YOUR_USERNAME/YOUR_FORK.git (fetch)
origin  [email protected]:YOUR_USERNAME/YOUR_FORK.git (push)
<scheme name="Material Dark" version="142" parent_scheme="Darcula">
<!--
1. Install the Roboto Mono Regular font - https://fonts.google.com/specimen/Roboto+Mono?selection.family=Roboto+Mono
2. Copy `Material Dark.icls` to `~/Library/Preferences/AndroidStudio3.0/colors/`
3. Restart AS
4. Preferences > Editor > Color and Fonts > select Material Dark and press OK
-->
<option name="FONT_SCALE" value="1.0" />
@florina-muntenescu
florina-muntenescu / BaseDao.kt
Last active January 1, 2025 06:52
Use Dao inheritance to reduce the amount of boilerplate code - https://medium.com/google-developers/7-pro-tips-for-room-fbadea4bfbd1
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
#!/bin/sh
# Copy templates to Android Studio in default location
TMP_PATH=`pwd`
TEMPLATES_PATH="/Applications/Android Studio.app/Contents/plugins/android/lib/templates/other"
DIRS=`find $TMP_PATH -type d -maxdepth 1 -not -name '.*' -not -path $TMP_PATH`
for f in $DIRS