Skip to content

Instantly share code, notes, and snippets.

View JupyterJones's full-sized avatar

Jack Northrup JupyterJones

View GitHub Profile
@JupyterJones
JupyterJones / app_generator_v2_directions.txt
Last active May 17, 2025 16:17
this contains the code and directions for an AI teaching/learning Assistant it is extremely effective and makes learning fun for any topic
Guide: Generating and Using Topic-Specific Learning Assistant Backend
https://github.com/JupyterJones/frontend
This document outlines how to use the Flask-based App Generator to create new topic-specific FastAPI Backend Applications for your learning assistant project.1. OverviewThe system consists of two main Python scripts:Flask App Generator (app_builder.py - your second script):A Flask web application that provides a user interface to input a topic name and a structured prompt.It uses a master template (template_app_v2.py) to generate a new, customized FastAPI backend application tailored to the specified topic.It also creates necessary directories and the topic-specific structured prompt file.FastAPI Backend Template (template_app_v2.py - your first script):A comprehensive FastAPI application template designed to serve as a backend for a learning assistant.It includes features like Q&A with Gemini, conversation history, file management, vector search with ChromaDB, context-enhanced responses, conversati
@JupyterJones
JupyterJones / NOTE.py
Created December 8, 2024 20:08
This application, called "NOTE," is a lightweight command-line notes manager built using Python and SQLite.
#!/usr/bin/python3
import sys
import sqlite3
DATABASE = "notes.db"
conn = sqlite3.connect(DATABASE)
from datetime import datetime
conn.text_factory = str
c = conn.cursor()
if len(sys.argv) < 3:
print ("\n******* NOTE - Notes Editor ******")
@JupyterJones
JupyterJones / mk_zoom_videos.py
Created February 7, 2024 03:45
Create Zoom Videos from a Directory of Images
import subprocess
import numpy as np
import logging
import glob
import random
import uuid
# Set up logging
logging.basicConfig(level=logging.INFO, format='%(levelname)s - %(message)s')
def zoom_pan_nonlinear1(input_path, output_path):
@JupyterJones
JupyterJones / conversation_json_to_sessions_txt_html_sqlite_data.ipynb
Created January 17, 2024 04:20
convert ChatGPT conversations.json to sessions txt html and sqlite_data for searching
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JupyterJones
JupyterJones / quantize_mp4.py
Created December 28, 2023 09:42
quantize an entire video
import logging
from moviepy.editor import VideoFileClip, VideoClip, concatenate_videoclips
from PIL import Image
import numpy as np
from sklearn.cluster import KMeans
import random
import os
# Configure logging
logging.basicConfig(filename='script_log.log', level=logging.DEBUG)
@JupyterJones
JupyterJones / quantize_image.py
Created December 28, 2023 09:34
convert any image to a specified rgb array
from PIL import Image, ImageFilter
import os
import cv2
import random
import time
path = r"/home/jack/Desktop/HDD500/SCRIPTS/UGLY_DOLLS/"
#path = r"crawler4/"
base_image = random.choice([
x for x in os.listdir(path)
@JupyterJones
JupyterJones / diagonal_transitions.py
Created December 7, 2023 03:40
create diagonal transitions from a directory of images
#!/home/jack/miniconda3/envs/cloned_base/bin/python
import os
import subprocess
import random
from sys import argv
import uuid
import shutil
def diag_trans(DIR,output_file):
image_dir=DIR
# Get a list of image file names in the directory
@JupyterJones
JupyterJones / Add_Border_Sound_to_Existing_Video.py
Created November 3, 2023 14:46
Add_Border_Sound_to_Existing_Video
from moviepy.editor import VideoFileClip, AudioFileClip, CompositeVideoClip
import random
import glob
def add_title_image(video_path, title_image_path, output_path):
# Load the video file and title image
video_clip = VideoFileClip(video_path)
print(video_clip.size)
width, height = video_clip.size
@JupyterJones
JupyterJones / join3.sh
Created October 25, 2023 04:23
ffmpeg join multiple mp4s
#!/bin/bash
# Define the paths to your input videos
video1='0001.mp4'
video2='0002.mp4'
video3='0003.mp4'
output='real-fish_123.mp4'
# Create a text file to list the input videos
echo "file '$video1'" > input.txt
@JupyterJones
JupyterJones / text2png.sh
Created October 21, 2023 21:40
make a png from a text file
#!/bin/bash
convert -size 512x666 -background black -fill white -font /home/jack/fonts/Arimo-Regular.ttf -pointsize 30 -gravity center caption:@topic.txt -set delay 4 -loop 0 -coalesce -layers Optimize topic.png