This file contains hidden or 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
# ChatGPT in terminal with multiple line, markdown highlight and keybind. | |
# requirements - pip install openai==1.3.5 rich==13.7.0 prompt-toolkit==3.0.39 | |
# keybind: ctrl+c - clear input or exit, f1 - new line, enter - send message | |
# commands: clear - clear context | |
from openai import OpenAI | |
from prompt_toolkit import prompt | |
from prompt_toolkit.key_binding import KeyBindings | |
from rich.console import Console | |
from rich.live import Live |
This file contains hidden or 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
# Creates previews for videos - random short snippets of 2 seconds each | |
# pip install moviepy==1.0.3 | |
# use python video.py <input_video_path> <output_video_name> <duration_in_seconds> | |
from moviepy.video.compositing.concatenate import concatenate_videoclips | |
from moviepy.editor import VideoFileClip | |
import sys | |
import random | |
import argparse |
This file contains hidden or 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
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"blocks": [ | |
{ | |
"alignment": "left", | |
"segments": [ | |
{ | |
"background": "#0077c2", | |
"foreground": "#ffffff", | |
"leading_diamond": "╭─", |