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 argparse | |
import gym | |
import numpy as np | |
from itertools import count | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torch.optim as optim | |
import torch.autograd as autograd |
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 | |
import torch.nn as nn | |
import torch.nn.functional as F | |
from torch.autograd import Variable | |
class Policy(nn.Module): | |
def __init__(self): | |
super(Policy, self).__init__() | |
self.affine1 = nn.Linear(4, 128) |
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
# This script tries as best as possible to filter out bad replays | |
# Pass it a subdir, and it will read all '.rep' files, and spit out a list | |
# of the corrupt files in stdout | |
from __future__ import print_function | |
from pyreplib import replay # https://github.com/HearthSim/pyreplib/ | |
from itertools import repeat | |
from multiprocessing import Pool, Process, Pipe | |
from multiprocessing.pool import ThreadPool | |
import os | |
import sys |
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
# This script tries as best as possible to filter out bad replays | |
# Pass it a subdir, and it will read all '.rep' files, and spit out a list | |
# of the corrupt files in stdout | |
from __future__ import print_function | |
from pyreplib import replay | |
from itertools import repeat | |
from multiprocessing import Pool, Process, Pipe | |
from multiprocessing.pool import ThreadPool | |
from Queue import Queue | |
import os |
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
#include <ctime> | |
#include <iostream> | |
#include "replayer.h" | |
using namespace std; | |
using namespace torchcraft::replayer; | |
int main() { | |
std::clock_t start; | |
double duration; |
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
pkgname='singularity-container' | |
pkgver='2.3' | |
pkgrel='0' | |
pkgdesc='Container platform focused on supporting "Mobility of Compute".' | |
arch=('i686' 'x86_64') | |
url='http://singularity.lbl.gov' | |
license=('BSD') | |
depends=('bash' 'python') | |
source=("https://github.com/singularityware/singularity/releases/download/${pkgver}/singularity-${pkgver}.tar.gz") | |
md5sums=('dbc02b17f15680c378c1ec9e4d80956d') |
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 import nn | |
from torch.nn import functional as F | |
from torch.autograd import Variable | |
import sys | |
nlen = 5 | |
model_type = nn.LSTM | |
running_loss = 1 |