This file contains 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
ax.quiver(x, y, dx, dy, | |
scale=1, scale_units='xy', angles='xy') |
This file contains 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.optim import * | |
def check_optimizer(optimizer_type, modify_grad=False): | |
testvar = torch.ones([]) | |
testvar.requires_grad = True | |
if optimizer_type is SGD: | |
opt = optimizer_type([testvar], 1e-3) |
This file contains 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 numpy as np | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
import seaborn as sns | |
from IPython.display import display | |
from IPython import get_ipython |
This file contains 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
#! /usr/bin/env python | |
class Pipeline(object): | |
def __init__(self): | |
self.source = None | |
def __iter__(self): | |
return self.generator() | |
def generator(self): |
This file contains 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
# Copy .iso to usb stick | |
dd bs=4M if=/*.iso of=/dev/sdx && sync | |
# Convert .pngs to .gif (imagemagick) | |
convert -delay 2 -layers OptimizePlus *.png anim.gif | |
# Rip CD into the current directory | |
abcde -xpPo vorbis -d /dev/disk/by-id/$drive # Specifying the device seems to result in faster rips |