Skip to content

Instantly share code, notes, and snippets.

@keturn
keturn / CLIP_token_embeddings.ipynb
Created January 5, 2024 19:06
exploring CLIP token embeddings as used for Stable Diffusion inputs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@keturn
keturn / SDXL_Prompt_Styles.txt
Last active July 17, 2024 00:42
SDXL styles - Credit for the prompts goes to MechanicalReproductions & sedetweiler.com - https://discord.com/channels/1002292111942635562/1089974139927920741/1130958251962417304
Style: Enhance
Positive: breathtaking {prompt} . award-winning, professional, highly detailed
Negative: ugly, deformed, noisy, blurry, distorted, grainy
Style: Anime
Positive: anime artwork {prompt} . anime style, key visual, vibrant, studio anime, highly detailed
Negative: photo, deformed, black and white, realism, disfigured, low contrast
Style: Photographic
Positive: cinematic photo {prompt} . 35mm photograph, film, bokeh, professional, 4k, highly detailed
@keturn
keturn / 4-epilogue.pikchr
Created June 27, 2022 02:25
Fox's Diagram (The Eighth Warden, Book 4, Epilogue)
linewid = 5
thickness = 5px
// See https://www.royalroad.com/fiction/26116/the-eighth-warden/chapter/928636/book-4-epilogue
A: [
// Three parallel lines close together.
line right
line from 1 below previous.start
line from 1 below previous.start
@keturn
keturn / engine-tests.md
Last active May 23, 2022 19:32
Terasology Test Dependency Diagram

Main Implementation Dependencies

flowchart TD

modA(Module A)
modB(Module B)
engine-tests
engine
@keturn
keturn / MethodHandleAdapters.java
Last active May 18, 2022 03:01
Java MethodHandle from SerializedLambda
import com.google.common.base.Throwables;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandleInfo;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.lang.invoke.SerializedLambda;
import java.security.AccessController;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
@keturn
keturn / SpyingOutputObjectStream.java
Last active May 18, 2022 03:01
Java: Get a lambda's parameter types
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.io.Serializable;
import java.lang.invoke.MethodType;
import java.lang.invoke.SerializedLambda;
import java.lang.reflect.Method;
import java.security.AccessController;
import java.security.PrivilegedActionException;
@keturn
keturn / Terasology Engine Package.xml
Created March 7, 2021 21:06
Terasology migration for engine packages
<?xml version="1.0" encoding="UTF-8"?>
<migrationMap>
<name value="Terasology Engine Package" />
<description value="Move the `:engine` project entirely inside `org.terasology.engine`&#10;&#10;reflection, persistence, and protobuf are left out due to being mixed up with other sources&#10;&#10;https://github.com/MovingBlocks/Terasology/pull/4560" />
<entry oldName="org.terasology.engine.module" newName="org.terasology.engine.core.module" type="package" recursive="true" />
<entry oldName="org.terasology.audio" newName="org.terasology.engine.audio" type="package" recursive="true" />
<entry oldName="org.terasology.config" newName="org.terasology.engine.config" type="package" recursive="true" />
<entry oldName="org.terasology.context" newName="org.terasology.engine.context" type="package" recursive="true" />
<entry oldName="org.terasology.entitySystem" newName="org.terasology.engine.entitySystem" type="package" recursive="true" />
<entry oldName="org.terasology.game" newName="org.terasology.engine.
@keturn
keturn / nouns.txt
Created February 10, 2020 04:10
Azarinth Healer: People and Places (Proper Nouns)
Aaron
Abby
Adam Strand
Agor
Akelion
Aki
Albert
Alex
Aliana
Alice Forkspear
@keturn
keturn / pr-only-fork.sh
Created December 29, 2019 01:52
Document git fork as "Pull-Request Only"
#!/bin/bash
# Replace the repo's default branch with a README explaining this fork is only for its submitted pull requests.
set -e -x -o pipefail
REMOTE=origin
GH_USERNAME="${GH_USERNAME:-$USER}"
TRUNK="$(git symbolic-ref --short refs/remotes/$REMOTE/HEAD | sed "s:${REMOTE}/::")"
REMOTE_URL="$(git remote get-url $REMOTE)"
@keturn
keturn / bundle.gradle.kts
Last active October 2, 2018 00:10
sample Gradle Kotlin-DSL build script for libktx project
plugins {
eclipse
idea
kotlin("jvm") version "1.2.71"
}
allprojects {
version = "1.0"
val appName by extra { "MY_PROJECT_NAME" }