Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from stable_diffusion_videos.stable_diffusion_walk import walk | |
prompt_n_seed = { | |
"1965 Porsche 911": 743, | |
"1975 Porsche 911": 140, | |
"1985 Porsche 911": 40, | |
"1995 Porsche 911": 560, | |
"2005 Porsche 911 directly facing camera": 996, | |
"2015 Porsche 911": 283, | |
"2020 Porsche 911": 116, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from diffusers import StableDiffusionPipeline | |
from torch import autocast | |
import random | |
import matplotlib.pyplot as plt | |
import os | |
prompts = [ | |
"1965 Porsche 911", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://cs231n.github.io/neural-networks-case-study/ | |
def spiral_data(points, classes): | |
X = np.zeros((points*classes, 2)) | |
y = np.zeros(points*classes, dtype='uint8') | |
for class_number in range(classes): | |
ix = range(points*class_number, points*(class_number+1)) | |
r = np.linspace(0.0, 1, points) # radius | |
t = np.linspace(class_number*4, (class_number+1)*4, points) + np.random.randn(points)*0.2 | |
X[ix] = np.c_[r*np.sin(t*2.5), r*np.cos(t*2.5)] | |
y[ix] = class_number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pylsl import StreamInlet, resolve_stream | |
import numpy as np | |
import time | |
import matplotlib.pyplot as plt | |
from matplotlib import style | |
from collections import deque | |
last_print = time.time() | |
fps_counter = deque(maxlen=150) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
hm_samples = 300000 | |
max_val = 100000 | |
options = ["add", "sub", "mul", "div"] | |
def generate_pair(action): | |
x = random.randrange(1, max_val) | |
y = random.randrange(1, max_val) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import Counter | |
files = ['train.to','train.from'] | |
for name in files: | |
words = [] | |
save_name = "vocab.{}".format(name.split('.')[1]) | |
print(save_name) | |
with open(name, 'r') as f: | |
data = f.read().split('\n') |