Skip to content

Instantly share code, notes, and snippets.

@defeed
defeed / gist:f6f473c0cc2bc581d71eefe10def97b3
Created March 26, 2023 21:12
ChatGPT 4 feat. Midjourney 5
Hello! Today we are going to create Images with a Diffusion model.
I am going to feed you some information about it, ok?
-----------------------------------------------------------------
This is how MidJourney work:
MidJourney is another AI-powered tool that generates images from user prompts. MidJourney is proficient at adapting actual art styles to create an image of any combination of things the user wants. It excels at creating environments, especially fantasy and sci-fi scenes, with dramatic lighting that looks like rendered concept art from a video game. How does MidJourney work?
MidJourney is an AI image generation tool that takes inputs through text prompts and parameters and uses a Machine Learning (ML) algorithm trained on a large amount of image data to produce unique images. It is powered by Latent Diffusion Model (LDM), a cutting-edge text-to-image synthesis technique. Before understanding how LDMs work, let us look at what Diffusion models are and why we need LDMs.

Keybase proof

I hereby claim:

  • I am defeed on github.
  • I am tema (https://keybase.io/tema) on keybase.
  • I have a public key whose fingerprint is 22F0 35D0 F5BC AB08 030D 9AF9 7243 C13D 3E8A 8754

To claim this, I am signing this object:

@defeed
defeed / configuration.rb
Created March 5, 2015 07:09
Gem configuration
module MyAwesomeGem
Configuration = Struct.new(:foo, :bar, :baz) do
def initialize
self.foo = nil
self.bar = nil
self.baz = baz || 42
end
end
def self.configure
@defeed
defeed / list.rb
Created July 25, 2014 03:03
Movies and people lists for a user
# Table name: lists
#
# id :integer
# user_id :integer
# list_type :integer
# name :string(255)
class List < ActiveRecord::Base
enum list_type: [:movie, :person]
@defeed
defeed / .powrc
Last active August 29, 2015 13:56
Auto-switching Ruby version with RVM and Pow
# inside project directory
if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".rvmrc" ]; then
source "$rvm_path/scripts/rvm"
source ".rvmrc"
fi
@defeed
defeed / application_helper.rb
Created August 6, 2013 08:43
Rails helper method for an app per-page title.
def title
base_title = "Lorem Ipsum"
@title ? "#{@title} &ndash; #{base_title}".html_safe : base_title
end
@defeed
defeed / .bash_profile
Created December 1, 2011 19:52
Bash prompt with git branch name and colored status indicator
function git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\/\1/';
}
function git_status {
git diff --quiet HEAD &>/dev/null
[[ $? == 1 ]] && tput setaf 1 || tput setaf 5
}
# tput +
@defeed
defeed / .bash_profile
Created November 23, 2011 14:38 — forked from nesquena/.bash_profile
simple git branch ps1 with colored dirty state
# COLORS
LIGHT_GRAY="\[\033[0;37m\]"; BLUE="\[\033[1;36m\]"; RED="\[\033[0;31m\]"; LIGHT_RED="\[\033[1;31m\]";
GREEN="\[\033[0;32m\]"; WHITE="\[\033[1;37m\]"; LIGHT_GRAY="\[\033[0;37m\]"; YELLOW="\[\033[1;33m\]";
# GIT PROMPT (http://gist.github.com/120804)
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \(\1\)/';
}
function parse_git_status {
git status 2> /dev/null | sed -e '/(working directory clean)$/!d' | wc -l;
}
@defeed
defeed / promptcolor
Created November 23, 2011 14:13 — forked from jtmkrueger/promptcolor
color your prompt and show git branch
#color and git branch
parse_git_branch() {··
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export CLICOLOR=1
export GREP_OPTIONS="--color"
export LSCOLORS=gxfxcxdxbxegedabagacad
PS1='\n\[\e[1;36m\]\w \[\e[m\]\[\e[1;33m\]$(parse_git_branch)\[\e[m\] \n> '
@defeed
defeed / hpricot.rb
Created November 4, 2011 22:42
Hpricot table parsing
# 1st column
document.search("a[@href*=calendar]").each { |country| countries << country.inner_text }
# 2nd column
document.search("td[@align*=right]").each { |date| dates << date.inner_text }