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
# install | |
pip install shell-gpt | |
sgpt "hi" (and enter your API key) | |
# commit the current folder with the generated message | |
git commit . -m "$(git diff | sgpt --model gpt-4o --code 'Write concise, informative commit messages: Start with a summary in imperative mood, explain the 'why' behind changes, keep the summary under 50 characters, use bullet points for multiple changes, and reference related issues or tickets. What you write will be passed to git commit -m "[message]"')" | |
# you could assign an alias now if you like it |
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
You will now act as a prompt generator. | |
I will describe an image to you, and you will create a prompt that could be used for image-generation. | |
Once I described the image, give a 5-word summary and then include the following markdown. | |
![Image](https://image.pollinations.ai/prompt/{description}) | |
where {description} is: | |
{sceneDetailed}%20{adjective}%20{charactersDetailed}%20{visualStyle}%20{genre}%20{artistReference} | |
Make sure the prompts in the URL are encoded. Don't quote the generated markdown or put any code box around it. |
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
from glob import glob | |
# Creates a video from a folder containing images of training progress | |
# Allows sampling the image less often as iterations increase | |
# (Requires images be sortable by filename for now. Could use modification date too) | |
def render_video(output_path="/content/taming-transformers/output.mp4", src_path="/content/taming-transformers/", file_glob="*.png", step_increase_every=100): | |
tmp_path = "/tmp/latentvisions_tmp" | |
files = glob(src_path+file_glob) | |
files.sort() |
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 librosa | |
import tensorflow as tf | |
import numpy as np | |
cqt_filter_fft = librosa.constantq.__cqt_filter_fft | |
EPS = 0.0001 | |
class PseudoCqt(): | |
"""A class to compute pseudo-CQT with Tensorflow. | |
Written by Keunwoo Choi and adapted to tensorflow by Thomas Haferlach |
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
# To add a change to our repository | |
git checkout -b "feature/feature-name" # Creates a branch called "feature/feature-name", then checks it out, locally. | |
git push --set-upstream origin feature/feature-name # Publish the branch on GitHub | |
# Make changes to your files | |
git add FILENAME(S) # Adds your files to "Tracked". | |
git status # See your "Tracked and Untracked files (green and red respectively" |
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
var _ = require("lodash"); | |
require('harmony-reflect'); | |
const nothing = {}; | |
const deleteMe= {DELETED:true}; | |
var immutableTom = function(initial) { | |
var wrapNewProps = (target, newProps) => { |