Skip to content

Instantly share code, notes, and snippets.

View jemgold's full-sized avatar
👽
vibing

Jem jemgold

👽
vibing
View GitHub Profile
@mattdesl
mattdesl / README.md
Last active November 18, 2021 13:14
seedable PRNG from hash
float getBPMVis(float bpm){
// this function can be found graphed out here :https://www.desmos.com/calculator/rx86e6ymw7
float bps = 60./bpm; // beats per second
float bpmVis = tan((time*PI)/bps);
// multiply it by PI so that tan has a regular spike every 1 instead of PI
// divide by the beat per second so there are that many spikes per second
bpmVis = clamp(bpmVis,0.,10.);
// tan goes to infinity so lets clamp it at 10
bpmVis = abs(bpmVis)/20.;
from tkinter import *
from PIL import ImageTk,Image
import time
import os
targetImageWidth = 850
targetImageHeight = 400
inputImageWidth = 0
inputImageHeight = 0
@kylemcdonald
kylemcdonald / Triplet Loss.ipynb
Last active November 29, 2022 20:42
Experimenting with triplet loss embeddings.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
vec2 rotate(vec2 v, float a) {
float s = sin(a);
float c = cos(a);
mat2 m = mat2(c, s, -s, c);
return m * v;
}
anonymous
anonymous / cristina-fernandez-kirchner-tweets.md
Created July 3, 2013 11:13
President Cristina Fernandez de Kirchner's tweets translation about Evo Morales issue

This is an extraction from http://www.mail-archive.com/kragen-journal@canonical.org/msg00111.html

Edward Snowden is apparently still in Moscow, but Evo Morales's plane leaving Moscow was denied passage over France, Portugal, and apparently Italy, on suspicion that it contained Snowden. (This is how European countries show their gratitude for leaks showing the extent of USG spying on it?) It was forced to land in Vienna, where I'm still not clear on whether it was searched.

President Cristina Fernandez de Kirchner posted an outraged, and

@brendandawes
brendandawes / ISOPaperSizes.pde
Created April 23, 2013 15:44
ISO 216 paper sizes in pixels @ 300dpi
/*
ISO 216 paper sizes converted to pixels @ 300dpi
Drop this file in your Processing sketch and use like so: size(A1w, A1h);
*/
final int A5w = 1748;
final int A5h = 2480;
final int A4w = 2480;
@olizilla
olizilla / meteor-dump.sh
Last active May 29, 2016 02:18
Dump a mongo db from a live meteor app to a local dump dir.
#!/bin/bash
# __
# _____ ____ _/ |_ ____ ____ _______
# / \ _/ __ \ \ __\_/ __ \ / _ \ \_ __ \
# | Y Y \\ ___/ | | \ ___/ ( <_> ) | | \/
# |__|_| / \___ > |__| \___ > \____/ |__|
# \/ \/ \/
#
# .___
# __| _/ __ __ _____ ______
@naan
naan / source_maps.rb
Last active December 14, 2015 13:48 — forked from alexspeller/source_maps.rb
Monkey patch for Coffee Script v.1.6.2 Source Maps for Rails.
# config/initializers/source_maps.rb
if Rails.env.development?
module CoffeeScript
class SourceMapError < StandardError; end;
class << self
def compile script, options
script = script.read if script.respond_to?(:read)
class people::fromonesrc {
include alfred
include caffeine
include elasticsearch
include flux
include handbrake
include notational_velocity
include onepassword
include screen
include vlc