Skip to content

Instantly share code, notes, and snippets.

View M49ICKPIxi3's full-sized avatar

Clair Marie M49ICKPIxi3

View GitHub Profile
@M49ICKPIxi3
M49ICKPIxi3 / fine_tuned_general_QA.py
Created October 10, 2021 20:40
Easy to use script for pulling answered questions from the stackexchange api
import requests
from bs4 import BeautifulSoup
from helpers.simple_mongo import SimpleMongo
from stackapi import StackAPI
import jsonlines
import openai
import os
@M49ICKPIxi3
M49ICKPIxi3 / unique_filename.py
Created September 22, 2021 03:24
Creates a non-horrible-looking unique filename that's checked to not exist, easily editable to taste. Modification of this response https://stackoverflow.com/a/15746092/6194588
import os
from random import sample
from string import digits, ascii_uppercase, ascii_lowercase
# Checking the directory itself needs to be done prior to invocation, something like this would work depending on use
# if not os.path.exists(output_dir): os.mkdir(output_dir)
def unique_filename(output_dir, name, suffix='.txt', length=8):
break_recursion = 100 # just in case...
@M49ICKPIxi3
M49ICKPIxi3 / codex_input_prompts.txt
Created September 16, 2021 02:36
Adding imports significantly guides the responses. This uses Codex (Gpt-3)
1st Attempt:
"""
SimilarSentence uses word and sentence embeddings and prints the most similar lines of text relative to it's input
"""
2nd Attempt:
"""
SimilarSentence uses word and sentence embeddings and prints the most similar lines of text relative to it's input
@M49ICKPIxi3
M49ICKPIxi3 / System Design.md
Created October 4, 2018 18:51 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?