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 pymunk | |
import pygame | |
import random | |
import sys | |
from pymunk.pygame_util import DrawOptions | |
width = 600 | |
height = 600 | |
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 | |
import torch.nn as nn | |
from torch.autograd import Variable | |
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence | |
import itertools | |
import string | |
""" | |
Since character embeddings are a bit weak in pytorch 3, this will hopefully help out | |
I think these should be trainable and also, invertable! |
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
dependencies | |
virtualenv | |
http://virtualenvwrapper.readthedocs.io/en/latest/command_ref.html | |
sudo pip install vitualenvwrapper | |
in .bash_profile add (or create) |
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
from typing import Optional | |
import torch | |
from torch import tensor | |
from tensordict import TensorDict | |
from torchrl.data import CompositeSpec, BoundedTensorSpec, UnboundedContinuousTensorSpec, UnboundedDiscreteTensorSpec, DiscreteTensorSpec, \ | |
UnboundedContinuousTensorSpec | |
from torchrl.envs import ( | |
EnvBase, | |
Transform, |
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 import tensor | |
from torch.distributions.multivariate_normal import MultivariateNormal | |
import matplotlib.pyplot as plt | |
from matplotlib.patches import Ellipse | |
import matplotlib.patches as mpatches | |
from math import acos, degrees | |
from matplotlib.pyplot import cm | |
""" |
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.distributions.normal import Normal | |
import matplotlib.pyplot as plt | |
""" | |
EM algo demo, in pytorch | |
""" | |
n = 40 # must be even number |
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 | |
import torch.nn.functional as F | |
import pytorch_lightning as pl | |
from pytorch_lightning.callbacks import ModelCheckpoint, LearningRateMonitor, EarlyStopping | |
from pytorch_lightning.plugins import DDPPlugin | |
from pl_bolts.datamodules import MNISTDataModule | |
class LightningMNISTClassifier(pl.LightningModule): |
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 | |
import torch.nn.functional as F | |
import torch.nn as nn | |
from torch.autograd import Function | |
from matplotlib import pyplot as plt | |
from torchvision.io import read_image | |
inf = float('inf') | |
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
http://dev.jackcoldrick.com/custom-form-validation/ |
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
snap install --channel 1.13/stable --classic microk8s | |
microk8s.enable registry | |
microk8s.enable dns | |
microk8s.enable storage # not sure if i need this | |
#install | |
snap install helm --classic | |
/snap/bin/helm init | |
helm install stable/redis -n ppo-redis | |
snap alias microk8s.kubectl kubectl |
NewerOlder