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 torch.autograd import Variable | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torch.optim as optim | |
import torchvision | |
import torchvision.transforms as transforms |
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 datetime import datetime | |
import numpy as np | |
from keras import Input | |
import keras.backend as K | |
from keras.callbacks import TensorBoard | |
from keras.engine import Model | |
from keras.layers import LSTM, TimeDistributed, Dense, Reshape, Flatten, LeakyReLU, Lambda | |
from keras.optimizers import Adam, sgd |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import scipy.misc as sm | |
import math | |
import random | |
import itertools as it | |
import matplotlib | |
import matplotlib.pyplot as pp | |
def combine(all, result, d=1, totalpoints = 0, totallogprob = 0): | |
""" | |
Computes the complete probability distribution over the total points. |
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
Compiled from "Sandbox.java" | |
public class Sandbox { | |
public static final java.util.Random RANDOM; | |
public static double sumWith; | |
public static double sumWithout; | |
public static double t0; |
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 static java.lang.System.currentTimeMillis; | |
import java.util.Arrays; | |
import java.util.Random; | |
public class Sandbox | |
{ | |
public static final Random RANDOM = new Random(); | |
public static double sumWith = 0; |
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
# -*- coding: utf-8 -*- | |
import matplotlib as mpl | |
mpl.use('Agg') | |
import matplotlib.pyplot as p | |
from matplotlib import colors | |
import numpy as n | |
import pylab | |
import scipy.stats as stats | |
from __builtin__ import file |
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 java.awt.Color; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.io.IOException; | |
import javax.imageio.ImageIO; | |
/** | |
* Simple demonstration of the bare necessities required to crate an image file | |
* @author Peter |
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 java.util.Arrays; | |
import java.util.List; | |
import javax.sound.midi.MidiSystem; | |
import javax.sound.midi.Synthesizer; | |
import javax.sound.midi.MidiChannel; | |
/** | |
* A little example showing how to play a tune in Java. | |
* |