Skip to content

Instantly share code, notes, and snippets.

View blackaller's full-sized avatar
🎬
I may be slow to respond.

Black blackaller

🎬
I may be slow to respond.
View GitHub Profile
@nmwsharp
nmwsharp / printarr
Last active October 24, 2023 08:06
Pretty print tables summarizing properties of tensor arrays in numpy, pytorch, jax, etc. --- now on pip: `pip install arrgh`
Pretty print tables summarizing properties of tensor arrays in numpy, pytorch, jax, etc.
Now on pip! `pip install arrgh` https://github.com/nmwsharp/arrgh
@andrejbauer
andrejbauer / Queue.agda
Last active September 1, 2021 23:23
An implementation of infinite queues fashioned after the von Neuman ordinals
open import Data.Nat
open import Data.Maybe
open import Data.Product
-- An implementation of infinite queues fashioned after the von Neuman ordinals
module Queue where
infixl 5 _⊕_
@newcarrotgames
newcarrotgames / install.sh
Created June 25, 2021 14:24
Python code for running vqgan+clip on your own machine. Shamelessy taken from this colab: https://colab.research.google.com/drive/1go6YwMFe5MX6XM9tv-cnQiSTU50N9EeT#scrollTo=mFo5vz0UYBrF. USE AT YOUR OWN RISK!
# I _hope_ this is everything but there may be some other libs I forgot or you don't have,
# so just use pip to install them if vqgan_clip.py complains about missing modules.
# Make some folder, cd into it, and run this.
git clone https://github.com/openai/CLIP
git clone https://github.com/CompVis/taming-transformers
pip install ftfy regex tqdm omegaconf pytorch-lightning
pip install kornia
pip install stegano
apt install exempi
pip install python-xmp-toolkit
@kylemcdonald
kylemcdonald / gitmastree.png
Last active December 25, 2015 05:01
Merry Gitmas.
gitmastree.png
@kylemcdonald
kylemcdonald / Class similarity.ipynb
Last active May 13, 2019 13:58
Finding similarities with a neural network that trained for object classification.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kylemcdonald
kylemcdonald / build-caffe.md
Last active March 26, 2024 05:52
How to build Caffe for OS X.

Theory of Building Caffe on OS X

Introduction

Our goal is to run python -c "import caffe" without crashing. For anyone who doesn't spend most of their time with build systems, getting to this point can be extremely difficult on OS X. Instead of providing a list of steps to follow, I'll try to explain why each step happens.

This page has OS X specific install instructions.

I assume:

@karpathy
karpathy / min-char-rnn.py
Last active July 24, 2024 18:36
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@scneptune
scneptune / crossfading
Created November 16, 2013 09:21
Use the Web Audio API to crossfade between two sources. taken directly from http://www.html5rocks.com/en/tutorials/webaudio/intro/ for the purposes of understanding audio
var CrossfadeSample = {playing:false};
CrossfadeSample.play = function() {
// Create two sources.
this.ctl1 = createSource(BUFFERS.drums);
this.ctl2 = createSource(BUFFERS.organ);
// Mute the second source.
this.ctl1.gainNode.gain.value = 0;
// Start playback in a loop
if (!this.ctl1.source.start) {