This is a PRNG, built on Jacob Rus' implementation and modified slightly for a user-friendly API.
See here for source: https://observablehq.com/@jrus/permuted-congruential-generator
Archive of the code for images posted to https://twitter.com/tweegeemee | |
Started October 19, 2019 | |
:clisk-random-seed 191019 | |
Learn more at https://github.com/rogerallen/tweegeemee |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<script> | |
// Generates a random hash and token id each time you reload, in the following format | |
//let tokenData = {"hash":"0xd9134c11cd5ed9798ea0811364d63bd850c69c5d13383c9983ade39847e9ea86","tokenId":"99000000"}; | |
function genTokenData(projectNum) | |
{ | |
let data = {}; |
This is a PRNG, built on Jacob Rus' implementation and modified slightly for a user-friendly API.
See here for source: https://observablehq.com/@jrus/permuted-congruential-generator
Note: this content is reposted from my old Google Plus blog, which disappeared when Google took Plus down. It was originally published on 2016-05-18. My views and the way I express them may have evolved in the meantime. If you like this gist, though, take a look at Leprechauns of Software Engineering. (I have edited minor parts of this post for accuracy after having a few mistakes pointed out in the comments.)
Degrees of intellectual dishonesty
In the previous post, I said something along the lines of wanting to crawl into a hole when I encounter bullshit masquerading as empirical support for a claim, such as "defects cost more to fix the later you fix them".
It's a fair question to wonder why I should feel shame for my profession. It's a fair question who I feel ashamed for. So let's drill a little deeper, and dig into cases.
Before we do that, a disclaimer: I am not in the habit of judging people. In what follows, I only mean to condemn behaviours. Also, I gath
import torch | |
import numpy as np | |
import k_diffusion as K | |
from PIL import Image | |
from torch import autocast | |
from einops import rearrange, repeat | |
def pil_img_to_torch(pil_img, half=False): | |
image = np.array(pil_img).astype(np.float32) / 255.0 |
/** | |
* General-purpose NodeJS CLI/API wrapping the Stable-Diffusion python scripts. | |
* | |
* Note that this uses an older fork of stable-diffusion | |
* with the 'txt2img.py' script, and that script was modified to | |
* support the --outfile command. | |
*/ | |
var { spawn, exec } = require("child_process"); | |
var path = require("path"); |
import inspect | |
from modules.processing import Processed, process_images | |
import gradio as gr | |
import modules.scripts as scripts | |
import k_diffusion.sampling | |
import torch | |
class Script(scripts.Script): |