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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Python: Remote Attach", | |
"type": "python", | |
"request": "attach", |
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
for file in *.png; do | |
convert $file eps2:${file%.*}.eps ; | |
done | |
for file in *.jpg; do | |
convert $file eps2:${file%.*}.eps ; | |
done |
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 argparse | |
import torch | |
import torch.nn as nn | |
import numpy as np | |
from torch.utils.data import Dataset, DataLoader | |
from pytorch_pretrained_bert import BertModel, BertTokenizer | |
import torch.nn.utils.rnn as rnn | |
import torch.nn.functional as F | |
import torch.utils.data as data | |
import sys |
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 argparse | |
import torch | |
import torch.nn as nn | |
import numpy as np | |
from torch.utils.data import Dataset, DataLoader | |
import sys | |
from torch.nn.utils import clip_grad_norm_ | |
import parser | |
import torch | |
import os |
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
export DefaultImModule=fcitx | |
export GTK_IM_MODULE=fcitx | |
export QT_IM_MODULE=fcitx | |
export XMODIFIERS="@im=fcitx" |
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
# install python packages | |
conda config --add channels conda-forge | |
conda install -y jupyter pytorch torchvision -c pytorch | |
conda install -y pyvirtualdisplay | |
yes | pip3 install torchvision | |
yes | pip3 install gym "gym[atari]" | |
# Configure jupyter notebook server | |
jupyter notebook --generate-config | |
echo "c = get_config()" >> ~/.jupyter/jupyter_notebook_config.py |
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
#!/bin/bash | |
sudo apt update && sudo apt upgrade -y | |
# install tmux and mosh | |
sudo apt install tmux mosh curl | |
# install docker | |
# sudo apt install nvidia-container-toolkit # uncomment if you want to use gpus | |
sudo curl -fsSL https://get.docker.com -o get-docker.sh |
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
docker run -it --rm \ | |
--net=host \ | |
-e DISPLAY=$DISPLAY \ | |
-v /home/syuntoku/.Xauthority:/headless/.Xauthority:rw \ | |
-v /tmp/.X11-unix:/tmp/.X11-unix \ | |
--entrypoint=/bin/bash \ | |
lucasfischerberkeley/flowdesktop | |
# inside the container, run "conda activate flow-rllab" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
apt update | |
apt install -y python-numpy python-dev cmake zlib1g-dev libjpeg-dev xvfb ffmpeg xorg-dev python-opengl libboost-all-dev libsdl2-dev swig | |
pip3 install pyvirtualdisplay piglet gym torch torchvision | |
pip3 install "gym[atari]" | |
NewerOlder