Skip to content

Instantly share code, notes, and snippets.

Douglas Duhaime duhaime

View GitHub Profile
@duhaime
duhaime / mov.mp4
Last active Apr 9, 2019
1m images 60fps
View mov.mp4
This file has been truncated, but you can view the full file.
@duhaime
duhaime / .block
Created Apr 3, 2019 — forked from Fil/.block
Circular Vortex Emergence
View .block
license: gpl-3.0
border: no
scrolling: no
height: 500
@duhaime
duhaime / nyt.js
Created Mar 27, 2019
New York Times Reader
View nyt.js
var text = ''; Object.values(__preloadedData.initialState).filter(k => k.text ? text += k.text : null); console.log(text);
@duhaime
duhaime / f11r.jpg
Last active Mar 21, 2019
Extract Voynich Words
@duhaime
duhaime / .gitignore
Last active Apr 4, 2019
dance: autoencoder + mdn
View .gitignore
.ipynb_checkpoints
*.pyc
*.swp
*.pem
*.DS_Store
View frame-level-diffs.py
##
# Example cell showing transformation logic
##
# sample initial conditions for array with 3 verts, 2 time stamps, 3 dims
a = np.array([
[ # vert
[3,3,3], # vert 0 time 0
[7,7,7]
],
@duhaime
duhaime / carrie-10-mins.npy
Last active Mar 9, 2019
Dance Visualization
View carrie-10-mins.npy
This file has been truncated, but you can view the full file.
View CGAN.py
%load_ext autoreload
%autoreload 2
from keras.applications.vgg16 import VGG16
from scipy.spatial.distance import cosine
from keras.datasets import mnist
from keras.layers import Input, Dense, Reshape, Flatten, Embedding, BatchNormalization, Dropout, multiply
from keras.layers.advanced_activations import LeakyReLU
from keras.models import Sequential, Model
from keras.optimizers import Adam
@duhaime
duhaime / GAN.py
Last active Mar 7, 2019
Vanilla GAN.ipynb
View GAN.py
%load_ext autoreload
%autoreload 2
from keras.applications.vgg16 import VGG16
from scipy.spatial.distance import cosine
from keras.datasets import mnist
from keras.layers import Input, Dense, Reshape, Flatten, BatchNormalization, Concatenate, multiply
from keras.layers.advanced_activations import LeakyReLU
from keras.models import Sequential, Model
from keras.optimizers import Adam
@duhaime
duhaime / create_nested_dictionaries.py
Created Feb 26, 2019
Create arbitrarily nested dictionaries in Python
View create_nested_dictionaries.py
# python 3
from functools import reduce
import operator
class autovivify(dict):
'''Infinitely nestable dictionary'''
def __missing__(self, key):
value = self[key] = autovivify()
return value
You can’t perform that action at this time.