A simple wrapper for using aider to create commits with automatically generated messages using AI. Includes a few extra checks and outputs.
- Set up aider
- Add the function to your
~/.zshrc
or~/.bashrc
.
import pyaudio | |
import audioop | |
p = pyaudio.PyAudio() | |
stream = p.open(format=pyaudio.paInt16, | |
channels=1, | |
rate=44100, | |
input=True, | |
frames_per_buffer=1024) |
ChatGPT appeared like an explosion on all my social media timelines in early December 2022. While I keep up with machine learning as an industry, I wasn't focused so much on this particular corner, and all the screenshots seemed like they came out of nowhere. What was this model? How did the chat prompting work? What was the context of OpenAI doing this work and collecting my prompts for training data?
I decided to do a quick investigation. Here's all the information I've found so far. I'm aggregating and synthesizing it as I go, so it's currently changing pretty frequently.
""" | |
Toy demonstration of chain-of-thought and consensus prompting using OpenAI API. | |
© Riley Goodside 2022 | |
""" | |
import os | |
import re | |
from statistics import mode |
# Script for converting a HF Diffusers saved pipeline to a Stable Diffusion checkpoint. | |
# *Only* converts the UNet, VAE, and Text Encoder. | |
# Does not convert optimizer state or any other thing. | |
# Written by jachiam | |
import argparse | |
import os.path as osp | |
import torch |
import { useState, useEffect, useCallback } from 'react'; | |
export const useVisbilityState = () => { | |
const [visibilityState, setVisibilityState] = useState(null); | |
const handleVisbilityChange = useCallback(() => { | |
setVisibilityState(document.visibilityState); | |
}, [setVisibilityState]); | |
useEffect(() => { |
#!/usr/bin/env python3 | |
# Based on code from these stackoverflow answers: | |
# https://askubuntu.com/questions/60837/record-a-programs-output-with-pulseaudio/910879#910879 | |
import re | |
import subprocess | |
import sys | |
import os | |
import signal | |
from time import sleep |
import six | |
from peewee import Model, FieldAccessor | |
from playhouse.postgres_ext import BinaryJSONField | |
class GForeignKeyAccessor(FieldAccessor): | |
def get_rel_instance(self, instance): | |
value = instance.__data__.get(self.name) | |
model_name = value['model'] | |
rel_model = self.field.allowed_types[model_name] |
""" | |
Create train, valid, test iterators for CIFAR-10 [1]. | |
Easily extended to MNIST, CIFAR-100 and Imagenet. | |
[1]: https://discuss.pytorch.org/t/feedback-on-pytorch-for-kaggle-competitions/2252/4 | |
""" | |
import torch | |
import numpy as np |