Skip to content

Instantly share code, notes, and snippets.

@sagelywizard
sagelywizard / episode.py
Last active January 12, 2018 17:30
Lyrics sampler for few-shot-music-gen
#!/usr/bin/python3
import os
import time
import numpy as np
def parse_lyrics_file(filename):
lyrics_lines = open(filename, 'r', errors='ignore').readlines()
tokens = []
for line in lyrics_lines:
@sagelywizard
sagelywizard / class_prob.py
Last active August 30, 2017 21:42
A script for classifying a single sample using my model for the ml4seti competition.
#!/usr/bin/env python3
"""A script for classifying a single sample using my model for the ml4seti competition.
e.g. python class_prob.py /path/to/sample.dat /path/to/model.pth
"""
import sys
import torch
import torch.nn.functional as F
from torch.autograd import Variable

Keybase proof

I hereby claim:

  • I am sagelywizard on github.
  • I am ben (https://keybase.io/ben) on keybase.
  • I have a public key whose fingerprint is 3B88 9424 69BC 8B07 1F4D EE4D 24B4 C527 6E82 C9CF

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am sagelywizard on github.
  • I am ben (https://keybase.io/ben) on keybase.
  • I have a public key whose fingerprint is 3B88 9424 69BC 8B07 1F4D EE4D 24B4 C527 6E82 C9CF

To claim this, I am signing this object: