Skip to content

Instantly share code, notes, and snippets.

Char CharStiles

Block or report user

Report or block CharStiles

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View image_heightmap_terrain.glsl
#version 150
uniform float time;
uniform vec2 resolution;
uniform vec2 mouse;
uniform vec3 spectrum;
uniform sampler2D noise2;
uniform sampler2D noise1;
uniform sampler2D texture0;
View sticker-sheet.glsl
vec3 hsv2rgb(vec3 c)
{
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}
float smin( float a, float b, float k )
{
float h = clamp( 0.5+0.5*(b-a)/k, 0.0, 1.0 );
return mix( b, a, h ) - k*h*(1.0-h);
View boilerPlate.glsl
#version 150
uniform float time;
uniform vec2 resolution;
uniform vec2 mouse;
uniform vec3 spectrum;
uniform sampler2D texture0;
uniform sampler2D texture1;
uniform sampler2D texture2;
View RC_pairingInterview.js
var tree
var pad = 10
class Node{
constructor(v){ // v is a string
this.val = v;
}
}
class Tree{
View manifestos.klproj
#version 150
uniform float time;
uniform vec2 resolution;
uniform vec2 mouse;
uniform vec3 spectrum;
uniform sampler2D texture0;
uniform sampler2D shared1;
uniform sampler2D texture2;
View fleshy_cherrios.klproj
#version 150
//Char Stiles 2018
// you can see what this renders to here: https://www.youtube.com/watch?v=gfJXa_MILdk&feature=youtu.be
// to run this code yourself download OSX Kodelife from Hexler.
// then create variables in the side panel for noise1 (sampler2D of noise), ans value1 (float)
uniform float time;
uniform vec2 resolution;
uniform vec2 mouse;
uniform vec3 spectrum;
View bombici_visuals.glsl
#version 150
uniform float time;
uniform vec2 resolution;
uniform vec2 mouse;
uniform vec3 spectrum;
uniform sampler2D texture0;
uniform sampler2D texture1;
uniform sampler2D texture2;
View .zshrc
# my fork of https://gist.github.com/SlexAxton/4989674
gifify() {
if [[ -n "$1" ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
if [[ $2 == '--small' ]]; then
a=$(ls out-static* | wc -l)
for p in $(ls -r out-static*);
do
out=$(printf "out-static-%05d.png" $a)
View ClientToSendFaceSketch.py
#! /usr/bin/python
import zmq
import numpy as np
from PIL import Image
import os
port = "8080"
context = zmq.Context()
socket = context.socket(zmq.REQ)
socket.connect("tcp://IP:%s" % port)
View ServerToProcessFaceSketch.py
'''
based off of test.py from https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix
Thanks to Aman Tiwari for the help.
to run:
python ServerToProcessFaceSketch.py --dataroot ./darta --name face_pix2pix --model pix2pix --which_model_netG unet_256 --which_direction AtoB --dataset_mode aligned --norm batch
'''
import os
import io
import time
import zmq
You can’t perform that action at this time.