Skip to content

Instantly share code, notes, and snippets.

View scharf's full-sized avatar

Michael Scharf scharf

View GitHub Profile
@disler
disler / ADA_v2_README.md
Created April 17, 2024 18:01
Personal AI Assistant: 'Ada' - v0.2

This is not working complete code.

This is strictly a v0.2, scrapy, proof of concept version of a personal AI Assistant working end to end in just ~726 LOC.

This is the second iteration showcasing the two-way prompt aka multi-step human in the loop. The initial, v0, assistant version is here.

It's only a frame of reference for you to consume the core ideas of how to build a POC of a personal AI Assistant.

To see the high level of how this works check out the explanation video. To follow our agentic journey check out the @IndyDevDan channel.

@disler
disler / README.md
Last active May 22, 2024 07:27
Personal AI Assistant: 'Ada' - v0

This is not working complete code.

This is strictly a v0, scrapy, proof of concept for the first version of a personal AI Assistant working end to end in just ~322 LOC.

It's only a frame of reference for you to consume the core ideas of how to build a POC of a personal AI Assistant.

To see the high level of how this works check out the explanation video. To follow our agentic journey check out the @IndyDevDan channel.

Stay focused, keep building.

@disler
disler / standards_for_true_ai_coding_assistants.md
Created January 21, 2024 16:30
Standards For True AI Coding Assistants

What is an AI Coding Assistant?

If the coding assistant can't run ITERATIVE CRUD on ALL of your code, it's not a True AI Coding Assistant (TACA)

Standards for TRUE AI Coding Assistants

  1. Must work on existing codebases
  2. Must have a file context mechanism
  3. Must be iteratively controllable
@ninely
ninely / main.py
Last active May 13, 2024 19:01
Langchain with fastapi stream example
"""This is an example of how to use async langchain with fastapi and return a streaming response.
The latest version of Langchain has improved its compatibility with asynchronous FastAPI,
making it easier to implement streaming functionality in your applications.
"""
import asyncio
import os
from typing import AsyncIterable, Awaitable
import uvicorn
from dotenv import load_dotenv
@aaronrogers
aaronrogers / AzureLLM.ts
Created April 3, 2023 17:14
A simple, proof-of-concept Azure LLM for [Langchain.js](https://js.langchain.com/docs/).
import { BaseLLM } from 'langchain/llms'
import { CallbackManager } from 'langchain/callbacks'
import { LLMResult } from 'langchain/schema'
import { encoding_for_model, TiktokenModel } from '@dqbd/tiktoken'
export class AzureLLM extends BaseLLM {
name = 'AzureLLM'
batchSize = 20
temperature: number
concurrency?: number
@SKempin
SKempin / Git Subtree basics.md
Last active May 16, 2024 20:38
Git Subtree basics

Git Subtree Basics

If you hate git submodule, then you may want to give git subtree a try.

Background

When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.

When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.

Adding a subtree

Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:

@chrishowes
chrishowes / gist:70d35ea122ed921c7fc8
Created October 20, 2015 22:46
List of environment variables for MeteorJS
process.env.APP_ID
process.env.APP_MONGO
process.env.AUTOUPDATE_VERSION
process.env.BIND_IP
process.env.CONSTRAINT_SOLVER_BENCHMARK
process.env.DDP_DEFAULT_CONNECTION_URL
process.env.DEPLOY_DOMAIN
process.env.DEPLOY_HOSTNAME
process.env.DISABLE_WEBSOCKETS
process.env.DISCOVERY_PORT
@circuitBurn
circuitBurn / tail_oplog.py
Last active August 7, 2023 13:22
Use pymongo 3.0 to tail MongoDB's oplog
# Adapted from the example here: https://jira.mongodb.org/browse/PYTHON-735
# to work with pymongo 3.0
import pymongo
from pymongo.cursor import CursorType
c = pymongo.MongoClient()
# Uncomment this for master/slave.
oplog = c.local.oplog['$main']
@BastinRobin
BastinRobin / Email.txt
Created March 21, 2015 06:48
Generic Email List
1033edge.com
11mail.com
123.com
123box.net
123india.com
123mail.cl
123qwe.co.uk
150ml.com
15meg4free.com
163.com
@zmwangx
zmwangx / README.md
Last active March 14, 2022 13:02
simple Twitter image crawler based on Tweepy

To use this program, put your Twitter OAuth credentials in ~/.config/twitter/oauth.json (or customize this path in tw-init.py). oauth.json should look like

{
    "consumer_key": "...",
    "consumer_secret": "...",
    "access_token": "...",
    "access_token_secret": "..."
}

See tw-init.py -h for usage. There are several external dependencies: