This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"sections": [ | |
{ | |
"title": "Introduction and Utility of ChatGPT", | |
"summary": [ | |
"The use of ChatGPT has significantly impacted the guest's personal and professional life, offering assistance in learning languages, understanding complex topics, and enhancing travel experiences.", | |
"ChatGPT can act as a universal translator, providing assistance with menu selection in foreign countries and helping identify unknown plants or animals.", | |
"The tool is seen as an integral part of life, deeply intertwined with the user's ability to work efficiently and learn new information." | |
], | |
"quotes": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"sections": [ | |
{ | |
"title": "Tyler Cowen's use of ChatGPT", | |
"summary": [ | |
"Uses ChatGPT on iPhone as a universal translator when traveling in foreign countries", | |
"Uses it to read menus, identify plants and animals, and get recommendations", | |
"On laptop, uses it to learn about obscure history and get background context for interviews", | |
"Asks follow-up questions to probe deeper and fact-check potential hallucinations" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from time import sleep | |
from openai import OpenAI | |
client = OpenAI( | |
# defaults to | |
api_key=os.environ.get("OPENAI_API_KEY"), | |
) | |
# Step 1: Create an Assistant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; emacs-gpt.el -- Control Emacs via ChatGPT | |
;; | |
;; Basic idea: take natural language input from user, ask ChatGPT for | |
;; corresponding elisp, run it. | |
(defun mark-between-assistant-and-user () | |
"Mark the region between \"%assistant%\" and \"%user%\", not including those strings." | |
(interactive) | |
(goto-char (point-min)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# Takes a chat transcript (for ChatGPT) on stdin, calls the OpenAI | |
# ChatGPT API, and prints the response on stdout. | |
# | |
# Your OpenAI API key must be set in the environment variable | |
# OPENAI_API_KEY. | |
# | |
# Logs are written to ~/chat.log. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Emacs Lisp wrapper around Python scripts for ChatGPT. | |
;; | |
;; Basic idea is to send buffer as stdin to Python script. | |
(defvar gpt-script "/Users/haldar/haskell/gpt_turbo/chat.py") | |
(defun vh/invoke-chat () | |
"Send contents of current buffer as stdin to command, then append output to current buffer." | |
(interactive) | |
(let* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
devenv.sh: | |
{ pkgs, ... }: | |
{ | |
env.GREET = "Python-based dev env for copy-pics"; | |
languages.python = { | |
enable = true; | |
poetry.enable = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import whisper | |
import sys | |
import string | |
import math | |
from stable_whisper import modify_model | |
from stable_whisper import stabilize_timestamps | |
from stable_whisper import results_to_word_srt | |
from stable_whisper import results_to_word_srt | |
from moviepy.editor import AudioClip, VideoFileClip, concatenate_videoclips |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import math | |
import sys | |
from moviepy.editor import AudioClip, VideoFileClip, concatenate_videoclips | |
# Get average RGB of part of a frame. Frame is H * W * 3 (rgb) | |
# Assumes x1 < x2, y1 < y2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Based on a script by Donald Feury | |
# https://gitlab.com/dak425/scripts/-/blob/master/trim_silenceV2 | |
# https://youtu.be/ak52RXKfDw8 | |
import math | |
import sys | |
import subprocess | |
import os |
NewerOlder